-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change NoValue psuedo-parameters to references #160
Conversation
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) ```
As per the comments and regex, leave ‘unspecified’ parameters empty. Previously we have tried using AWS::NoValue however the lack of being able to specify case insensitivity in Cloudformation parameter regex and a lack of user familiarity made it unworkable.
Please leave the functionName field empty for default naming behavior.
Chris
On 30 Dec 2023, at 02:48, Troy Ready ***@***.***> wrote:
Description of changes:
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)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
…--------------------------------
You can view, comment on, or merge this pull request online at:
#160 <#160>
Commit Summary
* 67aca2b <67aca2b> Change NoValue psuedo-parameters to references
File Changes
(1 file <https://github.com/awslabs/ssosync/pull/160/files> )
* M template.yaml <https://github.com/awslabs/ssosync/pull/160/files#diff-1363ef5ce8886100842332c97163aad7934237e1fe49b5d40422b45fdc30f38e> (12)
Patch Links:
* https://github.com/awslabs/ssosync/pull/160.patch <https://github.com/awslabs/ssosync/pull/160.patch>
* https://github.com/awslabs/ssosync/pull/160.diff <https://github.com/awslabs/ssosync/pull/160.diff>
—
Reply to this email directly, view it on GitHub <#160> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABVULYLIF4YO7YT7GV4RWU3YL56IPAVCNFSM6AAAAABBHGSHIOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA3DANJTG4ZDCMQ> .
You are receiving this because you are subscribed to this thread. <https://github.com/notifications/beacon/ABVULYPOJ7LRHBNUETZ4LALYL56IPA5CNFSM6AAAAABBHGSHIOWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHHVUKNPQ.gif> Message ID: ***@***.***>
|
I’ll look to add clear feedback to the regex, in the next release.
Chris
On 30 Dec 2023, at 09:48, Chris Pates ***@***.***> wrote:
As per the comments and regex, leave ‘unspecified’ parameters empty. Previously we have tried using AWS::NoValue however the lack of being able to specify case insensitivity in Cloudformation parameter regex and a lack of user familiarity made it unworkable.
Please leave the functionName field empty for default naming behavior.
Chris
On 30 Dec 2023, at 02:48, Troy Ready ***@***.***> wrote:
Description of changes:
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)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
…--------------------------------
You can view, comment on, or merge this pull request online at:
#160 <#160>
Commit Summary
* 67aca2b <67aca2b> Change NoValue psuedo-parameters to references
File Changes
(1 file <https://github.com/awslabs/ssosync/pull/160/files> )
* M template.yaml <https://github.com/awslabs/ssosync/pull/160/files#diff-1363ef5ce8886100842332c97163aad7934237e1fe49b5d40422b45fdc30f38e> (12)
Patch Links:
* https://github.com/awslabs/ssosync/pull/160.patch <https://github.com/awslabs/ssosync/pull/160.patch>
* https://github.com/awslabs/ssosync/pull/160.diff <https://github.com/awslabs/ssosync/pull/160.diff>
—
Reply to this email directly, view it on GitHub <#160> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABVULYLIF4YO7YT7GV4RWU3YL56IPAVCNFSM6AAAAABBHGSHIOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA3DANJTG4ZDCMQ> .
You are receiving this because you are subscribed to this thread. <https://github.com/notifications/beacon/ABVULYPOJ7LRHBNUETZ4LALYL56IPA5CNFSM6AAAAABBHGSHIOWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHHVUKNPQ.gif> Message ID: ***@***.***>
|
@ChrisPates Thanks for the prompt feedback. I don't think I was clear enough in the description: this isn't a regex issue, that's just the error that comes up. Any user omitting the FunctionName parameter (that's what I was attempting to do) will experience this error, because the condition on the name parameter for the function resource has a bad "else" value -- instead of allowing the name to be automatically generated it tries to pass the name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Description of changes:
This changes the instances of the NoValue pseudo-parameter to use the Ref intrinsic function, so that the key is omitted instead of the literal string
AWS::NoValue
being used.Without this change, attempting to deploy the stack without a specified FunctionName results in an error:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.