-
Notifications
You must be signed in to change notification settings - Fork 473
feat: Add support for autokey in postgres module #712
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
Conversation
|
@imrannayer can you trigger lint again? |
|
@imrannayer can you trigger gcbrun? |
|
/gcbrun |
|
@ps-occrp integration test is failing with following error: |
|
@imrannayer how do you suggest to solve this? Service account doesn't have permission to setup autokey on folder where project is being created. Can we create test folder within current folder? I don't know if there are sufficient permissions for this as well. Also I don't know what GCP module maintainers policy is about this kind of things. |
|
@ps-occrp check these examples |
|
@imrannayer If I understand correctly it would be something like this? and entitlement_requesters should be service account that runs/sets up test infra. I don't know which service account that is or how to get that information. module "entitlement_folder" {
source = "GoogleCloudPlatform/pam/google"
version = "~> 2.0"
entitlement_id = "autokey-entitlement"
parent_id = var.folder_id
parent_type = "folder"
organization_id = var.org_id
grant_service_agent_permissions = true
entitlement_requesters = [
"serviceAccount:${var.entitlement_requester}",
]
entitlement_approvers = ["domain:google.com",]
role_bindings = [
{
role = "roles/cloudkms.autokeyAdmin"
}
]
} |
|
@ps-occrp sorry pasted wrong link. As part of setup you can create an autokey folder/project and grant appropriate permissions. Follow this example |
|
@ps-occrp seems like autokey module is restricting TF version to 5.X. Can you plz avoid that module and follow the example I sent u earlier? |
|
@imrannayer can you trigger it again? |
|
/gcbrun |
|
@imrannayer I have switched to using module to get random project id, can you test now? In my test environment I am able to run it. |
|
@ps-occrp integration test is failing to setup. Can you move following block from setup to example? Since your Service account has appropriate permission on the folder you created it should work fine there. |
|
@imrannayer How should autokey folder id and project id be passed to example? Folder id I might be able to get from datasource but not sure about autokey project id. Should I use fixtures for that? If so can you point me to an example. |
|
@ps-occrp you can put it in output on setup and define it as same name variable in your example. This is how example gets project_id |
|
@imrannayer here I am already doing it, I think this way it should work. |
|
@ps-occrp you can remove fixtures. Just add variables in example key_project_id and folder_id |
|
@imrannayer done! |
|
@ps-occrp lint test is failing |
|
@imrannayer can you trigger workflow again? |
|
@ps-occrp can u plz add following variables to fixture file for postgres-ha? I thought is is called directly but seems like test if calling it through fixture. |
This reverts commit 812e42a.
|
done! |
|
@imrannayer can you run gcbrun again? |
|
/gcbrun |
|
@imrannayer what's the issue? I think this time its in example right? |
|
@imrannayer done! |
|
@ps-occrp can u plz fix lint issues? |
|
@imrannayer fixed linting |
|
/gcbrun |
1 similar comment
|
/gcbrun |
|
@imrannayer can you tell me what changed between two gcbruns? |
Add support for autokey in Postgres module.
For testing its using same project as autokey project for simplicity.