Skip to content
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

Update Google service account docs to display correct public key type #3787

Merged
merged 1 commit into from
Jul 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ description: |-
Get a Google Cloud Platform service account Public Key
---

# google\_service\_account\_key
# google_service_account_key

Get service account public key. For more information, see [the official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) and [API](https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts.keys/get).


## Example Usage

```hcl
Expand All @@ -34,13 +33,13 @@ data "google_service_account_key" "mykey" {
The following arguments are supported:

* `name` - (Required) The name of the service account key. This must have format
`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{KEYID}`, where `{ACCOUNT}`
is the email address or unique id of the service account.
`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{KEYID}`, where `{ACCOUNT}`
is the email address or unique id of the service account.

* `project` - (Optional) The ID of the project that the service account will be created in.
Defaults to the provider project configuration.
Defaults to the provider project configuration.

* `public_key_type` (Optional) The output format of the public key requested. X509_PEM is the default output format.
* `public_key_type` (Optional) The output format of the public key requested. TYPE_X509_PEM_FILE is the default output format.

## Attributes Reference

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ description: |-
Allows management of a Google Cloud Platform service account Key Pair
---

# google\_service\_account\_key
# google_service_account_key

Creates and manages service account key-pairs, which allow the user to establish identity of a service account outside of GCP. For more information, see [the official documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) and [API](https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts.keys).


## Example Usage, creating a new Key Pair

```hcl
Expand Down Expand Up @@ -61,7 +60,7 @@ Valid values are listed at
[ServiceAccountPrivateKeyType](https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts.keys#ServiceAccountKeyAlgorithm)
(only used on create)

* `public_key_type` (Optional) The output format of the public key requested. X509_PEM is the default output format.
* `public_key_type` (Optional) The output format of the public key requested. TYPE_X509_PEM_FILE is the default output format.

* `private_key_type` (Optional) The output format of the private key. TYPE_GOOGLE_CREDENTIALS_FILE is the default output format.

Expand All @@ -82,4 +81,3 @@ service account keys through the CLI or web console. This is only populated when

* `valid_before` - The key can be used before this timestamp.
A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".