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

Allow specifying of Cloudformation template parameters #123

Merged
merged 8 commits into from Sep 20, 2017

Conversation

resios
Copy link
Contributor

@resios resios commented Sep 16, 2017

As the title says this enables customers to specify template parameter overrides.
This makes it easy to have the same behavior locally as they would when instantiating their templates with non-default parameter values.

The SAM CLI accepts the same format that AWS CLI does.

@sanathkr sanathkr self-requested a review September 18, 2017 16:40
@@ -351,6 +363,24 @@ func main() {

}

// regexp that parses Cloudformation paramter key-value pair: https://regex101.com/r/hruxlg/3
var paramRe = regexp.MustCompile(`(?:ParameterKey)=("(?:\\.|[^"\\]+)*"|(?:\\.|[^, "\\]+)*),(?:ParameterValue)=("(?:\\.|[^"\\]+)*"|(?:\\.|[^ ,"\\]+)*)`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a big fan of regex. You could have done just a traditional parsing. But this is fine

. "github.com/onsi/gomega"
)

var _ = Describe("Parse Cloudformation parameters", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!!

Copy link
Contributor

@sanathkr sanathkr left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. It is super useful :-)

@sanathkr sanathkr merged commit 8624aae into aws:develop Sep 20, 2017
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.

None yet

2 participants