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

resource/aws_iam_service_linked_role: Automatically suppress Application Autoscaling custom_suffix differences #8931

Merged
merged 1 commit into from
Jun 10, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jun 10, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #4439

Release note for CHANGELOG:

* resource/aws_iam_service_linked_role: Automatically suppress Application Autoscaling custom_suffix differences

IAM Service Linked Roles for Application Autoscaling are slightly different than others since they use a fourth level domain then automatically add a custom_suffix, which is not compatible to specify during creation. Reference: https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-service-linked-roles.html

Previously:

--- FAIL: TestAccAWSIAMServiceLinkedRole_CustomSuffix_DiffSuppressFunc (17.09s)
    testing.go:568: Step 0 error: After applying this step, the plan was not empty:

        DIFF:

        DESTROY/CREATE: aws_iam_service_linked_role.test
          arn:              "arn:aws:iam::--OMITTED--:role/aws-service-role/custom-resource.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_CustomResource" => "<computed>"
          aws_service_name: "custom-resource.application-autoscaling.amazonaws.com" => "custom-resource.application-autoscaling.amazonaws.com"
          create_date:      "" => "<computed>"
          custom_suffix:    "CustomResource" => "" (forces new resource)
          description:      "" => ""
          id:               "arn:aws:iam::--OMITTED--:role/aws-service-role/custom-resource.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_CustomResource" => "<computed>"
          name:             "AWSServiceRoleForApplicationAutoScaling_CustomResource" => "<computed>"
          path:             "/aws-service-role/custom-resource.application-autoscaling.amazonaws.com/" => "<computed>"
          unique_id:        "AROASXIXB4ZJ7W7CHKUUX" => "<computed>"

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSIAMServiceLinkedRole_basic (19.36s)
--- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix_DiffSuppressFunc (19.78s)
--- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix (19.80s)
--- PASS: TestAccAWSIAMServiceLinkedRole_Description (22.87s)

Output from acceptance testing in AWS GovCloud (US) (now passing with usage of testAccCheckResourceAttrGlobalARN):

--- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix_DiffSuppressFunc (25.54s)
--- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix (25.58s)
--- PASS: TestAccAWSIAMServiceLinkedRole_basic (26.78s)
--- PASS: TestAccAWSIAMServiceLinkedRole_Description (34.22s)

…ion Autoscaling custom_suffix differences

Reference: #4439

Previously:

```
--- FAIL: TestAccAWSIAMServiceLinkedRole_CustomSuffix_DiffSuppressFunc (17.09s)
    testing.go:568: Step 0 error: After applying this step, the plan was not empty:

        DIFF:

        DESTROY/CREATE: aws_iam_service_linked_role.test
          arn:              "arn:aws:iam::--OMITTED--:role/aws-service-role/custom-resource.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_CustomResource" => "<computed>"
          aws_service_name: "custom-resource.application-autoscaling.amazonaws.com" => "custom-resource.application-autoscaling.amazonaws.com"
          create_date:      "" => "<computed>"
          custom_suffix:    "CustomResource" => "" (forces new resource)
          description:      "" => ""
          id:               "arn:aws:iam::--OMITTED--:role/aws-service-role/custom-resource.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_CustomResource" => "<computed>"
          name:             "AWSServiceRoleForApplicationAutoScaling_CustomResource" => "<computed>"
          path:             "/aws-service-role/custom-resource.application-autoscaling.amazonaws.com/" => "<computed>"
          unique_id:        "AROASXIXB4ZJ7W7CHKUUX" => "<computed>"
```

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAWSIAMServiceLinkedRole_basic (19.36s)
--- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix_DiffSuppressFunc (19.78s)
--- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix (19.80s)
--- PASS: TestAccAWSIAMServiceLinkedRole_Description (22.87s)
```

Output from acceptance testing in AWS GovCloud (US) (now passing with usage of `testAccCheckResourceAttrGlobalARN`):

```
--- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix_DiffSuppressFunc (25.54s)
--- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix (25.58s)
--- PASS: TestAccAWSIAMServiceLinkedRole_basic (26.78s)
--- PASS: TestAccAWSIAMServiceLinkedRole_Description (34.22s)
```
@bflad bflad added bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service. labels Jun 10, 2019
@bflad bflad requested a review from a team June 10, 2019 19:23
@ghost ghost added size/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jun 10, 2019
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

LGTM

@bflad bflad added this to the v2.15.0 milestone Jun 10, 2019
@bflad bflad merged commit 0a04f07 into master Jun 10, 2019
@bflad bflad deleted the b-aws_iam_service_linked_role-appautoscaling branch June 10, 2019 23:37
bflad added a commit that referenced this pull request Jun 10, 2019
@ghost
Copy link

ghost commented Nov 3, 2019

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 Nov 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service. size/S 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
2 participants