Skip to content

Instantly share code, notes, and snippets.

@podhmo
Created March 31, 2021 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save podhmo/a4a44be8ecc7495f06003f2e7330a20f to your computer and use it in GitHub Desktop.
Save podhmo/a4a44be8ecc7495f06003f2e7330a20f to your computer and use it in GitHub Desktop.
terraform apply -auto-approve
module.plain.null_resource.echo: Refreshing state... [id=5834646776835244708]
module.plain.null_resource.echo: Destroying... [id=5834646776835244708]
module.echo2.null_resource.echo: Creating...
module.echo1.null_resource.echo: Creating...
module.plain.null_resource.echo: Destruction complete after 0s
module.echo1.null_resource.echo: Provisioning with 'local-exec'...
module.echo2.null_resource.echo: Provisioning with 'local-exec'...
module.echo1.null_resource.echo (local-exec): Executing: ["/bin/sh" "-c" "echo x=10 y=20 z=30\n"]
module.echo2.null_resource.echo (local-exec): Executing: ["/bin/sh" "-c" "echo x=100 y=200 z=300\n"]
module.echo2.null_resource.echo (local-exec): x=100 y=200 z=300
module.echo1.null_resource.echo (local-exec): x=10 y=20 z=30
module.echo2.null_resource.echo: Creation complete after 0s [id=1269680042276636852]
module.echo1.null_resource.echo: Creation complete after 0s [id=8965362161603827784]
Apply complete! Resources: 2 added, 0 changed, 1 destroyed.
terraform show
# module.echo2.null_resource.echo:
resource "null_resource" "echo" {
id = "1269680042276636852"
triggers = {
"x" = "100"
"y" = "200"
"z" = "300"
}
}
# module.echo1.null_resource.echo:
resource "null_resource" "echo" {
id = "8965362161603827784"
triggers = {
"x" = "10"
"y" = "20"
"z" = "30"
}
}
module "echo1" {
source = "./modules/xyz"
primary_configuration = {
x = 10
y = 20
z = 30
}
}
module "echo2" {
source = "./modules/xyz"
primary_configuration = {
x = 100
y = 200
z = 300
}
}
00:
terraform apply -auto-approve
terraform show
01:
terraform output
fmt:
terraform fmt
init:
terraform init
.PHONY: init fmt
@podhmo
Copy link
Author

podhmo commented Mar 31, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment