cultureamp / cfparams Goto Github PK
View Code? Open in Web Editor NEWWrangle parameters for AWS CloudFormation
License: MIT License
Wrangle parameters for AWS CloudFormation
License: MIT License
Currently cfparams will add UserPreviousValue
field when parameter is not given in parameters file. Like so:
{
"ParameterKey": "ImageTag",
"UsePreviousValue": true
},
This is useful during update-stack
, however during create-stack
the default values are often needed to create stack.
I guess providing switch to do this would be handy such as --use-template-defaults
.
At the time of this writing native Cloudformation params file does not comes in YML format, so the JSON goes like this.
[
{
"ParameterKey": "ConfigPolicyArn",
"ParameterValue": "arn:aws:iam::514571838450:policy/read-cultureamp-staging-config-web-gateway"
},
{
"ParameterKey": "Environment",
"ParameterValue": "aslan"
}
]
It would be nice if cfparams supports --template
in either JSON or YAML, perhaps with an extra switch--template-json
. This makes transitioning in and out simpler.
At the moment I have to converts all the params file into cfparams format.
When a Cloudformation parameter's Default
field is set to an empty string, the accept-defaults
flag doesn't work. This is due to the fact that the ParsedParameterSpec
struct's Default
field defaults to an empty string when not defined, and the check for whether a default is defined is whether it's an empty string:
Line 112 in 187e3de
I propose a fix by allowing the Default
field to be a string pointer, which will default to null if empty. (https://stackoverflow.com/questions/31048557/assigning-null-to-json-fields-instead-of-empty-strings-in-golang)
Currently it appears that cfparams
does not allow empty values to be passed as parameters.
Example:
# parameters file
BugsnagApiKey: "" # TODO: Ignore for development account
# partial tempalte file:
Parameters:
BugsnagApiKey:
Description: API Key for Bugsnag error reporting
Type: String
Executed with the arguments:
cfparams \
--template cloudformation.yml \
--parameters "$PARAMS_FILE" \
--accept-defaults \
--no-previous
The error:
An error occurred (ValidationError) when calling the CreateStack operation: ParameterValue for ParameterKey BugsnagApiKey is required
The produced output for that key:
{
"ParameterKey": "BugsnagApiKey"
}
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
.tool-versions
golang 1.22.2
.buildkite/pipeline.yaml
cultureamp/aws-sm v2.2.0
.github/workflows/release.yaml
cultureamp/protect-event-parameters v2
actions/checkout v4
actions/setup-node v4
cultureamp/protect-event-parameters v2
actions/checkout v4
actions/setup-go v5
goreleaser/goreleaser-action v5
.github/workflows/test.yaml
actions/checkout v4
actions/setup-go v5
actions/checkout v4
actions/setup-go v5
golangci/golangci-lint-action v4
actions/checkout v4
actions/cache v4
zencargo/github-action-go-mod-tidy v1
go.mod
go 1.22.2
github.com/aws/aws-sdk-go v1.51.21
github.com/stretchr/testify v1.9.0
.github/workflows/test.yaml
go 1.22
.github/workflows/test.yaml
golangci-lint v1.57.2
.tool-versions
go 1.22.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.