{"id":16504980,"url":"https://github.com/sgibson91/terraform-example","last_synced_at":"2026-03-18T20:04:10.642Z","repository":{"id":36954691,"uuid":"406765569","full_name":"sgibson91/terraform-example","owner":"sgibson91","description":"An example repo to demonstrate terraform with GCP and Azure","archived":false,"fork":false,"pushed_at":"2022-10-25T16:23:52.000Z","size":54,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T23:26:57.096Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgibson91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-15T12:59:41.000Z","updated_at":"2022-02-01T12:09:13.000Z","dependencies_parsed_at":"2023-01-17T08:02:00.471Z","dependency_job_id":null,"html_url":"https://github.com/sgibson91/terraform-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sgibson91/terraform-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgibson91%2Fterraform-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgibson91%2Fterraform-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgibson91%2Fterraform-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgibson91%2Fterraform-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgibson91","download_url":"https://codeload.github.com/sgibson91/terraform-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgibson91%2Fterraform-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279172799,"owners_count":26118977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T15:08:37.418Z","updated_at":"2025-10-16T09:27:06.873Z","avatar_url":"https://github.com/sgibson91.png","language":"HCL","readme":"# Terraforming the Cloud\n\nThis is an example repo to demonstrate `terraform` with GCP and Azure as part of a talk.\n\nSlides are available here :point_right: \u003chttps://docs.google.com/presentation/d/1L22ox6M8Yl0-Ocw_wREyJNeQp25vhhkdFeCwzjdjDSY/edit?usp=sharing\u003e\n\nThe examples in this repo where developed using Hashicorp's Terraform Get Started guides for Azure and GCP.\n\n- [Get Started with Azure](https://learn.hashicorp.com/collections/terraform/azure-get-started)\n- [Get started with GCP](https://learn.hashicorp.com/collections/terraform/gcp-get-started)\n\n## What you will need\n\n- A `terraform` installation: \u003chttps://learn.hashicorp.com/tutorials/terraform/install-cli\u003e\n- An account with your chosen cloud provider\n  - If you choose Google Cloud, you will also need to [create a service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) and [generate a key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) for it\n- The command line interface installation for your chosen cloud provider, either:\n  - Azure: \u003chttps://docs.microsoft.com/en-us/cli/azure/install-azure-cli\u003e\n  - Google Cloud: \u003chttps://cloud.google.com/sdk/docs/install\u003e\n\n## How to use this repo\n\n1. Clone the repo\n\n    ```bash\n    git clone https://github.com/sgibson91/terraform-example.git\n    cd terraform-example\n    ```\n\n2. Change into the `terraform` subdirectory of your chosen cloud provider\n\n    ```bash\n    cd terraform/{{ azure | gcp }}\n    ```\n\n3. Authenticate with your chosen cloud provider\n\n    ```bash\n    # For Azure\n    az login\n    # For Google Cloud\n    gcloud auth login\n    ```\n\n4. Create a copy of `inputs.example.tfvars` and replace the placeholder values with your desired inputs.\n   You may even choose to change some other values that are listed in `variables.tf`.\n\n    ```bash\n    cp inputs.example.tfvars inputs.tfvars\n    ```\n\n5. Initialise `terraform`\n\n    ```bash\n    terraform init\n    ```\n\n6. Plan your infrastructure changes\n\n    ```bash\n    terraform plan -var-file=inputs.tfvars -out=plan\n    ```\n\n7. Apply your infrastructure changes\n\n    ```bash\n    terraform apply plan\n    ```\n\n:bulb: Steps 6 and 7 can be repeated as many times as you wish as you make changes to your infrastructure\n\n8. Once you are finished, destroy your infrastructure\n\n    ```bash\n    terraform plan -var-file=inputs.tfvars -out-plan -destroy\n    terraform apply plan\n    ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgibson91%2Fterraform-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgibson91%2Fterraform-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgibson91%2Fterraform-example/lists"}