Giter Site home page Giter Site logo

cfparams's People

Contributors

backstage-culture-amp[bot] avatar chloeruka avatar ctgardner avatar jamestelfer avatar n-tucker avatar ngocpea avatar pda avatar sdemontfort avatar therealvio avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cfparams's Issues

Handle template "Default" value

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.

Supports JSON params format

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.

"accept-defaults" arg doesn't work with when "Default" is an empty string

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:

specs[name] = ParameterSpec{Name: name, HasDefault: parsed.Default != ""}

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)

Allow to use empty string as a valid value

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"
  }

Dependency Dashboard

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.

Detected dependencies

asdf
.tool-versions
  • golang 1.22.2
buildkite
.buildkite/pipeline.yaml
  • cultureamp/aws-sm v2.2.0
github-actions
.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
gomod
go.mod
  • go 1.22.2
  • github.com/aws/aws-sdk-go v1.51.21
  • github.com/stretchr/testify v1.9.0
regex
.github/workflows/test.yaml
  • go 1.22
.github/workflows/test.yaml
  • golangci-lint v1.57.2
.tool-versions
  • go 1.22.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.