-
Notifications
You must be signed in to change notification settings - Fork 458
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
feat: allow user to specify/override outputs from the setup stage #1741
Conversation
chatted with @bharathkkb out of band, and he suggested some changes. i'll move this to draft until its ready again. |
/gcbrun |
Hey folks, can i get another /gcbrun on this PR? |
/gcbrun |
Tests are green. Is there anything else needed before this PR can be merged? If not, please merge it for me, as I do not have write permissions in this repo. Thanks! |
/gcbrun |
@bharathkkb - It sounds like you are familiar with the goal, would you have time to review? |
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.
Thanks for adding this!
I resolved a merge conflict, so this will need another /gcbrun to get the 'cloud-foundation-cicd' tests run again. Once they pass, please merge. |
/gcbrun |
Allow user to specify/override outputs from Setup stage. This enables users to iterate quickly when running blueprint tests on an existing project.
cft --stage verify --setup-var key=value
These values are then accessible with
tft.GetTFSetupStringOutput("key")
, as if it had come from the setup stage. Values specified in this way take precedence over actual setup outputs.Values are passed to the underlying
go test
command using a set of prefixed environment variables. So--setup-var key=value
becomesCFT_SETUP_key=value
, which is parsed inNewTFBlueprintTest
.This method currently works only for string values, but can be extended if desired.