Skip to content

let CLI accept input from STDIN#417

Open
garettmd wants to merge 1 commit into
DontShaveTheYak:masterfrom
garettmd:accept-stdin
Open

let CLI accept input from STDIN#417
garettmd wants to merge 1 commit into
DontShaveTheYak:masterfrom
garettmd:accept-stdin

Conversation

@garettmd

Copy link
Copy Markdown

If no argument is supplied (i.e. template_path) then cf2tf will accept input from STDIN. This lets you do something along the lines of the below for loop to easily turn a large stack of CloudFormation stacks into TF code:

 for STACK_NAME in vpc-dev ec2-dev vpc-prod ec2-prod ; do aws cloudformation get-template --stack-name ${STACK_NAME} --query 'TemplateBody' --output text >> ${STACK_NAME}.yml | cf2tf >> ${STACK_NAME}.tf; done

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.

1 participant