-
Notifications
You must be signed in to change notification settings - Fork 64
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
Allow access to relevant data buckets #2951
Conversation
"s3:ListBucketMultipartUploads", | ||
"s3:AbortMultipartUpload", | ||
"s3:ListBucketVersions", | ||
"s3:CreateBucket", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is CreateBucket
necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, we should be fine without, thanks for pointing that out @yuvipanda !
@yuvipanda could you re-review this? Thanks |
Ping @2i2c-org/engineering |
I tried to run I followed the guidelines here to get CLI access to the AWS project in order to make terraform changes: https://infrastructure.2i2c.org/topic/access-creds/cloud-auth/#cloud-access-aws-iam-terminal Output of plan has difficulty reading certain resources:
I think the changes are fine, but I won't be able to apply them |
Wondering if this is somehow related: https://infrastructure.2i2c.org/hub-deployment-guide/new-cluster/aws/#grant-eksctl-access-to-other-users |
@damianavila Yes! I also wondered if it's because it's a NASA account? I remember we had to get the role for the continuous deployer exempted from some policy or other. Maybe I'm not allowed to use Access Keys without approval? |
I also tried running |
Ok, we are making progress. There is some copy-pasta in the cluster file that made me assume this was in the same account as the NASA VEDA cluster (I will open a PR to update that). Turns out, no other 2i2c engineers have accounts in the smce-ghg-center account yet, but Yuvi made me one yesterday. However, I still cannot run terraform code yet, and I do believe now it is what Damián mentioned above (I pinged Yuvi again): https://infrastructure.2i2c.org/hub-deployment-guide/new-cluster/aws/#grant-eksctl-access-to-other-users Current terraform errors:
|
Thanks for working on this! @sgibson91. 🙇 When do you think this will be done? |
@slesaad I need Yuvi to grant me the correct permissions on the cluster to be able to execute the terraform apply. Unfortunately, he is currently out sick. |
ah okay, hope he feels better soon. |
Ok, so turns out because MFA is enforced on the account, I also have to MFA-authenticate my CLI following these docs: https://repost.aws/knowledge-center/authenticate-mfa-cli I used the named profile option and used the Access Key ID, Secret Access Key, and Session Token returned from the So I did that, but I still get an error, but a different one:
|
The session token I was given had backslashes in it that needed escaping. But I am back to
[edited to add: the actual policy update is missing from this plan because I switched to a new branch to update our AWS auth docs and didn't switch back when trying to do terraform again] |
7852a7e
to
1104adb
Compare
Apologies for all the issues caused here - I got waylaid hard by covid just as I was finishing this up and hadn't given anyone else access :( After that I think our interaction with 2FA on AWS wasn't documented enough.... I've updated @sgibson91's #2998 to include both better documentation about using AWS MFA from the CLI, as well as a convenience command to set it up correctly easilyy - With that, I was able to run the following commands and apply this: $ deployer exec-aws-shell ghg arn:aws:iam::597746869805:mfa/phone <code>
$ cd terraform/aws,
$ terraform workspace select nasa-ghg
$ terraform apply -var-file projects/nasa-ghg.tfvars This applied cleanly, and am going to merge this now to reflect that. @slesaad try this out and see if this works? Again, my immune system apologises to everyone for the issues caused. |
What's changed
Extra IAM policy added for access to relevant buckets for the Greenhouse Gas Center Hub.