cloud-foundation-fabric/cloud-operations/dns-shared-vpc/examples/shared-vpc-example
Julio Castillo 1e11c670f5 Update copyright to 2021 2021-02-15 09:38:10 +01:00
..
README.md Aurelien's SVPC DNS example (#186) 2021-01-11 11:57:57 +01:00
network.tf Update copyright to 2021 2021-02-15 09:38:10 +01:00
outputs.tf Update copyright to 2021 2021-02-15 09:38:10 +01:00
projects.tf Update copyright to 2021 2021-02-15 09:38:10 +01:00
test.example Update copyright to 2021 2021-02-15 09:38:10 +01:00
variables.tf Update copyright to 2021 2021-02-15 09:38:10 +01:00

README.md

Usage

/!\ Requires Terraform version 12.20 at least. Visit https://releases.hashicorp.com/terraform/ to get it.

You need to add your own terraform.tfvars with the following values:

organization_id = "<YOUR ORG ID>"
billing_account = "<YOUR BILLING ACCOUNT ID>"

You should create a backend.tf file with the following configuration:

terraform {
  required_providers {
    google = "~> 3.51.0"
    google-beta = "~> 3.51.0"
  }

  backend "gcs" {
    bucket = "<YOUR BUCKET FOR THE TERRAFORM STATE>"
    prefix = "<NAME FOR THE TERRAFORM STATE FOLDER>"
  }
}

Testing

Optionally, you can rename test.example into test.tf. This file will create 2 VM instances and corresponding DNS records so you can easily test this solution.

Clean Up

Run terraform destroy to clean up all resources created by this terraform code.