-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Added the aws resource glue resource policy #10361
Added the aws resource glue resource policy #10361
Conversation
Hi @stijndehaes |
@lucienfregosi Thank you for reminding me :) Rebased and will follow up the PR tomorrow and see if I can fix the Travis issues. I can't get this PR merged though we would have to get the attention form someone from Hashicorp for that. Feel free to review my PR in the mean time :) |
Build got fixed ready for review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @stijndehaes 👋 Thank you for submitting this. Overall this is shaping up, please see the below for information about fixing the testing and getting this ready for merge. 👍
@bflad I updated the code an reran the acceptance tests:
Everything seems to be working now :) Thank you very much for the pointers on the tests and thanks for the review. |
Rebased again, and also fixed the formatting :) |
Rebased this branch to the latest master commit |
Also reran acceptance tests:
|
Notification of Recent and Upcoming Changes to ContributionsThank 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 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 SyntaxReference: #8950 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 ( Action Required: Terraform Plugin SDK Version 2Reference: #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 FileReference: #14712 Any changes to the Upcoming Change of Git Branch NamingReference: #14292 Development environments will need their upstream Git branch updated from Upcoming Change of GitHub OrganizationReference: #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 |
Hey @stijndehaes, do you mind rebasing again and fixing things up according to the bot message above? on another note, can you add the |
Hey I will update my PR and I'll have to look into |
Hey @stijndehaes, are you still lokking into this? |
I will make the time to do this next week :) It's not hard to add I just have to make sure I make the right integration test |
@DrFaust92 I had a look at adding
results in the following error: So I don't think this field is supported yet for glue. I also don't find any mention anywere for setting resource policies on database or tables in the documentation. |
Hey @stijndehaes, if so whats the use case for the general policy? |
@DrFaust92 I've been watching this PR for a wee while as I need to allow glue catalog access from another AWS account. |
@DrFaust92 same as @ferrouswheel here |
The general policy just allows you to set access to the catalog and all the databases/tables that are under the catalog. |
Hey @stijndehaes, when you have time I just noticed a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some more comments,
After running tests I realised we need to serialize tests: see example
Created the serialize tests, also changed the tests to Output of integration tests: ➜ terraform-provider-aws git:(feature/aws-glue-data-catalog-resource-policy) ✗ make testacc TESTARGS='-run=TestAccAWSGlue_serial'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGlue_serial -timeout 120m
=== RUN TestAccAWSGlue_serial
=== RUN TestAccAWSGlue_serial/ResourcePolicy
=== RUN TestAccAWSGlue_serial/ResourcePolicy/basic
=== RUN TestAccAWSGlue_serial/ResourcePolicy/update
=== RUN TestAccAWSGlue_serial/ResourcePolicy/disappears
--- PASS: TestAccAWSGlue_serial (103.45s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy (103.45s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/basic (29.37s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/update (48.87s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/disappears (25.21s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 105.155s |
Fixed the last linting error everything is green now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
--- PASS: TestAccAWSGlue_serial (141.95s) --- PASS: TestAccAWSGlue_serial/ResourcePolicy (141.95s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/basic (39.27s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/update (69.54s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/disappears (33.13s)
LGTM 🚀 Thanks @stijndehaes! Verified Acceptance Tests in Commercial (us-west-2) make testacc TEST=./aws TESTARGS='-run=TestAccAWSGlue_serial'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGlue_serial -timeout 120m
=== RUN TestAccAWSGlue_serial
=== RUN TestAccAWSGlue_serial/ResourcePolicy
=== RUN TestAccAWSGlue_serial/ResourcePolicy/disappears
=== RUN TestAccAWSGlue_serial/ResourcePolicy/basic
=== RUN TestAccAWSGlue_serial/ResourcePolicy/update
--- PASS: TestAccAWSGlue_serial (59.41s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy (59.41s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/disappears (14.40s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/basic (15.77s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/update (29.25s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 60.858s Verified Acceptance Tests in GovCloud (us-gov-west-1) make testacc TEST=./aws TESTARGS='-run=TestAccAWSGlue_serial'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGlue_serial -timeout 120m
=== RUN TestAccAWSGlue_serial
=== RUN TestAccAWSGlue_serial/ResourcePolicy
=== RUN TestAccAWSGlue_serial/ResourcePolicy/disappears
=== RUN TestAccAWSGlue_serial/ResourcePolicy/basic
=== RUN TestAccAWSGlue_serial/ResourcePolicy/update
--- PASS: TestAccAWSGlue_serial (37.45s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy (37.45s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/disappears (9.15s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/basic (10.65s)
--- PASS: TestAccAWSGlue_serial/ResourcePolicy/update (17.65s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 38.817s |
This has been released in version 3.13.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! |
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! |
Community Note
Release note for CHANGELOG:
Output from acceptance testing:
If someone could help me with the test setup of the acceptance tests that would be nice. I added the environment variable
AWS_PROFILE
and the acceptance tests get access to aws. However it can not read the account id from the test provider. So I manually added in the policy to run the test and removed it after account. Anyone can help me with my setup?Also since this is my first PR please help me with anything I forgot to add.