Open iadminko opened 2 months ago
same problem here :(
It looks like for the provider to work the AWS region must be set in the environment of the Terraform execution by AWS_DEFAULT_REGION environment variable. I'll add "region" provider attribute to support setting region at the provider level.
It looks like for the provider to work the AWS region must be set in the environment of the Terraform execution by AWS_DEFAULT_REGION environment variable. I'll add "region" provider attribute to support setting region at the provider level.
There is a bit deep issue, if i'm not wrong - in case if you use just the single profile configured AWS CLI, the module is working, but as soon as you use a multi profile setup, the region is not pulled in to the module.
In my case it doesn't work through Azure DevOps pipeline (IMO it should use a variable to configure the region), AND another thing, when I added AWS_DEFAULT_REGION to the pipeline, it didn't work either. It says there are no EC2 instances (but there are 100%)
It says there are no EC2 instances (but there are 100%)
Are the EC2 instances "managed by SSM" (have SSM agent installed and the IAM role has permissions required by the SSM agent)?
The AWS client configuration (region and credentials) is loaded here https://github.com/pbobov/terraform-provider-ssm/blob/main/awstools/command.go#L42.
See https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Expected Behavior
What should have happened?
Actual Behavior
Steps to Reproduce
terraform apply