-
Notifications
You must be signed in to change notification settings - Fork 553
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
New Resource: vault_gcp_auth_backend_role #124
New Resource: vault_gcp_auth_backend_role #124
Conversation
@angrylogic I've been using this fork for a bit, works well! 😄 Have you thought about extending it to also configure the GCP auth config as well? So actually giving it the credentials file: https://www.vaultproject.io/api/auth/gcp/index.html#configure So doing this step but with Terraform:
Then, you could do the entire process of Vault in GCP with Terraform: resource "vault_auth_backend" "gcp" {
path = "gcp"
type = "gcp"
}
resource "google_service_account_key" "vault_auth_checker_credentials" {
service_account_id = "${google_service_account.vault_auth_checker.name}"
public_key_type = "TYPE_X509_PEM_FILE"
}
resource "vault_auth_backend_gcp_config" gcp {
credentials = "${base64decode(google_service_account_key.vault_auth_checker_credentials.private_key)}"
} |
We're interested in this aswell... Any plans to get this merged? |
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.
This looks great! Thank you for writing it.
Would you be willing to merge in and push the latest master branch? If the tests pass, with that one change I'd be happy to approve and merge this PR.
|
||
log.Printf("[DEBUG] Writing role %q to GCP auth backend", path) | ||
_, err := client.Logical().Write(path, data) | ||
d.SetId(path) |
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.
Would it be possible to move this up a line so it's not between the err and the err check?
This PR enables managment of Vault GCP Auth backend roles.
* Remove the explicit *schema.Schema calls. * Move the SetId out from between the error checking.
a235a13
to
3df010a
Compare
@tyrannosaurus-becks -- rebased and addressed feedback in this one as well. Tests passing for me:
Thanks! |
…ckend_role New Resource: vault_gcp_auth_backend_role
This PR enables managment of Vault GCP Auth backend roles.