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.74k stars 9.1k forks source link

[Bug]: #39225

Closed EugenKon closed 1 week ago

EugenKon commented 1 week ago

Terraform Core Version

v1.9.5

AWS Provider Version

v5.55.0

Affected Resource(s)

Expected Behavior

  multi_az = false

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#multi_az The option does not have default values. It is not clear why it is "true".

Actual Behavior

The generated plan is:

  # module.private-cloud.aws_db_instance.postgres_v16 will be created
  + resource "aws_db_instance" "postgres_v16" {
      + availability_zone                     = "us-west-2a"
      ...
      + multi_az                              = true

Relevant Error/Panic Output Snippet

module.private-cloud.aws_db_parameter_group.postgres_v16: Modifying... [id=nomad-v16-ssl-autovacuum]
module.private-cloud.aws_db_parameter_group.postgres_v16: Modifications complete after 1s [id=nomad-v16-ssl-autovacuum]
module.private-cloud.aws_db_instance.postgres_v16: Creating...
╷
│ Error: creating RDS DB Instance (postgres-v16-enc): InvalidParameterCombination: Requesting a specific availability zone is not valid for Multi-AZ instances.
│   status code: 400, request id: 00fb07bc-9b34-4f04-be73-72938a32dfd7
│
│   with module.private-cloud.aws_db_instance.postgres_v16,
│   on modules/private-cloud/rds.tf line 1, in resource "aws_db_instance" "postgres_v16":
│    1: resource "aws_db_instance" "postgres_v16" {
│

Terraform Configuration Files

resource "aws_db_instance" "postgres_v16" {
  apply_immediately = true

  # multi_az                   = true
  availability_zone          = "${var.aws_region}a"

  ...
}

Steps to Reproduce

Try to create db instance at the specific zone.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 week ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 1 week ago

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.