Created
February 3, 2017 16:15
-
-
Save netjunki/666b99fac2445500fa66d2ee8033325c to your computer and use it in GitHub Desktop.
Demonstrate bug when removing a trigger in terraform 0.8.5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat - > main.tf <<"EOF" | |
resource "null_resource" "test" { | |
triggers { | |
run_every_time = "${uuid()}" | |
} | |
provisioner "local-exec" { | |
command = "echo this is a test" | |
} | |
} | |
EOF | |
cat main.tf | |
terraform apply | |
sed -i .bak '2,4d' main.tf | |
terraform apply | |
#### At this point terraform crashes with the following error: | |
#Error applying plan: | |
# | |
#1 error(s) occurred: | |
# | |
#* null_resource.test: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue. | |
# | |
#Please include the following information in your report: | |
# | |
# Terraform Version: 0.8.5 | |
# Resource ID: null_resource.test | |
# Mismatch reason: diff RequiresNew; old: true, new: false | |
# Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"triggers.%":*terraform.ResourceAttrDiff{Old:"1", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "triggers.run_every_time":*terraform.ResourceAttrDiff{Old:"49d5760b-1822-d153-610a-eeacfcfc0d54", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false} | |
# Diff Two (usually from apply): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{}, Destroy:false, DestroyDeposed:false, DestroyTainted:false} | |
# | |
#Also include as much context as you can about your config, state, and the steps you performed to trigger this error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment