Skip to content

ScrollWorks/cfn-json-outputs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Very simple node cli application that allows you to export the outputs of a cloudformation stack directly to a json file.

How do I use it?

npx @scrollworks/cfn-json-outputs -n stackName should be enough if you have your AWS credentials available as the default environment variables.

CLI options available

  • Stack name: -n or --stackName
  • Output file: -o or --outputFile
  • AWS region: -r or --awsRegion
  • AWS access key ID: -k or --awsAccessKey
  • AWS secret access key: -s or --awsSecret

This an example invocation passing all the parameters: npx @scrollworks/cfn-json-outputs -n myCFStack -o output.json -r eu-west-1 -k myAwsAccessKeyId -s myAwsSecretAccessKey

Why?

Having the outputs of our stack in a json file allows us to conveniently import these values into our programs, for instance:

const  cloudParams = require("../outputs.json");
const  client = new  CognitoIdentityProviderClient({});
const  command = new  SignUpCommand({
	clientId:  cloudParams.UserPoolClientID
	Password:  "hackme",
	Username:  "emusk@tesla.com"
});

About

Simple cli node application that creates a JSON file with the outputs of an AWS cloudformation stack

Resources

Stars

Watchers

Forks

Packages

No packages published