Skip to content
UTB supporting code repository
HCL Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aws
basics
demo-app-without-db
gcp
variables
.gitignore
README.md

README.md

ultimate-terraform-bootcamp

UTB supporting code repository

Assumptions

  • AWS/GCP/Azure Accounts are already present
  • GCP Project is already present
  • Terraform backend bucket is already present
  • CloudSQL Admin api is enabled

Commands Used

 export GOOGLE_CREDENTIALS=PATH_TO_CREDS_JSON
 terraform init
 terraform fmt
 terraform destroy --target=google_compute_instance.instance_01

Tips

  • Interpolations(variables) cannot be used in backend configuration. reason: The terraform block is loaded very early in the execution of Terraform and interpolations are not yet available.
  • Random Provider used to create random strings.
  • If you face 403 unauthorized errors for valid authentication, then remove .terraform directory from your workspace and try again.
  • Attributes of a data source
     The syntax is data.TYPE.NAME.ATTRIBUTE. For example. ${data.aws_ami.ubuntu.id} will interpolate the id attribute from the aws_ami data source named ubuntu. If the data source has a count attribute set, you can access individual attributes with a zero-based index, such as ${data.aws_subnet.example.0.cidr_block}. You can also use the splat syntax to get a list of all the attributes: ${data.aws_subnet.example.*.cidr_block}.
    
  • SQL import is still not supported

Reference Articles

You can’t perform that action at this time.