github.com/swisspost/terratest@v0.0.0-20230214120104-7ec6de2e1ae0/examples/terraform-basic-example/main.tf (about) 1 # --------------------------------------------------------------------------------------------------------------------- 2 # PIN TERRAFORM VERSION TO >= 0.12 3 # The examples have been upgraded to 0.12 syntax 4 # --------------------------------------------------------------------------------------------------------------------- 5 6 terraform { 7 # This module is now only being tested with Terraform 0.13.x. However, to make upgrading easier, we are setting 8 # 0.12.26 as the minimum version, as that version added support for required_providers with source URLs, making it 9 # forwards compatible with 0.13.x code. 10 required_version = ">= 0.12.26" 11 } 12 13 # --------------------------------------------------------------------------------------------------------------------- 14 # BASIC TERRAFORM EXAMPLE 15 # See test/terraform_aws_example.go for how to write automated tests for this code. 16 # --------------------------------------------------------------------------------------------------------------------- 17 18 resource "local_file" "example" { 19 content = "${var.example} + ${var.example2}" 20 filename = "example.txt" 21 } 22 23 resource "local_file" "example2" { 24 content = var.example2 25 filename = "example2.txt" 26 } 27