DNXLabs / one-cli

CLI to manage all stacks from DNX.
https://cli.dnx.one
Apache License 2.0
7 stars 0 forks source link

Creates init config file entrypoint #24

Closed arthurbdiniz closed 4 years ago

arthurbdiniz commented 4 years ago

This PR introduces the subcommand one init, that will ask the user about the workspaces and configuration and then create the one.yaml config file inside the current folder.

The last thing missing is to allow the user to change the images that are not implemented yet.

arthurbdiniz commented 4 years ago

Just added the functionality to change docker images and to chose if the workspace created will assume-role.

Full test log:

$ one init
? Do you want to create workspaces now? [Y/n]  Y
? Terraform docker image:  dnxsolutions/terraform:0.12.20-dnx1
? G Suite docker image:  dnxsolutions/aws-google-auth:latest
? Azure docker image:  dnxsolutions/docker-aws-azure-ad:latest
? What's your AWS_ACCOUNT_ID credential:  asd
? What's your AWS_ROLE credential:  asd
? What's your WORKSPACE credential:  asd
? Do you want to this workspace to assume role? [Y/n]  n
? Do you want to create another workspace? [Y/n]  n