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.76k stars 9.11k forks source link

[Bug]: r/aws_redshiftserverless_namespace: conflict between manage_admin_password and admin_user_password #39265

Open marcinbelczewski opened 1 week ago

marcinbelczewski commented 1 week ago

Terraform Core Version

1.9.5

AWS Provider Version

5.66.0

Affected Resource(s)

Expected Behavior

It is possible to configure manage_admin_password = false and non-empty admin_user_password

Actual Behavior

Setting manage_admin_password = false and non-empty admin_user_password results in:

Error: Conflicting configuration arguments
│
│   with aws_redshiftserverless_namespace.test,
│   on main.tf line 21, in resource "aws_redshiftserverless_namespace" "test":
│   21:   manage_admin_password = false
│
│ "manage_admin_password": conflicts with admin_user_password
╵
╷
│ Error: Conflicting configuration arguments
│
│   with aws_redshiftserverless_namespace.test,
│   on main.tf line 23, in resource "aws_redshiftserverless_namespace" "test":
│   23:   admin_user_password = "Password1234!"
│
│ "admin_user_password": conflicts with manage_admin_password

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_redshiftserverless_namespace" "test" {
  namespace_name = "test"
  manage_admin_password = false
  admin_username = "admin"
  admin_user_password = "Password1234!"
}

Steps to Reproduce

Use config as in the snippet above and try applying

Debug Output

No response

Panic Output

No response

Important Factoids

CreateNamespace and UpdateNamespace APIs as well as AWS CLI, allow for setting manage_admin_password to false and then passing the admin password. The currently implementation in the provider does not allow for the attribute to be in the config alongside the passord, no matter whether it is false.

References

No response

Would you like to implement a fix?

Yes

github-actions[bot] commented 1 week ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue