diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b5ccda..d166fb31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release - Guard against IndexOutOfRangeException when Branches list is empty in GithubStatusNotificationHandler - Fixed CS0433 ambiguous xunit type conflict in test projects caused by FunFair.Test.Common now depending on the AOT-flavoured xunit v3 packages, by switching test projects to the matching xunit.v3.aot.mtp-v2 runner package - Added missing IncludeAssets on NuGet package references required by FunFair.BuildCheck +- Resolved cfn-lint W1030 warning on the TaskRoleArn CloudFormation property by only setting it when a TaskRole is provided ### Changed - Dependencies - Updated NSubstitute.Analyzers.CSharp to 1.0.17 - Switched to use minimal APIs diff --git a/cloudformation.json b/cloudformation.json index 5952389e..dbfa780c 100644 --- a/cloudformation.json +++ b/cloudformation.json @@ -74,6 +74,20 @@ "Default": "arn:aws:secretsmanager:eu-west-1:117769150821:secret:BuildBot-ph1YIJ" } }, + "Conditions": { + "HasTaskRole": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "TaskRole" + }, + "" + ] + } + ] + } + }, "Metadata": { "Application": { "Ref": "ApplicationName" @@ -279,7 +293,15 @@ "Ref": "TaskExecutionRole" }, "TaskRoleArn": { - "Ref": "TaskRole" + "Fn::If": [ + "HasTaskRole", + { + "Ref": "TaskRole" + }, + { + "Ref": "AWS::NoValue" + } + ] }, "RequiresCompatibilities": ["FARGATE"], "NetworkMode": "awsvpc",