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

data-source/aws_rds_orderable_db_instance: New data source #14834

Closed
YakDriver opened this issue Aug 25, 2020 · 2 comments · Fixed by #14853
Closed

data-source/aws_rds_orderable_db_instance: New data source #14834

YakDriver opened this issue Aug 25, 2020 · 2 comments · Fixed by #14853
Labels
new-data-source Introduces a new data source. partition/aws-us-gov Pertains to the aws-us-gov partition. service/rds Issues and PRs that pertain to the rds service.

Comments

@YakDriver
Copy link
Member

YakDriver commented Aug 25, 2020

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

Relates #14882, Fixed by #14853

Description

Knowing which combinations of DB instance class, engine, engine version, and license model are available is non-trivial especially in GovCloud and other specialty partitions. For example, attempting to use a t3.small on GovCloud, a valid option for us-west-2 in the standard partition, gives this error:

Error creating DB Instance: InvalidParameterCombination: RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.t3.small, Engine=mysql, EngineVersion=5.6.41, LicenseModel=general-public-license. For supported combinations of instance class and database engine version, see the documentation.

I envision something similar to aws_ec2_instance_type_offering.

New or Affected Resource(s)

  • aws_rds_orderable_db_instance

Potential Terraform Configuration

data "aws_rds_orderable_db_instance" "test" {
  availability_zone_group = "us-west-2-lax-1"
  db_instance_class = "db.t2.small"
  engine = "mysql"
  engine_version = "5.7"
  license_model = "general-public-license"

  preferred_instance_types = ["t3.micro", "t2.micro"]
}

resource "aws_db_instance" "source" {
  allocated_storage   = 5
  engine              = data.aws_rds_orderable_db_instance.test.engine    # "mysql"
  engine_version      = data.aws_rds_orderable_db_instance.test.engine_version    # "5.7.22"
  identifier          = "db-source"
  instance_class      = data.aws_rds_orderable_db_instance.test.instance_class    # "db.m3.medium"
  password            = "avoid-plaintext-passwords"
  username            = "tfacctest"
  skip_final_snapshot = true
}

References

@YakDriver YakDriver added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 25, 2020
@ghost ghost added the service/rds Issues and PRs that pertain to the rds service. label Aug 25, 2020
@bflad bflad added new-data-source Introduces a new data source. and removed enhancement Requests to existing resources that expand the functionality or scope. labels Aug 25, 2020
@bflad
Copy link
Contributor

bflad commented Aug 25, 2020

Looks like Filter isn't supported yet for DescribeOrderableDBInstanceOptions 🙁 , so we will want to fallback to regular ole arguments, e.g.

data "aws_rds_orderable_db_instance" "example" {
  # API supported examples
  availability_zone_group = "us-west-2-lax-1"
  db_instance_class = "db.t2.small"
  engine = "mysql"
  engine_version = "5.7"
  license_model = "general-public-license"

  # Cake icing
  preferred_db_instance_classes = ["db.t2.small", "db.t3.small"]
}

@ghost
Copy link

ghost commented Oct 1, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Oct 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-data-source Introduces a new data source. partition/aws-us-gov Pertains to the aws-us-gov partition. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants