Closed claisonamorim closed 4 years ago
Hey @claisonamorim can you check your one.yml and make sure that you have the region in the default workspace?
workspaces:
default:
aws-region: ap-southeast-2
@brunodasilvalenga aws-region: ap-southeast-2
are only used been used for ECS workspaces, they don't work for normal workspaces.
This problem is unrelated to the CLI.
The module terraform-aws-security-baseline
is the root cause for this because the module has described a provider but without defining a standard region.
on .terraform/modules/security-baseline/_providers.tf line 1, in provider "aws":
1: provider "aws" {}
To solve this a new patch was released for the module, any issues with it just reopen this issue.
@claisonamorim Please update your stack to:
module "security-baseline" {
source = "git::https://github.com/DNXLabs/terraform-aws-security-baseline?ref=1.1.2"
}
Using all the steps with the "make" command everything works as expected for deploying to the infra-root stack, but using the "one terraform plan" command, it shows the following error:
**Setting workspace to default Assuming role dnx-root at
Error: Missing required argument
on .terraform / modules / security-baseline / _providers.tf line 1, in provider "aws": 1: provider "aws" {}
The argument "region" is required, but no definition was found.**
Quickly analyzing this issue, I noticed that using the "one terraform plan", the variable AWS_DEFAULT_REGION was not exposed to the container, but with the make command it was. This is probably the problem.