Skip to content

Commit b819bc8

Browse files
troyreadyChrisPates
authored andcommitted
Change NoValue psuedo-parameters to references
This changes the instances of the [NoValue pseudo-parameter](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html) to use the [Ref intrinsic function](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html), so that the key is omitted instead of the literal string `` being used. Without this change, attempting to deploy the stack without a specified FunctionName results in an error: ``` Resource handler returned message: "1 validation error detected: Value 'AWS::NoValue' at 'functionName' failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_\.]+)(:(\$LATEST|[a-zA-Z0-9-_]+))? (Service: Lambda, Status Code: 400, Request ID: UUID)" (RequestToken: UUID, HandlerErrorCode: GeneralServiceException) ```
1 parent 641d214 commit b819bc8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

template.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ Resources:
533533
Type: AWS::Serverless::Function
534534
Condition: CreateFunction
535535
Properties:
536-
FunctionName: !If [SetFunctionName, !Ref FunctionName, AWS::NoValue]
536+
FunctionName: !If [SetFunctionName, !Ref FunctionName, !Ref AWS::NoValue]
537537
Role: !If [RemoteSecrets, !GetAtt SSOSyncRoleRemote.Arn, !GetAtt SSOSyncRoleLocal.Arn]
538538
Runtime: provided.al2
539539
Handler: bootstrap
@@ -550,12 +550,12 @@ Resources:
550550
SSOSYNC_SCIM_ACCESS_TOKEN: !If [CreateSecrets, !Ref SecretSCIMAccessToken, !Select [3, !Split [',', !Ref CrossStackConfig]]]
551551
SSOSYNC_REGION: !If [CreateSecrets, !Ref SecretRegion, !Select [4, !Split [',', !Ref CrossStackConfig]]]
552552
SSOSYNC_IDENTITY_STORE_ID: !If [CreateSecrets, !Ref SecretIdentityStoreID, !Select [5, !Split [',', !Ref CrossStackConfig]]]
553-
SSOSYNC_USER_MATCH: !If [SetGoogleUserMatch, !Ref GoogleUserMatch, AWS::NoValue]
554-
SSOSYNC_GROUP_MATCH: !If [SetGoogleGroupMatch, !Ref GoogleGroupMatch, AWS::NoValue]
553+
SSOSYNC_USER_MATCH: !If [SetGoogleUserMatch, !Ref GoogleUserMatch, !Ref AWS::NoValue]
554+
SSOSYNC_GROUP_MATCH: !If [SetGoogleGroupMatch, !Ref GoogleGroupMatch, !Ref AWS::NoValue]
555555
SSOSYNC_SYNC_METHOD: !Ref SyncMethod
556-
SSOSYNC_IGNORE_GROUPS: !If [SetIgnoreGroups, !Ref IgnoreGroups, AWS::NoValue]
557-
SSOSYNC_IGNORE_USERS: !If [SetIgnoreUsers, !Ref IgnoreUsers, AWS::NoValue]
558-
SSOSYNC_INCLUDE_GROUPS: !If [SetIncludeGroups, !Ref IncludeGroups, AWS::NoValue]
556+
SSOSYNC_IGNORE_GROUPS: !If [SetIgnoreGroups, !Ref IgnoreGroups, !Ref AWS::NoValue]
557+
SSOSYNC_IGNORE_USERS: !If [SetIgnoreUsers, !Ref IgnoreUsers, !Ref AWS::NoValue]
558+
SSOSYNC_INCLUDE_GROUPS: !If [SetIncludeGroups, !Ref IncludeGroups, !Ref AWS::NoValue]
559559
Events:
560560
SyncScheduledEvent:
561561
Type: Schedule

0 commit comments

Comments
 (0)