Closed rschmied closed 8 months ago
It appears that without a valid Azure configuration (via az login
), the tooling will not work in an AWS-only environment. Need to fix this ASAP.
basically this:
Looks like I need to re-structure the project to not have this problem.
Fixed by PR #12 -- there's now a dummy module for the provider not in use... the downside here is that the user needs to run a 'prepare' script first to properly configure the deploy module. On Linux/macOS etc, this sets symbolic links, on Windows it simply copies over the file. An additional step to do but at least it removes the need to have both providers installed AND configured.
Problem description
Apparently, when trying to deploy to AWS and only having AWS CLI installed, the tooling creates an error like this:
The above error says that the Azure CLI
az
isn't available (even though we do not want to deploy to Azure) and thus the entire plan and consequently the deploy fails.In addition, the
terraform init
already installs both providers, currently Azure and AWS even though it's very likely that only ONE will be used by a particular person using the tooling.Workaround
Install the Azure CLI by following the instructions here. Even if the CLI is not needed to deploy to AWS and there's no valid authentication/configuration for Azure, Terraform's Azure provider will call the Azure CLI to check various things.
Long term solution
It's likely that the different deployment paths need to be put into separate directories with potential code duplication. Otherwise, the issue we're currently seeing can not be avoided. Especially, if more cloud providers are added (GCP, DO, ...).