-
Notifications
You must be signed in to change notification settings - Fork 4k
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
docs(ssm): document how to use valueFromLookup for specific value formats #21520
Conversation
…mats `StringParameter.valueFromLookup` can be used to retrieve a string value, but that value could be in any format and there are times where it is provided as input to properties that require a specific format (i.e. arn format). Because of the way that lookups are resolved, it is possible for the initial value to be the dummy value `dummy-value-for-${parameterName}` which might cause synth errors. Since there is no way for the CDK to know _how_ you will use the returned value, we can't really add logic to specifically handle edge cases. For example, we could have `valueFromLookup` always return a token, but then it would no longer be able to be used in cases where a `string` is required. See #8699 (comment) for a good analysis. This PR adds documentation instructing users how to handle these use cases. closes #8699
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…mats (aws#21520) `StringParameter.valueFromLookup` can be used to retrieve a string value, but that value could be in any format and there are times where it is provided as input to properties that require a specific format (i.e. arn format). Because of the way that lookups are resolved, it is possible for the initial value to be the dummy value `dummy-value-for-${parameterName}` which might cause synth errors. Since there is no way for the CDK to know _how_ you will use the returned value, we can't really add logic to specifically handle edge cases. For example, we could have `valueFromLookup` always return a token, but then it would no longer be able to be used in cases where a `string` is required. See aws#8699 (comment) for a good analysis. This PR adds documentation instructing users how to handle these use cases. closes aws#8699, aws#9138 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
StringParameter.valueFromLookup
can be used to retrieve a stringvalue, but that value could be in any format and there are times where
it is provided as input to properties that require a specific format
(i.e. arn format). Because of the way that lookups are resolved, it is
possible for the initial value to be the dummy value
dummy-value-for-${parameterName}
which might cause synth errors.Since there is no way for the CDK to know how you will use the
returned value, we can't really add logic to specifically handle edge
cases. For example, we could have
valueFromLookup
always return atoken, but then it would no longer be able to be used in cases where a
string
is required. See #8699 (comment)for a good analysis.
This PR adds documentation instructing users how to handle these use
cases.
closes #8699, #9138
All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license