-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown 'ValidateResource' shadow value for "null_resource": &errors.errorString{s:"shadow closed"} #10200
Comments
Oh, this might be something with our tf resources. We've got the following: resource "null_resource" "render" {
triggers {
default_content = "${sha1(var.default_attributes_json)}"
override_content = "${sha1(file("${var.base_path}/${var.name}.overrides.json"))}"
empty = ""
}
provisioner "local-exec" {
command = "" // shell command to change around json.
}
}
# These outputs having the triggers are so that terraform will wait to make the
# rendered output after the rendered file has been made from the default and override
# files, as well as to let modules get the changes from the two to be triggered on
output "rendered_json" {
value = "${null_resource.render.triggers.empty}${file("${var.base_path}/${var.name}.rendered.json")}"
} |
Update: I switched that empty trigger to a sha1 of the I think we're running into what #10118 was fixing.
Running another
Running |
Oh this makes sense actually. You're modifying a file that it reads mid-apply. I'm not sure how we can actually fix this unfortunately. Please try running without the shadow with In the mean time we're going to make it easier to doso. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform v0.7.11
Affected Resource(s)
Please list the resources as a list, for example:
Debug Output
Expected Behaviour
There seems to be an extra
"empty":""
added onto the real graph. The shadow graph doesn't have this.References
The following issues look similar, but none of them deal with a
null_resource
.The text was updated successfully, but these errors were encountered: