Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Lightsail Database (HA) fails to create #26137

Closed
include opened this issue Aug 5, 2022 · 4 comments · Fixed by #28590
Closed

AWS Lightsail Database (HA) fails to create #26137

include opened this issue Aug 5, 2022 · 4 comments · Fixed by #28590
Labels
bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/lightsail Issues and PRs that pertain to the lightsail service.
Milestone

Comments

@include
Copy link

include commented Aug 5, 2022

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

  1. terraform apply

Important Factoids

None.

References

None.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/lightsail Issues and PRs that pertain to the lightsail service. labels Aug 5, 2022
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 22, 2022
@dpattmann
Copy link
Contributor

Hi @include,

I took a closer look into this issue and it is not allowed to specify availability_zone when using HA bundle_ids. However, currently availability_zone is a required parameter. I created a PR to change this to optional.

@mad-drag
Copy link

Hello,

Any update about this issue ?

@github-actions
Copy link

github-actions bot commented Jan 5, 2023

This functionality has been released in v4.49.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Feb 5, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/lightsail Issues and PRs that pertain to the lightsail service.
Projects
None yet
4 participants