@@ -263,7 +263,13 @@ Resources:
263263 - { CustomDomainBasePath: !FindInMap [ ParallelClusterUI, Constants, CustomDomainBasePath ] }
264264 - !Sub
265265 - https://${Api}.execute-api.${AWS::Region}.${AWS::URLSuffix}/${Stage}
266- - { Api: !Ref ApiGatewayRestApi, Stage: !Ref ApiGatewayRestStage }
266+ - Api : !If
267+ - IsPrivate
268+ - !Sub
269+ - ' ${ApiId}-${VpceId}'
270+ - { ApiId: !Ref ApiGatewayRestApi, VpceId: !Ref VpcEndpointId }
271+ - !Ref ApiGatewayRestApi
272+ Stage : !Ref ApiGatewayRestStage
267273 AUTH_PATH : !If [ UseExistingCognito, !Ref UserPoolAuthDomain, !GetAtt [ Cognito, Outputs.UserPoolAuthDomain ]]
268274 SECRET_ID : !GetAtt UserPoolClientSecret.SecretName
269275 AUDIENCE : !Ref CognitoAppClient
@@ -424,7 +430,13 @@ Resources:
424430 - { CustomDomainBasePath: !FindInMap [ ParallelClusterUI, Constants, CustomDomainBasePath ] }
425431 - !Sub
426432 - https://${Api}.execute-api.${AWS::Region}.${AWS::URLSuffix}/${Stage}/login
427- - { Api: !Ref ApiGatewayRestApi, Stage: !Ref ApiGatewayRestStage }
433+ - Api : !If
434+ - IsPrivate
435+ - !Sub
436+ - ' ${ApiId}-${VpceId}'
437+ - { ApiId: !Ref ApiGatewayRestApi, VpceId: !Ref VpcEndpointId }
438+ - !Ref ApiGatewayRestApi
439+ Stage : !Ref ApiGatewayRestStage
428440 SupportedIdentityProviders :
429441 - COGNITO
430442 UserPoolId : !If [ UseExistingCognito, !Ref UserPoolId, !GetAtt [ Cognito, Outputs.UserPoolId ]]
@@ -1102,7 +1114,13 @@ Outputs:
11021114 - { CustomDomainBasePath: !FindInMap [ ParallelClusterUI, Constants, CustomDomainBasePath ] }
11031115 - !Sub
11041116 - https://${Api}.execute-api.${AWS::Region}.${AWS::URLSuffix}/${Stage}
1105- - { Api: !Ref ApiGatewayRestApi, Stage: !Ref ApiGatewayRestStage }
1117+ - Api : !If
1118+ - IsPrivate
1119+ - !Sub
1120+ - ' ${ApiId}-${VpceId}'
1121+ - { ApiId: !Ref ApiGatewayRestApi, VpceId: !Ref VpcEndpointId }
1122+ - !Ref ApiGatewayRestApi
1123+ Stage : !Ref ApiGatewayRestStage
11061124 CustomDomainEndpoint :
11071125 Condition : UseCustomDomain
11081126 Description : |
0 commit comments