-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add new WIF fields for GCP Auth (Vault Enterprise only) #2256
Conversation
@@ -131,7 +131,7 @@ func gcpSecretBackendCreate(ctx context.Context, d *schema.ResourceData, meta in | |||
|
|||
d.Partial(true) | |||
log.Printf("[DEBUG] Mounting GCP backend at %q", path) | |||
useAPIVer117Ent := provider.IsAPISupported(meta, provider.VaultVersion117Ent) | |||
useAPIVer117Ent := provider.IsAPISupported(meta, provider.VaultVersion117) && provider.IsEnterpriseSupported(meta) |
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.
Was the previous check not sufficient to check for ent support?
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.
@fairclothjm upon testing with different versions I realized that since IsAPISupported
only checks if a semantic version is greater than the other, the previous check was passing for non-enterprise versions since v1.17.0
> v1.16.3+ent
. It looks like the safest bet is to check the enterprise metadata separately from the version comparison
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.
Thanks that makes sense. After this PR lands are we planning to update the other WIF TFVP resources to make the same check?
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.
Oh, looks like you may have covered those in this PR already with recent commits.
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.
LGTM! 🥳
Description
Adds the following new fields to the GCP Auth Backend resource to enable the WIF workflow:
identity_token_audience
identity_token_ttl
identity_token_key
service_account_email
Checklist
Output from acceptance testing: