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

connection_pool_config is said to be optional for aws_db_proxy_default_target_group resource, but result in a fail if absent #16285

Closed
Porkepix opened this issue Nov 18, 2020 · 2 comments · Fixed by #16303
Assignees
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@Porkepix
Copy link

Porkepix commented Nov 18, 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

Terraform CLI and Terraform AWS Provider Version

Terraform v0.13.5

  • provider registry.terraform.io/hashicorp/aws v3.15.0

Affected Resource(s)

  • aws_db_proxy_default_target_group

Terraform Configuration Files

resource "aws_db_proxy_default_target_group" "rds-proxy-default-target-group" {
  db_proxy_name = aws_db_proxy.rds-proxy.name

  # connection_pool_config {
    # connection_borrow_timeout    = 120
    # init_query                   = "SET x=1, y=2"
    # max_connections_percent      = 100
    # max_idle_connections_percent = 50
    # session_pinning_filters      = ["EXCLUDE_VARIABLE_SETS"]
 #  }
}

Expected Behavior

The documentation at https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_proxy_default_target_group state that connection_pool_config is optional. This means we should be able to declare the resource with only required arguments, ie. only db_proxy_name.

However, not setting it result in this kind of error:

Error: Required attribute is not set

  on rds_proxy.tf line 92, in resource "aws_db_proxy_default_target_group" "rds-proxy-default-target-group":
  92: resource "aws_db_proxy_default_target_group" "rds-proxy-default-target-group" {

Declaring the block, even empty makes terraform able to pass.
Therefore, either the documentation have to be corrected to correctly state what's required or not, either the code shouldn't fail if optional arguments are not provided.

Steps to Reproduce

Pick documentation's example about aws_db_proxy_default_target_group but get rid of everythings marked as optional (ie. everything excepted the db_proxy_name)

@ghost ghost added the service/rds Issues and PRs that pertain to the rds service. label Nov 18, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 18, 2020
@gdavison gdavison self-assigned this Nov 19, 2020
@gdavison gdavison added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 19, 2020
@github-actions github-actions bot added this to the v3.18.0 milestone Nov 24, 2020
@ghost
Copy link

ghost commented Nov 25, 2020

This has been released in version 3.18.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 for triage. Thanks!

@ghost
Copy link

ghost commented Dec 25, 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 Dec 25, 2020
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. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
2 participants