Skip to content
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(pipelines): describe context lookups #15663

Merged
merged 2 commits into from
Jul 20, 2021

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jul 20, 2021

Describe recommended way to do context lookups, and an alternative
approach we don't recommend but that everyone is asking for.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Describe recommended way to do context lookups, and an alternative
approach we don't recommend but that everyone is asking for.
@rix0rrr rix0rrr requested a review from nija-at July 20, 2021 14:15
@rix0rrr rix0rrr self-assigned this Jul 20, 2021
@gitpod-io
Copy link

gitpod-io bot commented Jul 20, 2021

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 20, 2021
@nija-at nija-at added the pr/do-not-merge This PR should not be merged at this time. label Jul 20, 2021
Comment on lines +859 to +864
synthesized infrastructure is consistent and repeatable. If you do not commit
`cdk.context.json`, the results of the lookups may suddenly be different in
unexpected ways, and even produce results that cannot be deployed or will cause
data loss. To give an account permissions to perform lookups against an
environment, without being able to deploy to it and make changes, run
`cdk bootstrap --trust-for-lookup=<account>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean this is good, but this is buried in the docs. What would be even better would be to warn/error users during build when they don't do this? Especially, checking in cdk.context.json because that will behave in unexpected ways which is worse than erroring.

But of course, I don't know what it would take to automate this in cdk pipelines, so I'll leave it to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel right now you need to consciously choose one or the other, if you do nothing the synth will fail. So at least we're not unsafe.

We might be unusable. I will consider your idea to add a warning (though chances that people will read it are slim).

For now, unblocking this merge because I think having this content in is the most important right now.

@rix0rrr rix0rrr removed the pr/do-not-merge This PR should not be merged at this time. label Jul 20, 2021
@mergify
Copy link
Contributor

mergify bot commented Jul 20, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 9532e3c into master Jul 20, 2021
@mergify mergify bot deleted the huijbers/describe-context-lookups branch July 20, 2021 16:15
@mergify
Copy link
Contributor

mergify bot commented Jul 20, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: c18e5cc
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Aug 3, 2021
Describe recommended way to do context lookups, and an alternative
approach we don't recommend but that everyone is asking for.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
Describe recommended way to do context lookups, and an alternative
approach we don't recommend but that everyone is asking for.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants