You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error running plan operation: running \"/home/atlantis/.atlantis/bin/terraform1.8.1 init -input=false -upgrade\"in\"/home/atlantis/.atlantis/repos/gsen/tftest/3/default/myrepotest/us-east-1/ecr/test\": exit status 1\n\nInitializing the backend...\n╷\n│ Error: failed to get shared config profile,
ECS fargate should be able to find the profiles listed in ~/.aws/config
Actual Behavior
ECS on FARGATE fails to read profiles in ~/.aws/config
Steps to Reproduce
Deploy atlantis in ecs fargate using the terraform-atlantis-ecs module
setup gitlab or github webhooks
create your backend.tf and provider.tf and make sure profile are set.
i.e
provider "aws" {
profile = "my-test"
region = "us-east-1"
}
Removing profile = "my-test" works. keeping it leads to an error
Additional Context
Note: everything works if i don't specific a profile. For our use case, we need to be able to run terraform code locally and with atlantis. Specifying a provider is a MUST.
References
No response
The text was updated successfully, but these errors were encountered:
You mention that removing the profile entry in the provider allows the configuration to work, but the error you presented indicates there was a problem with the backend configuration. Can you confirm which (or both) of the components is failing here?
@jbardin it is both. Specifying the profile keyword in providers.tf or backend.tf causes that error. not specifying the profile flag leads to successful plan/apply.
This is my Dockerfile:
FROM ghcr.io/runatlantis/atlantis:latest
COPY aws_config /home/atlantis/.aws/config
I need this to work on EC2 Fargate not EC2 Instance. I would appreciate it if someone can reproduce the issue and work out a possible fix or workaround
Terraform Version
Terraform Configuration Files
provider.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
provider "aws" {
profile = "my-test"
region = "us-east-1"
}
backend.tf
terraform {
required_version = ">= 0.12.2"
backend "s3" {
region = "us-east-1"
bucket = ""
key = ""
dynamodb_table = ""
profile = "my-test"
encrypt = "true"
}
}
Create any test resource in your main.tf
Debug Output
Works fine when ran locally
Expected Behavior
ECS fargate should be able to find the profiles listed in ~/.aws/config
Actual Behavior
ECS on FARGATE fails to read profiles in ~/.aws/config
Steps to Reproduce
Deploy atlantis in ecs fargate using the terraform-atlantis-ecs module
setup gitlab or github webhooks
create your backend.tf and provider.tf and make sure profile are set.
i.e
provider "aws" {
profile = "my-test"
region = "us-east-1"
}
Removing profile = "my-test" works. keeping it leads to an error
Additional Context
Note: everything works if i don't specific a profile. For our use case, we need to be able to run terraform code locally and with atlantis. Specifying a provider is a MUST.
References
No response
The text was updated successfully, but these errors were encountered: