Skip to content

Latest commit

 

History

History
46 lines (27 loc) · 1.52 KB

File metadata and controls

46 lines (27 loc) · 1.52 KB

Terraform Resource Meta-Arguments

  1. lifecycle Meta Argument

  • Lets Execute Terraform commands to understand resource behavior

    1. terraform init : Initialize terraform
    2. terraform validate : Validate terraform code
    3. terraform fmt : format terraform code
    4. terraform plan : Review the terraform plan
    5. terraform apply : Create Resources by terraform
      • Example of terraform apply terraform apply terraform apply

      • After you type yes to terraform apply prompt, terraform will start creating resources. terraform apply

      • Once terraform completes the execution you should be able to check on your AWS Console four S3 buckets created successfully terraform aws

    Cleanup

    1. terraform destroy : destroy or delete Resources, Cleanup the resources we created

      • After you type yes to terraform destroy prompt, terraform will start destroying resources

      terraform destroy

      • Once terraform completes the execution you should be able to check on your AWS Console both S3 buckets are successfully deleted. terraform destroy

References :