terraform-provider-shell
terraform-provider-shell copied to clipboard
BUG: `dirty` field doesn't default to `false` on `shell_script` resource create
Terraform and Provider Version
Terraform: 0.13.4 scottwinkler/shell: 1.7.3
Affected Resource
shell_script
Expected Behavior
dirty
property should default to false
when creating resource as stated in https://github.com/scottwinkler/terraform-provider-shell/blob/b37971c0fa729443046732bc515c5b212c960d78/shell/resource_shell_script.go#L80.
Actual Behavior
After doing terraform apply && terraform plan
if thedirty
property is not explicitly set in the Terraform configuration the terraform plan is not empty.
sorry i just noticed this issue now.
The dirty flag is to set to true to trigger updates if the read doesn't match the result of the create. It's like a ForceNew trigger.
However, I think it may be possible to get rid of this flag entirely, as there is now a custom diff function implemented by @rucciva . All that would have to do is check if the output is the same as the previous output. Will have to think about this