We should warn the user that update statements are ignored when creating a resource while specifying the update block. Only the create and read statements are run during resource creation.
Affected Resource(s)
Please list the resources as a list, for example:
snowsql_exec
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
resource "snowsql_exec" "role" {
create {
statements = "CREATE ROLE IF NOT EXISTS my_role"
}
# these will be ignored on creation
update {
statements = "ALTER ROLE IF EXISTS my_role SET COMMENT = 'updated with terraform'"
}
delete {
statements = "DROP ROLE IF EXISTS my_role"
}
}
Expected Behavior
A warning message that says the statements are ignored during creation and until the statements are changed or tainted.
Actual Behavior
The resource silently ignores the update statements.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
We should warn the user that update statements are ignored when creating a resource while specifying the
update
block. Only thecreate
andread
statements are run during resource creation.Affected Resource(s)
Please list the resources as a list, for example:
snowsql_exec
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Expected Behavior
A warning message that says the statements are ignored during creation and until the statements are changed or tainted.
Actual Behavior
The resource silently ignores the update statements.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply