Closed
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform CLI and Terraform AWS Provider Version
Terraform v1.2.6
on darwin_amd64
Affected Resource(s)
- aws_lightsail_database
Terraform Configuration Files
resource "aws_lightsail_database" "this" {
relational_database_name = "lightsail"
availability_zone = "eu-west-1a"
master_database_name = "foo"
master_username = "bar"
master_password = "baz123$$$"
blueprint_id = "mysql_8_0"
bundle_id = "small_ha_1_0"
}
Debug Output
If I change to another instance type without HA, like small_1_0
it deploys correctly. If I change back the bundle_id
to small_ha_1_0
, it breaks with the following error (see bellow).
`
Panic Output
aws_lightsail_database.this: Creating...
╷
│ Error: InvalidInputException: Sorry, you cannot request a specific availability zone for a High Availability database
│ {
│ RespMetadata: {
│ StatusCode: 400,
│ RequestID: "7f4db6a6-e936-4236-8055-ae9869e17552"
│ },
│ Code_: "InvalidParams",
│ Message_: "Sorry, you cannot request a specific availability zone for a High Availability database"
│ }
│
│ with aws_lightsail_database.this,
│ on main.tf line 43, in resource "aws_lightsail_database" "this":
│ 43: resource "aws_lightsail_database" "this" {
│
╵
Expected Behavior
Being able to create the HA Lightsail Database.
Actual Behavior
Breaks because aws_lightsail_database
mandates the presence of availability_zone
parameter, which receives a string and can't receive a list to handle more than one AZ.
Steps to Reproduce
terraform apply
Important Factoids
None.
References
None.