aws_elasticsearch_domain shows persistent diff for cognito options after disabling #18873
Labels
service/ec2
Issues and PRs that pertain to the ec2 service.
service/elasticsearch
Issues and PRs that pertain to the elasticsearch service.
service/iam
Issues and PRs that pertain to the iam service.
service/sts
Issues and PRs that pertain to the sts service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
For the
aws_elasticsearch_domain
resource defined below, there is a persistent diff that appears forcognito_options
whenenabled=false
and the other configuration options are valued. This issue only appears after at least one terraform apply cycle has been executed whereenabled=true
. After that cycle, subsequent executions always show a diff forcognito_options
and the values are never persisted toterraform.tfstate
.Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
Expected Behavior
Terraform does not show a diff for any cognito options if
enabled = false
and there are no changes to other cognito properties likeidentity_pool_id
,role_arn
oruser_pool_id
.Actual Behavior
Terraform shows diff for every apply to
identity_pool_id
,role_arn
oruser_pool_id
whenenabled = false
.Steps to Reproduce
terraform apply
enabled = true
terraform apply
enabled = false
terraform apply
Important Factoids
cognito_options
with simple object whenenabled = false
for initial applycognito_options
whenenabled = false
for initial applyCognitoOptions
as returnd by the AWS CLIenabled=true
and applying, the AWS API and Terraform state file all show the provided values foridentity_pool_id
,role_arn
, anduser_pool_id
:enabled = false
again and re-applying, the AWS API and Terraform state file now show conflicting representations:References
The text was updated successfully, but these errors were encountered: