Skip to content

Manage licensemanager IAM Service Linked Role in Shared Acceptance Testing Configuration #16178

@bflad

Description

@bflad

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The License Manager service requires the creation of its IAM Service-Linked Role before operations can work. e.g. this is the cause of the AWS GovCloud (US) failures:

=== CONT  TestAccAWSLicenseManagerLicenseConfiguration_basic
TestAccAWSLicenseManagerLicenseConfiguration_basic: resource_aws_licensemanager_license_configuration_test.go:66: Step 1/2 error: Error running apply: 2020/11/12 16:00:46 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error creating License Manager license configuration: AccessDeniedException: Service role not found. Consult setup procedures in License Manager User Guide and create the required role for the service.
--- FAIL: TestAccAWSLicenseManagerLicenseConfiguration_basic (2.58s)

=== CONT  TestAccAWSLicenseManagerLicenseConfiguration_update
TestAccAWSLicenseManagerLicenseConfiguration_update: resource_aws_licensemanager_license_configuration_test.go:99: Step 1/3 error: Error running apply: 2020/11/12 16:00:48 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error creating License Manager license configuration: AccessDeniedException: Service role not found. Consult setup procedures in License Manager User Guide and create the required role for the service.
--- FAIL: TestAccAWSLicenseManagerLicenseConfiguration_update (2.66s)

=== CONT  TestAccAWSLaunchTemplate_licenseSpecification
TestAccAWSLaunchTemplate_licenseSpecification: resource_aws_launch_template_test.go:910: Step 1/2 error: Error running apply: 2020/11/12 15:45:20 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error creating License Manager license configuration: AccessDeniedException: Service role not found. Consult setup procedures in License Manager User Guide and create the required role for the service.
--- FAIL: TestAccAWSLaunchTemplate_licenseSpecification (5.39s)

=== CONT  TestAccAWSLicenseManagerAssociation_basic
TestAccAWSLicenseManagerAssociation_basic: resource_aws_licensemanager_association_test.go:16: Step 1/2 error: Error running apply: 2020/11/12 16:00:47 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error creating License Manager license configuration: AccessDeniedException: Service role not found. Consult setup procedures in License Manager User Guide and create the required role for the service.
--- FAIL: TestAccAWSLicenseManagerAssociation_basic (66.63s)

Along with a new test I'm setting up for ImageBuilder:

=== CONT  TestAccAwsImageBuilderDistributionConfiguration_Distribution_LicenseConfigurationArns
    resource_aws_imagebuilder_distribution_configuration_test.go:460: Step 1/3 error: Error running apply: 2020/11/13 09:11:48 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0

        Error: Error creating License Manager license configuration: AccessDeniedException: Service role not found. Consult setup procedures in License Manager User Guide and create the required role for the service.


--- FAIL: TestAccAwsImageBuilderDistributionConfiguration_Distribution_LicenseConfigurationArns (10.88s)

This service should be added to https://github.com/hashicorp/tf-eco-acctest-infrastructure/blob/master/aws-accounts/aws-provider/iam-service-linked-roles.tf rather than potentially in the tests. The main (and probably alternate) accounts need to have their existing IAM SLR imported or manually deleted and recreated by Terraform.

Metadata

Metadata

Assignees

Labels

partition/aws-us-govPertains to the aws-us-gov partition.service/licensemanagerIssues and PRs that pertain to the licensemanager service.technical-debtAddresses areas of the codebase that need refactoring or redesign.testsPRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions