iam-service-account

This commit is contained in:
Ludovico Magnocavallo 2021-10-19 21:05:09 +02:00
parent 7eb3b49628
commit 555de95f48
3 changed files with 8 additions and 0 deletions

View File

@ -32,6 +32,7 @@ module "myproject-default-service-accounts" {
|---|---|:---: |:---:|:---:|
| name | Name of the service account to create. | <code title="">string</code> | ✓ | |
| project_id | Project id where service account will be created. | <code title="">string</code> | ✓ | |
| *description* | Optional description. | <code title="">string</code> | | <code title="">null</code> |
| *display_name* | Display name of the service account to create. | <code title="">string</code> | | <code title="">Terraform-managed.</code> |
| *generate_key* | Generate a key for service account. | <code title="">bool</code> | | <code title="">false</code> |
| *iam* | IAM bindings on the service account in {ROLE => [MEMBERS]} format. | <code title="map&#40;list&#40;string&#41;&#41;">map(list(string))</code> | | <code title="">{}</code> |

View File

@ -79,6 +79,7 @@ resource "google_service_account" "service_account" {
project = var.project_id
account_id = "${local.prefix}${var.name}"
display_name = var.display_name
description = var.description
}
resource "google_service_account_key" "key" {

View File

@ -14,6 +14,12 @@
* limitations under the License.
*/
variable "description" {
description = "Optional description."
type = string
default = null
}
variable "display_name" {
description = "Display name of the service account to create."
type = string