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

/conf/.aws symlink is not properly created in Geodesic >=3.x #958

Closed
justinbwood opened this issue Oct 11, 2024 · 1 comment · Fixed by #959
Closed

/conf/.aws symlink is not properly created in Geodesic >=3.x #958

justinbwood opened this issue Oct 11, 2024 · 1 comment · Fixed by #959
Labels
bug 🐛 An issue with the system

Comments

@justinbwood
Copy link

Describe the Bug

A change in the /etc/profile.d/aws.sh script in Geodesic 3 causes it to skip creation of the /conf/.aws symlink to /localhost/.aws if the latter directory already exists.

Steps to Reproduce

  1. Run docker run --rm cloudposse/geodesic:3.3.0-debian init | bash
  2. Run installed geodesic script
  3. Run assume-role to select a profile from the host system's ~/.aws/config

Symlink to /localhost/.aws is missing, causing tofu commands to fail with the following message:

| Error: failed to refresh cached credentials, the SSO session has expired or
│ is invalid: failed to read cached SSO token file, open
│ /conf/.aws/sso/cache/<guid>.json: no such
│ file or directory

Expected Behavior

Running tofu commands should load the aws sso cache properly from /conf/.aws

Additional Context

This appears to be related to PR #945, specifically the changes to aws.sh on L11 here:
https://github.com/cloudposse/geodesic/pull/945/files#diff-abfb531b678543f55ff5e43c165a1820748fa0a95ad1a7b1ef0aecb30feafde1R11

When the profile is sourced, ${GEODESIC_AWS_HOME} is equal to /localhost/.aws, which exists, so it skips creation of the symlink.

@justinbwood justinbwood added the bug 🐛 An issue with the system label Oct 11, 2024
@justinbwood justinbwood changed the title /conf/.aws symlink does not exist in Geodesic >=3.x /conf/.aws symlink is not properly created in Geodesic >=3.x Oct 11, 2024
Nuru added a commit that referenced this issue Oct 17, 2024
@Nuru
Copy link
Contributor

Nuru commented Oct 17, 2024

@justinbwood Thank you for bringing this to our attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants