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

l0-setup: AccessDenied error when finishing 'apply' #610

Open
tlake opened this issue Apr 24, 2018 · 0 comments
Open

l0-setup: AccessDenied error when finishing 'apply' #610

tlake opened this issue Apr 24, 2018 · 0 comments
Labels

Comments

@tlake
Copy link
Contributor

tlake commented Apr 24, 2018

Expected behavior

Running l0-setup apply [instance] should complete without error.

Actual behavior

The end of the apply workflow incorporates the push workflow in order to backup the terraform files to S3. However, that apply doesn't seem to have access to the newly-created instance's credentials, so the push fails with AccessDenied. Using l0-setup endpoint to put the credentials into the environment and then re-running the same apply will then succeed, because apply will have access to those creds in the env vars.

Steps to reproduce the behavior

  • l0-setup apply [new-instance] and watch it fail at the end.
  • eval $( l0-setup endpoint -d -i [new-instance] | sed -n '1!p' ) to get env vars.
  • l0-setup apply [new-instance] and watch it succeed because of env vars.

Thoughts on how to proceed

The issue stems from an attempt to consolidate two commands into one without the prereq's for one of those commands. I have a couple of suggestions up front:

  • Fully separate the push workflow from the apply workflow. This makes the backing up of a layer0 instance's terraform files a responsibility of the user.
  • Incorporate the endpoint workflow into the apply workflow as well, so that when push is executed, it has the required credentials in the environment.
@tlake tlake added the bug label Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant