Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 1.64 KB

README.md

File metadata and controls

67 lines (46 loc) · 1.64 KB

GCP-terraform-config

Resources visualization:

alt text

Overview

This repo contains Terraform configurations (in the tfinfra dir) for setting up cloud resources. The structure uses modularized .tf files for efficient and reusable infrastructure as code.

Prerequisites

  • Google Cloud Shell and project access

Getting Started

Set Up Environment

  1. Open your Cloud Shell

  2. Create a Directory for Configuration Files:

    mkdir path/to/your_dir_name
    cd path/to/your_dir_name
  3. Initialize Terraform:

    terraform init

Configuration

  • Create Configurations:

    Create .tf configuration files for all required resources, use touch and nano or any other convenient tools. Organize these files using nested folders for modules, which are containers for reusable configurations. For instance, use the instance directory for Virtual Machines (VMs).

  • Format Configuration Files:

    To format the Terraform configuration files to a canonical format and style, run:

    terraform fmt

Deployment Process

  1. Initialize Terraform:

    terraform init
  2. Create an Execution Plan:

    terraform plan
  3. Apply Changes:

    terraform apply

Usage

You can use it as a start simple template for your infrastructure. For more details see the Terraform documentation

Contributing

Any advice or contributions are welcome!