hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.87k stars 9.21k forks source link

[Bug]: Opensearch domain access_policies never updates to null #40056

Open dacevedo12 opened 3 weeks ago

dacevedo12 commented 3 weeks ago

Terraform Core Version

1.8.3

AWS Provider Version

5.51.1

Affected Resource(s)

Expected Behavior

when removing access_policies it should detect the change in plan and apply the removal to AWS

Actual Behavior

It doesn't even recognize the change in terraform plan

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

See: Steps to Reproduce

Steps to Reproduce

Create a aws_opensearch_domain resource with access_policies apply it and then remove access_policies. Try to apply again and will see the problem

Debug Output

No response

Panic Output

No response

Important Factoids

I believe this has to do with the condition here https://github.com/hashicorp/terraform-provider-aws/blob/492c47b49c53ab2c875d40b2eba4a524d4b97dfd/internal/service/opensearch/domain.go#L861 or here https://github.com/hashicorp/terraform-provider-aws/blob/492c47b49c53ab2c875d40b2eba4a524d4b97dfd/internal/service/opensearch/domain.go#L993

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 3 weeks ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue