From 149c6f4bdba089aa4f92350ee6b34c1e5fe27eb2 Mon Sep 17 00:00:00 2001 From: Xuanqi He Date: Tue, 16 Sep 2025 17:10:55 -0400 Subject: [PATCH 1/2] Support PCUI in us-gov-east-1(OSU) region and other future GovCloud regions --- infrastructure/parallelcluster-ui-cognito.yaml | 2 +- infrastructure/parallelcluster-ui.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastructure/parallelcluster-ui-cognito.yaml b/infrastructure/parallelcluster-ui-cognito.yaml index 93efd61d..cd5f47f9 100644 --- a/infrastructure/parallelcluster-ui-cognito.yaml +++ b/infrastructure/parallelcluster-ui-cognito.yaml @@ -27,7 +27,7 @@ Parameters: Default: '' Conditions: - GovCloud: !Equals [!Ref AWS::Region, 'us-gov-west-1'] + GovCloud: !Equals [!Ref 'AWS::Partition', 'aws-us-gov'] UsePermissionBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryPolicy, '' ] ] UseCustomDomain: !Not [!Equals [!Ref CustomDomain, '']] diff --git a/infrastructure/parallelcluster-ui.yaml b/infrastructure/parallelcluster-ui.yaml index 11b7b99a..f7896524 100644 --- a/infrastructure/parallelcluster-ui.yaml +++ b/infrastructure/parallelcluster-ui.yaml @@ -163,7 +163,7 @@ Conditions: - !Equals ['3', !Select [ 1, !Split ['.', !Ref Version] ] ] - !Equals ['4', !Select [ 1, !Split ['.', !Ref Version] ] ] - !Equals ['5', !Select [ 1, !Split ['.', !Ref Version] ] ] - InGovCloud: !Equals ['us-gov-west-1', !Ref "AWS::Region"] + InGovCloud: !Equals [!Ref 'AWS::Partition', 'aws-us-gov'] UsePermissionBoundary: !Not [!Equals [!Ref PermissionsBoundaryPolicy, '']] UsePermissionBoundaryPCAPI: !Not [!Equals [!Ref PermissionsBoundaryPolicyPCAPI, '']] UseIAMRoleAndPolicyPrefix: !Not [!Equals [!Ref IAMRoleAndPolicyPrefix, '']] From be023ea5fa3c2289eaefd2e41f9ec30008e3f2be Mon Sep 17 00:00:00 2001 From: Xuanqi He Date: Thu, 18 Sep 2025 18:07:11 -0400 Subject: [PATCH 2/2] Fix the hardcode aws patition by using AWS::Partition --- infrastructure/parallelcluster-ui.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/parallelcluster-ui.yaml b/infrastructure/parallelcluster-ui.yaml index f7896524..4a294567 100644 --- a/infrastructure/parallelcluster-ui.yaml +++ b/infrastructure/parallelcluster-ui.yaml @@ -360,7 +360,7 @@ Resources: Action: - 'sts:AssumeRole' ManagedPolicyArns: - - 'arn:aws:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs' + - 'arn:${AWS::Partition}:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs' PermissionsBoundary: !If [UsePermissionBoundary, !Ref PermissionsBoundaryPolicy, !Ref 'AWS::NoValue'] ApiGatewayAccessLog: