https://github.com/GoogleCloudPlatform/solutions-terraform-cloudbuild-gitops
https://github.com/GoogleCloudPlatform/solutions-terraform-cloudbuild-gitops
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/GoogleCloudPlatform/solutions-terraform-cloudbuild-gitops
- Owner: GoogleCloudPlatform
- License: apache-2.0
- Created: 2019-05-29T17:20:40.000Z (almost 6 years ago)
- Default Branch: dev
- Last Pushed: 2024-08-13T11:25:00.000Z (8 months ago)
- Last Synced: 2025-03-28T05:04:49.976Z (18 days ago)
- Language: HCL
- Size: 10.7 KB
- Stars: 309
- Watchers: 18
- Forks: 1,809
- Open Issues: 244
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - GoogleCloudPlatform/solutions-terraform-cloudbuild-gitops - (HCL)
README
# Managing infrastructure as code with Terraform, Cloud Build, and GitOps
This is the repo for the [Managing infrastructure as code with Terraform, Cloud Build, and GitOps](https://cloud.google.com/solutions/managing-infrastructure-as-code) tutorial. This tutorial explains how to manage infrastructure as code with Terraform and Cloud Build using the popular GitOps methodology.
## Configuring your **dev** environment
Just for demostration, this step will:
1. Configure an apache2 http server on network '**dev**' and subnet '**dev**-subnet-01'
2. Open port 80 on firewall for this http server```bash
cd ../environments/dev
terraform init
terraform plan
terraform apply
terraform destroy
```## Promoting your environment to **production**
Once you have tested your app (in this example an apache2 http server), you can promote your configuration to prodution. This step will:
1. Configure an apache2 http server on network '**prod**' and subnet '**prod**-subnet-01'
2. Open port 80 on firewall for this http server```bash
cd ../prod
terraform init
terraform plan
terraform apply
terraform destroy
```