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

aws doesn't initialize for govcloud credentials #253

Closed
rirze opened this issue Nov 29, 2021 · 5 comments
Closed

aws doesn't initialize for govcloud credentials #253

rirze opened this issue Nov 29, 2021 · 5 comments
Labels
Type: Bug Something isn't working

Comments

@rirze
Copy link

rirze commented Nov 29, 2021

General information:

  • Operating System: Ubuntu 20.04
  • Terracognita version / tag: v0.7.4
  • Did you build Terracognita from sources or did you use the Docker image: source

Describe the bug:
Using Govcloud credentials fails with the following error

could not initialize 'reader' because: InvalidClientTokenId: The security token included in the request is invalid.
	status code: 403, request id: 77795d87-8696-4ad7-898c-d0ecdafc4a6b

I have used all combinations of command flags and environment variables to test if something would work, but it does not. To make sure my credentials were valid, I ran serveral aws ... commands, and they ran succesfully.

As a control, I am able to connect to another account in us-east-1 and terracognita works for me there.

Log message

could not initialize 'reader' because: InvalidClientTokenId: The security token included in the request is invalid.
	status code: 403, request id: 77795d87-8696-4ad7-898c-d0ecdafc4a6b

Additional context

I tried looking through the code for anything that would break for Govcloud or regions like us-gov-west-1 but I couldn't find anything. I suspect it's something special about the region that breaks the initializer.

@rirze rirze added the Type: Bug Something isn't working label Nov 29, 2021
@jkarmstr-seed
Copy link

const defaultRegion string = "eu-west-1"

Some accounts are region dependent (e.g. GovCloud). Validating against Europe won't work.

@rirze
Copy link
Author

rirze commented Feb 25, 2022

@jkarmstr-seed Due to the months-long lack of reply, I'm going to assume the cycloidio team don't particularly care about this issue.

I have since started working at a different company and gone back to using terraformer for extracting Terraform resources out of Govcloud environments. I suggest anyone else to do the same.

@xescugc
Copy link
Member

xescugc commented Mar 31, 2022

Sorry for this huge delay, for some reason my notifications got mixed/lost for this issues.

I've opened a PR with the change suggested by @jkarmstr-seed as it makes sense, we had that defaultRegion as a leftover on another library we had that we exported the code to TerraCognita.

The PR is #265, for now I'll not close this issue as we do not own a GovCloud account and cannot test it, once the PR is merged you could test if that solved the issue 😄

@jkarmstr-seed
Copy link

jkarmstr-seed commented Apr 4, 2022 via email

@xescugc
Copy link
Member

xescugc commented Apr 5, 2022

Perfect! then I'll close the issue and we'll release shortly :)

Thanks you @jkarmstr-seed :)

@xescugc xescugc closed this as completed Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants