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

r/aws_iam_role_policies_exclusive: new resource #39203

Merged
merged 3 commits into from
Sep 17, 2024
Merged

Commits on Sep 16, 2024

  1. r/aws_iam_role_policies_exclusive: new resource

    This resource will enable exclusive management of inline policy assignments to an IAM role. This functions similar to the `inline_policy` blocks when defined on the `aws_iam_role` resource, but as a standalone resource.
    
    ```console
    % make testacc PKG=iam TESTS=TestAccIAMRolePoliciesExclusive_
    make: Verifying source code with gofmt...
    ==> Checking that code complies with gofmt requirements...
    TF_ACC=1 go1.23.0 test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMRolePoliciesExclusive_'  -timeout 360m
    
    --- PASS: TestAccIAMRolePoliciesExclusive_empty (13.72s)
    --- PASS: TestAccIAMRolePoliciesExclusive_disappears_Role (13.72s)
    --- PASS: TestAccIAMRolePoliciesExclusive_basic (15.84s)
    --- PASS: TestAccIAMRolePoliciesExclusive_multiple (24.25s)
    PASS
    ok      github.com/hashicorp/terraform-provider-aws/internal/service/iam        30.454s
    ```
    jar-b committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    b021a90 View commit details
    Browse the repository at this point in the history
  2. r/aws_iam_role: deprecate inline_policy argument

    With the introduction of the `aws_iam_role_policies_exclusive` resource, the provider now has parity with the behavior of the existing `inline_policy` argument. To encourage a single pattern for managing inline policy associations, the inline argument on the role resource is now deprecated. Due to this resources popularity it is undetermined whether the argument will be fully removed in a future major version, but the deprecation warning allows maintainers to direct users to a preferred pattern.
    jar-b committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    322dbf3 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. r/aws_iam_role_policies_exclusive(test): add out of band tests

    Adds tests to cover out of band additions and removals of inline policies.
    
    ```console
    % make testacc PKG=iam TESTS=TestAccIAMRolePoliciesExclusive_
    make: Verifying source code with gofmt...
    ==> Checking that code complies with gofmt requirements...
    TF_ACC=1 go1.22.6 test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMRolePoliciesExclusive_'  -timeout 360m
    
    --- PASS: TestAccIAMRolePoliciesExclusive_empty (15.28s)
    --- PASS: TestAccIAMRolePoliciesExclusive_disappears_Role (15.33s)
    --- PASS: TestAccIAMRolePoliciesExclusive_basic (17.58s)
    --- PASS: TestAccIAMRolePoliciesExclusive_outOfBandAddition (24.33s)
    --- PASS: TestAccIAMRolePoliciesExclusive_outOfBandRemoval (24.34s)
    --- PASS: TestAccIAMRolePoliciesExclusive_multiple (26.37s)
    PASS
    ok      github.com/hashicorp/terraform-provider-aws/internal/service/iam        32.643s
    ```
    jar-b committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    2587303 View commit details
    Browse the repository at this point in the history