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_iam_policy_document: Add version argument #5304

Closed
wants to merge 1 commit into from

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jul 23, 2018

Closes #744

Changes proposed in this pull request:

  • Supports creating 2008-10-17 version IAM policy documents as the structure is the same as 2012-10-17

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSDataSourceIAMPolicyDocument'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSDataSourceIAMPolicyDocument -timeout 120m
=== RUN   TestAccAWSDataSourceIAMPolicyDocument_basic
--- PASS: TestAccAWSDataSourceIAMPolicyDocument_basic (9.57s)
=== RUN   TestAccAWSDataSourceIAMPolicyDocument_source
--- PASS: TestAccAWSDataSourceIAMPolicyDocument_source (12.37s)
=== RUN   TestAccAWSDataSourceIAMPolicyDocument_sourceConflicting
--- PASS: TestAccAWSDataSourceIAMPolicyDocument_sourceConflicting (9.17s)
=== RUN   TestAccAWSDataSourceIAMPolicyDocument_override
--- PASS: TestAccAWSDataSourceIAMPolicyDocument_override (7.61s)
=== RUN   TestAccAWSDataSourceIAMPolicyDocument_Version_20081017
--- PASS: TestAccAWSDataSourceIAMPolicyDocument_Version_20081017 (7.89s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	47.194s

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/iam Issues and PRs that pertain to the iam service. labels Jul 23, 2018
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Jul 23, 2018
@bflad bflad requested a review from a team July 23, 2018 20:54
Optional: true,
Default: "2012-10-17",
ValidateFunc: validation.StringInSlice([]string{
"2008-10-17",
Copy link
Contributor

Choose a reason for hiding this comment

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

If this version is selected then AWS won't accept interpolated variables, so perhaps we should then produce an error if the user attempts to use our custom &{...} variable syntax with that version number selected... otherwise we'll replace the &{...} with ${...} but then that new form will just be interpreted literally.

Choose a reason for hiding this comment

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

Would still want to keep the lack of a version to provide the 'latest' for people that want to ensure they are already on the latest version, just looking to ensure that if people want to either lock-in or need to utilize an older version are able to do so. Thanks!

@bflad
Copy link
Contributor Author

bflad commented Dec 4, 2018

Replaced by #6699

@bflad bflad closed this Dec 4, 2018
@bflad bflad deleted the f-aws_iam_policy_document-version branch December 4, 2018 05:24
@ghost
Copy link

ghost commented Apr 2, 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 and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/iam Issues and PRs that pertain to the iam service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Version Selection in policy_document data sources
3 participants