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

New resource aws_db_proxy #12704

Merged
merged 18 commits into from
Sep 1, 2020
Merged

New resource aws_db_proxy #12704

merged 18 commits into from
Sep 1, 2020

Conversation

gazoakley
Copy link
Contributor

@gazoakley gazoakley commented Apr 7, 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` (#12704)

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSDBProxy'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSDBProxy -timeout 120m
=== RUN   TestAccAWSDBProxy_basic
=== PAUSE TestAccAWSDBProxy_basic
=== RUN   TestAccAWSDBProxy_Name
=== PAUSE TestAccAWSDBProxy_Name
=== RUN   TestAccAWSDBProxy_DebugLogging
=== PAUSE TestAccAWSDBProxy_DebugLogging
=== RUN   TestAccAWSDBProxy_IdleClientTimeout
=== PAUSE TestAccAWSDBProxy_IdleClientTimeout
=== RUN   TestAccAWSDBProxy_RequireTls
=== PAUSE TestAccAWSDBProxy_RequireTls
=== RUN   TestAccAWSDBProxy_RoleArn
=== PAUSE TestAccAWSDBProxy_RoleArn
=== RUN   TestAccAWSDBProxy_VpcSecurityGroupIds
=== PAUSE TestAccAWSDBProxy_VpcSecurityGroupIds
=== RUN   TestAccAWSDBProxy_AuthDescription
=== PAUSE TestAccAWSDBProxy_AuthDescription
=== RUN   TestAccAWSDBProxy_AuthIamAuth
=== PAUSE TestAccAWSDBProxy_AuthIamAuth
=== RUN   TestAccAWSDBProxy_AuthSecretArn
=== PAUSE TestAccAWSDBProxy_AuthSecretArn
=== RUN   TestAccAWSDBProxy_Tags
=== PAUSE TestAccAWSDBProxy_Tags
=== RUN   TestAccAWSDBProxy_disappears
=== PAUSE TestAccAWSDBProxy_disappears
=== CONT  TestAccAWSDBProxy_basic
=== CONT  TestAccAWSDBProxy_AuthDescription
=== CONT  TestAccAWSDBProxy_disappears
=== CONT  TestAccAWSDBProxy_Name
=== CONT  TestAccAWSDBProxy_Tags
=== CONT  TestAccAWSDBProxy_AuthSecretArn
=== CONT  TestAccAWSDBProxy_RequireTls
=== CONT  TestAccAWSDBProxy_VpcSecurityGroupIds
=== CONT  TestAccAWSDBProxy_AuthIamAuth
=== CONT  TestAccAWSDBProxy_DebugLogging
=== CONT  TestAccAWSDBProxy_RoleArn
=== CONT  TestAccAWSDBProxy_IdleClientTimeout
--- PASS: TestAccAWSDBProxy_RequireTls (623.25s)
--- PASS: TestAccAWSDBProxy_AuthDescription (625.89s)
--- PASS: TestAccAWSDBProxy_RoleArn (679.06s)
--- PASS: TestAccAWSDBProxy_Tags (683.25s)
--- PASS: TestAccAWSDBProxy_VpcSecurityGroupIds (701.85s)
--- PASS: TestAccAWSDBProxy_DebugLogging (705.47s)
--- PASS: TestAccAWSDBProxy_AuthSecretArn (716.97s)
    TestAccAWSDBProxy_disappears: resource_aws_db_proxy_test.go:452: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSDBProxy_disappears (749.58s)
--- PASS: TestAccAWSDBProxy_basic (754.80s)
--- PASS: TestAccAWSDBProxy_AuthIamAuth (758.51s)
--- PASS: TestAccAWSDBProxy_Name (817.91s)
--- PASS: TestAccAWSDBProxy_IdleClientTimeout (824.83s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	828.363s

@gazoakley gazoakley requested a review from a team April 7, 2020 07:31
@ghost ghost added size/XL 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. labels Apr 7, 2020
@ghost ghost added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Apr 7, 2020
@mwarkentin
Copy link
Contributor

@gazoakley FYI, postgres support in RDS proxy just landed: https://aws.amazon.com/about-aws/whats-new/2020/04/amazon-rds-proxy-with-postgresql-compatibility-preview/

aws/resource_aws_db_proxy.go Outdated Show resolved Hide resolved
@gazoakley gazoakley changed the title [WIP] New resource aws_db_proxy New resource aws_db_proxy Apr 12, 2020
@bigwheel
Copy link
Contributor

Im waiting this resource but there is no action in 50 days.
I think code looks fine. What is blocker ? Can I help it ?

@cmardonespino
Copy link

when this PR will be merged !? we want it !

@bflad bflad added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 7, 2020
@dturnbu
Copy link

dturnbu commented Jul 29, 2020

What will it take to get this PR approved and merged?? My team and I are blocked because we need the functionality this almost 6 month old PR would provide.

@bryantbiggs
Copy link
Contributor

Bump, please 🙏 !

@2kohm
Copy link

2kohm commented Aug 3, 2020

Bump, please ❤️

Copy link
Member

@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.

Getting pretty close -- just noting the remaining pending review items. I think we would like to get this released next week on Thursday, so please reach out if you need anything or do not have time to finish this up.

aws/resource_aws_db_proxy.go Show resolved Hide resolved
aws/resource_aws_db_proxy.go Outdated Show resolved Hide resolved
aws/resource_aws_db_proxy.go Outdated Show resolved Hide resolved
website/docs/r/db_proxy.html.markdown Outdated Show resolved Hide resolved
@bflad bflad modified the milestones: Roadmap, v3.5.0 Aug 28, 2020
@gazoakley
Copy link
Contributor Author

@bflad Since merging in master/main and applying the review changes I've not been able to run the tests. I think I'm going mad!:

% make testacc TESTARGS='-run=TestAccAWSDBProxy_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSDBProxy_basic -timeout 120m
=== RUN   TestAccAWSDBProxy_basic
=== PAUSE TestAccAWSDBProxy_basic
=== CONT  TestAccAWSDBProxy_basic
    TestAccAWSDBProxy_basic: resource_aws_db_proxy_test.go:72: Step 1/2 error: terraform failed: exit status 1
        
        stderr:
        
        Error: Invalid resource type
        
          on ../../../../../../../../var/folders/2s/3wc1k7tn12j6vnlcy7y2_dxr0000gn/T/tftest583229212/work570159051/config120517679/terraform_plugin_test.tf line 2, in resource "aws_db_proxy" "test":
           2: resource "aws_db_proxy" "test" {
        
        The provider provider.aws does not support resource type "aws_db_proxy".
        
--- FAIL: TestAccAWSDBProxy_basic (18.07s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	21.957s
FAIL
make: *** [testacc] Error 1

Yet if I build the provider and try and use it I get a successful apply. Is there anything obvious I've screwed up? :-)

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Aug 29, 2020
@bflad
Copy link
Member

bflad commented Aug 29, 2020

Do you have Terraform 0.12.26 or later installed locally by chance? I think the newer test driver that uses real Terraform binaries may act a little strange on versions earlier than that. If you are on an okay version then I can certainly ask around.

@gazoakley
Copy link
Contributor Author

Do you have Terraform 0.12.26 or later installed locally by chance? I think the newer test driver that uses real Terraform binaries may act a little strange on versions earlier than that. If you are on an okay version then I can certainly ask around.

Ah - I was still on 0.12.24. Just upgraded to 0.13.1 and now seems to work fine - d'oh! 🍩

@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. and removed size/XL Managed by automation to categorize the size of a PR. labels Aug 31, 2020
Copy link
Member

@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.

Thanks so much for all your hard work here, @gazoakley, looks good to me 🚀

Output from acceptance testing:

--- PASS: TestAccAWSDBProxy_disappears (744.42s)
--- PASS: TestAccAWSDBProxy_AuthDescription (755.17s)
--- PASS: TestAccAWSDBProxy_Tags (763.39s)
--- PASS: TestAccAWSDBProxy_basic (764.74s)
--- PASS: TestAccAWSDBProxy_AuthSecretArn (765.79s)
--- PASS: TestAccAWSDBProxy_VpcSecurityGroupIds (819.88s)
--- PASS: TestAccAWSDBProxy_DebugLogging (824.05s)
--- PASS: TestAccAWSDBProxy_RequireTls (826.22s)
--- PASS: TestAccAWSDBProxy_RoleArn (833.73s)
--- PASS: TestAccAWSDBProxy_IdleClientTimeout (838.79s)
--- PASS: TestAccAWSDBProxy_Name (862.25s)
--- PASS: TestAccAWSDBProxy_AuthIamAuth (895.23s)

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

ghost commented Sep 3, 2020

This has been released in version 3.5.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!

@swagsb
Copy link

swagsb commented Sep 9, 2020

Hi ,

the documenation says terraform only supports this resource for MYSQL . When will the support for POSTGRESQL be added ?

engine_family - (Required, Forces new resource) The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. Currently, this value is always MYSQL. The engine family applies to both RDS MySQL and Aurora MySQL.

@gazoakley
Copy link
Contributor Author

Hi @swagsb - the good news is the resource should already support PostgreSQL (specify it as POSTGRESQL). The bad news is the docs need updating 🤦 ! There is still work in progress to allow registering targets for DB proxies, so I think we can add it in there (or I'll create a separate PR)

@swagsb
Copy link

swagsb commented Sep 9, 2020

Hi @swagsb - the good news is the resource should already support PostgreSQL (specify it as POSTGRESQL). The bad news is the docs need updating 🤦 ! There is still work in progress to allow registering targets for DB proxies, so I think we can add it in there (or I'll create a separate PR)

so is there a resource available like - aws_db_proxy_default_target_group ? . I mean how to add targets to the proxy ? Is that is what you said is in progress

Is it this - #12743 ?

@gazoakley
Copy link
Contributor Author

Hi @swagsb

so is there a resource available like - aws_db_proxy_default_target_group ? . I mean how to add targets to the proxy ? Is that is what you said is in progress

Is it this - #12743 ?

There are two in progress PRs:

@swagsb
Copy link

swagsb commented Sep 11, 2020

  • aws_db_proxy_target

aws_db_proxy_target : Thanks for the reply . I guess I am looking for #12784 - aws_db_proxy_target. Any idea when it will be live ?
(** Sorry for chasing)

@nirsv
Copy link

nirsv commented Sep 17, 2020

Can I use the aws_db_proxy without have the aws_db_proxy_target?

@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
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/XXL 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.

None yet