DNXLabs / one-cli

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

Error when running "one terraform plan" #56

Closed lzrocha closed 4 years ago

lzrocha commented 4 years ago

Steps to reproduce the error with domain stack

one workspace change ? Select workspace mgmt-ap-southeast-2-default one terraform init

one terraform plan Setting workspace to mgmt-ap-southeast-2-default

Error: No configuration files

Plan requires configuration to be present. Planning without a configuration would mark everything for destruction, which is normally not what is desired. If you would like to destroy everything, run plan with the -destroy option. Otherwise, create a Terraform configuration file (.tf file) and try again.

arthurbdiniz commented 4 years ago

Hi @lzrocha.

This error means that you have run the command in the wrong place. You have to be in the directory that contains your configuration files, so before running init or apply you have to cd to your Terraform project folder.

lzrocha commented 4 years ago

Hey @arthurbdiniz, thanks for replying. After updating one.yaml, I have run init/plan on the root directory of the domain stack which contains the terraform configuration files.

one version 0.4.5

arthurbdiniz commented 4 years ago

Hi @lzrocha

A problem was encountered in mapping volumes when used via docker. This problem is generated because there are 3 layers(host, one-cli, dind CLI services) of containers and the second layer is unable to map volumes to the third layer.

Untitled Diagram

For now, we don't want to complicate the CLI solution fixing this because the error only occurs when using the CLI with docker in a host machine, so the recommendation is to leave the docker image only to be used within CI/CD pipelines.

This warning was already documented in README and if you have any problems running from PyPI or binary I will be glad to help you.