Open leventyalcin opened 4 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Hi @leventyalcin
Add
string_attribute_constraints { max_length = "2048" min_length = "0" } on each schema to avoid this issue
Example:
schema { name = "scope" attribute_data_type = "String" mutable = true required = false string_attribute_constraints { max_length = "2048" min_length = "0" } }
When defining an attribute_data_type of String or Number, the respective attribute constraints configuration block (e.g string_attribute_constraints or number_attribute_constraints) is required to prevent recreation of the Terraform resource. This requirement is true for both standard (e.g., name, email) and custom schema attributes.
registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cognito_user_pool#schema
Terraform Core Version
1.8.3
AWS Provider Version
5.54.1
Affected Resource(s)
aws_cognito_user_pool
Expected Behavior
According to this issue and the this PR, the expected behaviour of Terraform plan/apply output after the first time, updates on schema should be ignored if
string_attribute_constraints
is present.Actual Behavior
I am still seeing those triggers updates on
aws_cognito_user_pool
and it fails with the following output error message.Plan Output
Apply result
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Terraform apply for a template contains schemas like above twice. The second apply always fail.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None