feat: add data_source_google_service_account_jwt #4489
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes hashicorp/terraform-provider-google#6686.
This PR adds a
google_service_account_jwt
data source, similar to thegoogle_service_account_id_token
data source. The difference between this and theid_token
resource is that thejwt
data source can produce an arbitrary JWT, e.g. with a customsub
field, etc.We're interested in this in order to use our existing Google Cloud credentials to authenticate with other terraform providers that can trust JWTs signed by Google. The linked issue is for Vault, which is not our use-case, but would make sense as well.
Note: I've contributed to
terraform-provider-google
before, but this is my first time contributing tomagic-modules
! It definitely feels a little trickier, so let me know if you'd like anything else from me. I would like to add tests to this, but I wanted to at least get a temperature check on the PR before investing more time in it.If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)
Derived from GoogleCloudPlatform/magic-modules#6239