diff --git a/test/integration/targets/aws_codebuild/defaults/main.yml b/test/integration/targets/aws_codebuild/defaults/main.yml index 9e1009a7fb5..a36eb3de720 100644 --- a/test/integration/targets/aws_codebuild/defaults/main.yml +++ b/test/integration/targets/aws_codebuild/defaults/main.yml @@ -4,4 +4,7 @@ # IAM role names have to be less than 64 characters # The 8 digit identifier at the end of resource_prefix helps determine during # which test something was created and allows tests to be run in parallel -iam_role_name: "ansible-test-sts-{{ resource_prefix | regex_search('([0-9]+)$') }}-codebuild-service-role" +# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases +# we need both sets of digits to keep the resource name unique +unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +iam_role_name: "ansible-test-sts-{{ unique_id }}-codebuild-service-role" diff --git a/test/integration/targets/aws_codepipeline/defaults/main.yml b/test/integration/targets/aws_codepipeline/defaults/main.yml index 61db083dda1..5f735ba6df9 100644 --- a/test/integration/targets/aws_codepipeline/defaults/main.yml +++ b/test/integration/targets/aws_codepipeline/defaults/main.yml @@ -6,4 +6,7 @@ codepipeline_name: "{{ resource_prefix }}-test-codepipeline" # IAM role names have to be less than 64 characters # The 8 digit identifier at the end of resource_prefix helps determine during # which test something was created and allows tests to be run in parallel -codepipeline_service_role_name: "ansible-test-sts-{{ resource_prefix | regex_search('([0-9]+)$') }}-codebuild-service-role" +# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases +# we need both sets of digits to keep the resource name unique +unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +codepipeline_service_role_name: "ansible-test-sts-{{ unique_id }}-codepipeline-role"