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

Use canonical user Id instead of iam user to fix s3 invalid policy issue #51

Closed
wants to merge 2 commits into from

Conversation

hemanthudimella
Copy link

This PR fixes #50

@gyoza
Copy link

gyoza commented Sep 20, 2019

This will cause your applies to change the policy on every run.

osterman
osterman previously approved these changes Sep 20, 2019
Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @hemanthudimella

please rebuild README by executing these commands:

make init
make readme/deps
make readme

It will add the new variables and outputs to README.md automatically.

In general, any changes to README should be made in README.yaml (not in this case), and after that executing the commands above will rebuild README.yaml into README.md and add all new variables and outputs to README.md

thanks

@hemanthudimella
Copy link
Author

Done. Rebuilt README.

@aknysh
Copy link
Member

aknysh commented Sep 24, 2019

/codefresh run test

@aknysh
Copy link
Member

aknysh commented Sep 24, 2019

@hemanthudimella
please see comments from @gyoza #51 (comment)

you just need to replace ” “, “_” on the old value

@hemanthudimella
Copy link
Author

hemanthudimella commented Sep 25, 2019

@gyoza @aknysh
Did you mean replace manually? That means every time I apply a change, terraform removes my manual change, and I will have to do it again.
And if you didn't mean manual, please note that replacing " " with "_" works for all new policies. But any policies that are existing wouldn't accept "_" and terraform apply fails. (Existing policies are still accepting " " and " " only)
From my chat with AWS support, the recommended way is to use canonical user id instead.
They were also mentioning that the syntax is not yet finalized and we can expect the "_" to be replaced or removed in future without any notice as they replaced " " with "_" without notice.
However I agree that terraform plan will always show a change in the policy, if we use canonical user id (even though there is no change in the policy). Hopefully terraform fixes this soon.
But until then using canonical user id is the only way (at least as far as i know) to make both existing and new policies work.

@gyoza
Copy link

gyoza commented Sep 25, 2019 via email

@hemanthudimella
Copy link
Author

@gyoza Same here. I ended up forking the module. :)
@aknysh I suppose this module, at the moment, is unusable as is.

@aknysh
Copy link
Member

aknysh commented Nov 3, 2019

/codefresh run test

@aknysh
Copy link
Member

aknysh commented Nov 3, 2019

@hemanthudimella
please run terraform fmt (our CI/CD tests are failing).
After that, we'll merge the PR

@aknysh
Copy link
Member

aknysh commented Jan 15, 2020

@hemanthudimella please rebase and run terraform fmt and then rebuild README:

make init
make readme/deps
make readme

@maximmi
Copy link
Contributor

maximmi commented Feb 24, 2020

@hemanthudimella is this PR still actual due to changes made and merged after this one?

@hemanthudimella
Copy link
Author

Redundant PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error putting S3 policy: MalformedPolicy: Invalid principal in policy
5 participants