@outthought wrote:
Within the context of the command
terraform init
from an AWS CodeBuild instance of imagehashicorp/terraform:0.12.19
, the module fails to download.The source terraform template references a module package source in a s3 bucket.
module "outbound" { source = "s3::https://s3.amazonaws.com/my-modules/outbound-0.0.1.zip" ...
The command fails with this output:
Error: Failed to download module Could not download module "outbound" (main.tf:17) source code from "s3::https://s3.amazonaws.com/my-modules/outbound-0.0.1.zip": NoCredentialProviders: no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors
This should be valid per the documentation:
The s3 endpoint is correct because the region is
us-east-1
.The CodeBuild project has an IAM role with correct permissions to s3.
The code works from a local CLI command
terraform init
.How do I get more information from the command output?
What am I doing wrong fetching the module package from s3?
I have tried many different s3 URLs.
The environment has the variable that would supply the
task_role
to terraform:ECS_CONTAINER_METADATA_URI=http://169.254.170.2/v3/40292219-6c1c-424e-b072-8456e6ea8165
Posts: 1
Participants: 1