Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profile seems to be ignored #10

Open
MrIceman opened this issue Feb 28, 2023 · 0 comments
Open

profile seems to be ignored #10

MrIceman opened this issue Feb 28, 2023 · 0 comments

Comments

@MrIceman
Copy link

I have a profile called app-dev and my .tf has following module specified


module "swagger_ui" {
  source             = "whitebread-cloud/s3-swagger-ui/aws"
  version            = "1.0.3"
  s3_bucket_path     =  module.s3.bucket_path
  openapi_spec_paths = ["${path.cwd}/../spec.yaml"]
  openapi_spec_urls  = []
  s3_acl             = "public-read"
  profile            = "app-dev"
}

yet when running terraform apply I get this issue

 Error: local-exec provisioner error
│ 
│   with module.swagger_ui.null_resource.swagger,
│   on .terraform/modules/swagger_ui/main.tf line 49, in resource "null_resource" "swagger":
│   49:   provisioner "local-exec" {
│ 
│ Error running command 'BUCKET_PATH=my-app-blabla-bucket-api.s3.amazonaws.com
│ 
│ PROFILE=default
│ 
│ aws s3 rm --profile $PROFILE s3://$BUCKET_PATH --recursive --exclude "*/*"
│ ': exit status 1. Output: fatal error: An error occurred (NoSuchBucket) when calling the ListObjectsV2 operation: The specified bucket does not exist
│ 
╵

It seems like the profile variable isn't being recognized properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant