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

[WIP] New resource aws_db_proxy_target #12784

Merged
merged 6 commits into from
Oct 1, 2020

Conversation

gazoakley
Copy link
Contributor

@gazoakley gazoakley commented Apr 12, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

Relates #12690

Release note for CHANGELOG:

**New Resource:** `aws_db_proxy_target` (#12784)

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSDBProxyTarget_'

...

@gazoakley gazoakley requested a review from a team April 12, 2020 13:05
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/rds Issues and PRs that pertain to the rds service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 12, 2020
@teamterraform
Copy link

Notification of Recent and Upcoming Changes to Contributions

Thank you for this contribution! There have been a few recent development changes that affect this pull request. We apologize for the inconvenience, especially if there have been long review delays up until now. Please note that this is automated message from an unmonitored account. See the FAQ for additional information on the maintainer team and review prioritization.

If you are unable to complete these updates, please leave a comment for the community and maintainers so someone can potentially continue the work. The maintainers will encourage other contributors to use the existing contribution as the base for additional changes as appropriate. Otherwise, contributions that do not receive updated code or comments from the original contributor may be closed in the future so the maintainers can focus on active items.

For the most up to date information about Terraform AWS Provider development, see the Contributing Guide. Additional technical debt changes can be tracked with the technical-debt label on issues.

As part of updating a pull request with these changes, the most current unit testing and linting will run. These may report issues that were not previously reported.

Terraform 0.12 Syntax

Reference: #8950
Reference: #14417

Version 3 and later of the Terraform AWS Provider, which all existing contributions would potentially be added, only supports Terraform 0.12 and later. Certain syntax elements of Terraform 0.11 and earlier show deprecation warnings during runs with Terraform 0.12. Documentation and test configurations, such as those including deprecated string interpolations (some_attribute = "${aws_service_thing.example.id}") should be updated to the newer syntax (some_attribute = aws_service_thing.example.id). Contribution testing will automatically fail on older syntax in the near future. Please see the referenced issues for additional information.

Action Required: Terraform Plugin SDK Version 2

Reference: #14551

The Terraform AWS Provider has been upgraded to the latest version of the Terraform Plugin SDK. Generally, most changes to contributions should only involve updating Go import paths in source code files. Please see the referenced issue for additional information.

Action Required: Removal of website/aws.erb File

Reference: #14712

Any changes to the website/aws.erb file are no longer necessary and should be removed from this contribution to prevent merge issues in the near future when the file is removed from the repository. Please see the referenced issue for additional information.

Upcoming Change of Git Branch Naming

Reference: #14292

Development environments will need their upstream Git branch updated from master to main in the near future. Please see the referenced issue for additional information and scheduling.

Upcoming Change of GitHub Organization

Reference: #14715

This repository will be migrating from https://github.com/terraform-providers/terraform-provider-aws to https://github.com/hashicorp/terraform-provider-aws. No practitioner or developer action is anticipated and most GitHub functionality will automatically redirect to the new location. Go import paths including terraform-providers can remain for now. Please see the referenced issue for additional information and scheduling.

@bflad bflad added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 25, 2020
@bryantbiggs
Copy link
Contributor

@bflad any chance we can get this in 3.6.0 - the aws_rds_proxy resource is not usuable without the target group unfortuantely

@bflad
Copy link
Contributor

bflad commented Sep 4, 2020

@gazoakley since the aws_db_proxy_default_target_group resource is not required to implement this resource (e.g. you can hardcode target_group_name = "default" in the testing, it'll still get the right dependency ordering from db_proxy_name = aws_db_proxy.test.name), we can separately test and work through this review if you want by rebasing those changes out of this. 👍

@bryantbiggs it should be usable to manage any RDS DB Proxy itself 😉 , but yes it is understood that end-to-end management is not yet possible (that would be the closing of the tracking issue #12690). Since this is a community driven effort we cannot provide a guarantee on timeframes unless the contributor becomes unresponsive and the maintainers take over. The note above would speed things up here though. Larger functionality in this project is always broken up into more iterative pieces so we can work through reviews and release functionality faster than releasing it all at once.

@bflad bflad self-assigned this Sep 4, 2020
@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Sep 4, 2020
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/XXL Managed by automation to categorize the size of a PR. labels Sep 5, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some relatively minor items then should be good to go, thank you @gazoakley 😄

aws/resource_aws_db_proxy_target.go Outdated Show resolved Hide resolved
aws/resource_aws_db_proxy_target.go Outdated Show resolved Hide resolved
aws/resource_aws_db_proxy_target.go Outdated Show resolved Hide resolved
aws/resource_aws_db_proxy_target.go Outdated Show resolved Hide resolved
aws/resource_aws_db_proxy_target.go Outdated Show resolved Hide resolved
aws/resource_aws_db_proxy_target.go Outdated Show resolved Hide resolved
aws/resource_aws_db_proxy_target.go Outdated Show resolved Hide resolved
resource.TestMatchResourceAttr(resourceName, "endpoint", regexp.MustCompile(`^[\w\-\.]+\.rds\.amazonaws\.com$`)),
resource.TestCheckResourceAttr(resourceName, "port", "3306"),
resource.TestCheckResourceAttr(resourceName, "rds_resource_id", rName),
// resource.TestCheckResourceAttrPair(resourceName, "target_arn", "aws_db_instance.test", "arn"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented testing should be removed or fixed. 👍

Comment on lines +63 to +64
// resource.TestCheckResourceAttrPair(resourceName, "target_arn", "aws_rds_cluster.test", "arn"),
// resource.TestCheckResourceAttr(resourceName, "tracked_cluster_id", rName),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

website/docs/r/db_proxy_target.html.markdown Outdated Show resolved Hide resolved
@swagsb
Copy link

swagsb commented Sep 15, 2020

Hi,

When will this be released ?

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 15, 2020
@bflad
Copy link
Contributor

bflad commented Sep 15, 2020

Hi @swagsb 👋 There is no definitive release date yet. We will update the pull request milestone if/when there is a specific release. Please do note though that this pull request is covered by the August - October 2020 Roadmap. Given I just provided a review yesterday with only some minor items, it will be under final review/merge when the above items have been addressed or our typical handling of within the next two weeks if there is no response.

@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Sep 15, 2020
@bflad bflad added this to the v3.9.0 milestone Sep 30, 2020
@bflad
Copy link
Contributor

bflad commented Oct 1, 2020

Hi @gazoakley 👋 Since we didn't hear back from you, we picked up finishing this pull request so it can be released this week. The biggest change not noted in the review above was also including the target type in the resource identifier and lookups since cluster handling is confusing under the hood as RDS will create two targets (one TRACKING_CLUSTER and one RDS_INSTANCE pointing to the primary cluster instance) and since we do not want to potentially match the wrong one. After that seemed to work well. Thanks so much. 🚀

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSDBProxyTarget_Cluster (567.33s)
--- PASS: TestAccAWSDBProxyTarget_disappears (598.96s)
--- PASS: TestAccAWSDBProxyTarget_Instance (648.21s)

Output from acceptance testing in AWS GovCloud (US):

--- SKIP: TestAccAWSDBProxyTarget_Instance (2.24s)
--- SKIP: TestAccAWSDBProxyTarget_Cluster (2.24s)
--- SKIP: TestAccAWSDBProxyTarget_disappears (2.24s)

bflad added a commit that referenced this pull request Oct 1, 2020
@bflad bflad merged commit e49d0cf into hashicorp:master Oct 1, 2020
@ghost
Copy link

ghost commented Oct 2, 2020

This has been released in version 3.9.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 Oct 31, 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 31, 2020
@breathingdust breathingdust removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/rds Issues and PRs that pertain to the rds service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants