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

Add cross-parameter rules #873

Merged
merged 1 commit into from
Jul 15, 2021
Merged

Add cross-parameter rules #873

merged 1 commit into from
Jul 15, 2021

Conversation

keithduncan
Copy link
Contributor

@keithduncan keithduncan commented Jul 5, 2021

Adds a Rules section to validate cross-parameter values:

  • One of BuildkiteAgentToken or BuildkiteAgentTokenParameterStorePath must be specified

Fixes #648

@keithduncan keithduncan force-pushed the keithduncan/add-rules branch from 6876ee1 to 3274d31 Compare July 9, 2021 03:45
@keithduncan
Copy link
Contributor Author

Sadly I couldn’t get validation of the VPC Parameters working because the stack parameters are optional and thus untyped, disabling the use of the !MemberOf functions.

Also sadly the validation still happens quite late in the template apply process, I had hoped it would be run at the parameter input stage before progressing.

Screenshot 2021-07-09 at 13 43 13

The benefit of this change is it now tells you what you are missing since we can’t make either of the token parameters required while both are supported.

@keithduncan keithduncan marked this pull request as ready for review July 9, 2021 03:48
Copy link
Contributor

@yob yob left a comment

Choose a reason for hiding this comment

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

Neat!

it's a shame the VPC one wasn't possible, but now that we have this initial check in place I'm sure we'll come up with other rules that will be useful 👍

@keithduncan keithduncan merged commit 61b22c2 into master Jul 15, 2021
@keithduncan keithduncan deleted the keithduncan/add-rules branch July 15, 2021 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buildkite agent fails with default template options
2 participants