Skip to content

schoolofdevops/ultimate-terraform-bootcamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

UTB supporting code repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published