Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Disabled regions detection is using hardcoded region "us-east-1" that could be a disabled region in some configurations #242

Closed
Rackme opened this issue Nov 3, 2021 · 1 comment · Fixed by #341
Assignees
Labels
bug Something isn't working

Comments

@Rackme
Copy link

Rackme commented Nov 3, 2021

Describe the Bug

In some configurations, accounts could be regional and thus could not use the region "us-east-1", disabled by Service control policies (SCPs).

screenshot_318

Expected Behavior

If regions are specified in the config.hcl, the use of DescribeRegions to detect disable regions should use one of them.

CloudQuery Version

cq-provider-aws v0.6.0

Debug Output

cloudquery-AWS-disabledRegion

Steps to Reproduce

Use of the following configuration with an account limited to these regions :

provider "aws" {
  configuration {
    // Optional. if you want to assume role to multiple account and fetch data from them
    //accounts "<YOUR ID>" {
    // Optional. Role ARN we want to assume when accessing this account
    // role_arn = <YOUR_ROLE_ARN>
    // }
    regions = ["eu-west-3", "eu-central-1"]
    // Optional. Enable AWS SDK debug logging.
    aws_debug = true
  }

Additionnal content

I will probably do a PR for this one. I might have the time for it.

References

#39

@Rackme Rackme added the bug Something isn't working label Nov 3, 2021
@roneli
Copy link
Contributor

roneli commented Nov 3, 2021

Hi @Rackme, thanks for the issue, yes that makes sense we can either make it configurable to disable checking disabled regions, or create a fallback in this case to find disabled regions with regions defined from the list of regions given.

Tell me if you require any assistance with the PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
3 participants