From 2a6bc134ae5a3af6c599dd9aab0bd0990fb7f4d4 Mon Sep 17 00:00:00 2001 From: Taylor Dolezal Date: Mon, 27 Jul 2020 13:40:38 -0700 Subject: [PATCH] Update Google service account docs to display correct public key type --- .../docs/d/service_account_key.html.markdown | 17 ++++----- .../google_service_account_key.html.markdown | 38 +++++++++---------- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/website/docs/d/service_account_key.html.markdown b/website/docs/d/service_account_key.html.markdown index 69a2201b9a0..7be89532534 100644 --- a/website/docs/d/service_account_key.html.markdown +++ b/website/docs/d/service_account_key.html.markdown @@ -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 @@ -33,17 +32,17 @@ 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. +- `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. -* `project` - (Optional) The ID of the project that the service account will be created in. - Defaults to the provider project configuration. +- `project` - (Optional) The ID of the project that the service account will be created in. + 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 The following attributes are exported in addition to the arguments listed above: -* `public_key` - The public key, base64 encoded +- `public_key` - The public key, base64 encoded diff --git a/website/docs/r/google_service_account_key.html.markdown b/website/docs/r/google_service_account_key.html.markdown index 15f073f6ff5..5e46e60c957 100644 --- a/website/docs/r/google_service_account_key.html.markdown +++ b/website/docs/r/google_service_account_key.html.markdown @@ -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 @@ -52,34 +51,33 @@ resource "kubernetes_secret" "google-application-credentials" { The following arguments are supported: -* `service_account_id` - (Required) The Service account id of the Key Pair. This can be a string in the format -`{ACCOUNT}` or `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`, where `{ACCOUNT}` is the email address or -unique id of the service account. If the `{ACCOUNT}` syntax is used, the project will be inferred from the account. +- `service_account_id` - (Required) The Service account id of the Key Pair. This can be a string in the format + `{ACCOUNT}` or `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`, where `{ACCOUNT}` is the email address or + unique id of the service account. If the `{ACCOUNT}` syntax is used, the project will be inferred from the account. -* `key_algorithm` - (Optional) The algorithm used to generate the key. KEY_ALG_RSA_2048 is the default algorithm. -Valid values are listed at -[ServiceAccountPrivateKeyType](https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts.keys#ServiceAccountKeyAlgorithm) -(only used on create) +- `key_algorithm` - (Optional) The algorithm used to generate the key. KEY_ALG_RSA_2048 is the default algorithm. + 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. +- `private_key_type` (Optional) The output format of the private key. TYPE_GOOGLE_CREDENTIALS_FILE is the default output format. ## Attributes Reference The following attributes are exported in addition to the arguments listed above: -* `id` - an identifier for the resource with format `projects/{{project}}/serviceAccounts/{{account}}/keys/{{key}}` - -* `name` - The name used for this key pair +- `id` - an identifier for the resource with format `projects/{{project}}/serviceAccounts/{{account}}/keys/{{key}}` -* `public_key` - The public key, base64 encoded +- `name` - The name used for this key pair -* `private_key` - The private key in JSON format, base64 encoded. This is what you normally get as a file when creating -service account keys through the CLI or web console. This is only populated when creating a new key. +- `public_key` - The public key, base64 encoded -* `valid_after` - The key can be used after this timestamp. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z". +- `private_key` - The private key in JSON format, base64 encoded. This is what you normally get as a file when creating + service account keys through the CLI or web console. This is only populated when creating a new key. -* `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". +- `valid_after` - The key can be used after this timestamp. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z". +- `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".