rename iam members variable in project module
This commit is contained in:
parent
d0ed3b7614
commit
d47478a466
|
@ -87,8 +87,8 @@ module "project" {
|
||||||
| *auto_create_network* | Whether to create the default network for the project | <code title="">bool</code> | | <code title="">false</code> |
|
| *auto_create_network* | Whether to create the default network for the project | <code title="">bool</code> | | <code title="">false</code> |
|
||||||
| *billing_account* | Billing account id. | <code title="">string</code> | | <code title="">null</code> |
|
| *billing_account* | Billing account id. | <code title="">string</code> | | <code title="">null</code> |
|
||||||
| *custom_roles* | Map of role name => list of permissions to create in this project. | <code title="map(list(string))">map(list(string))</code> | | <code title="">{}</code> |
|
| *custom_roles* | Map of role name => list of permissions to create in this project. | <code title="map(list(string))">map(list(string))</code> | | <code title="">{}</code> |
|
||||||
| *iam_additive* | Map of roles lists used to set non authoritative bindings, keyed by members | <code title="map(list(string))">map(list(string))</code> | | <code title="">{}</code> |
|
| *iam* | IAM bindings in {ROLE => [MEMBERS]} format. | <code title="map(set(string))">map(set(string))</code> | | <code title="">{}</code> |
|
||||||
| *iam_members* | Map of member lists used to set authoritative bindings, keyed by role. | <code title="map(set(string))">map(set(string))</code> | | <code title="">{}</code> |
|
| *iam_additive* | IAM additive bindings in {ROLE => [MEMBERS]} format. | <code title="map(list(string))">map(list(string))</code> | | <code title="">{}</code> |
|
||||||
| *labels* | Resource labels. | <code title="map(string)">map(string)</code> | | <code title="">{}</code> |
|
| *labels* | Resource labels. | <code title="map(string)">map(string)</code> | | <code title="">{}</code> |
|
||||||
| *lien_reason* | If non-empty, creates a project lien with this description. | <code title="">string</code> | | <code title=""></code> |
|
| *lien_reason* | If non-empty, creates a project lien with this description. | <code title="">string</code> | | <code title=""></code> |
|
||||||
| *oslogin* | Enable OS Login. | <code title="">bool</code> | | <code title="">false</code> |
|
| *oslogin* | Enable OS Login. | <code title="">bool</code> | | <code title="">false</code> |
|
||||||
|
|
|
@ -91,7 +91,7 @@ resource "google_project_service" "project_services" {
|
||||||
# - additive (non-authoritative) roles might fail due to dynamic values
|
# - additive (non-authoritative) roles might fail due to dynamic values
|
||||||
|
|
||||||
resource "google_project_iam_binding" "authoritative" {
|
resource "google_project_iam_binding" "authoritative" {
|
||||||
for_each = var.iam_members
|
for_each = var.iam
|
||||||
project = local.project.project_id
|
project = local.project.project_id
|
||||||
role = each.key
|
role = each.key
|
||||||
members = each.value
|
members = each.value
|
||||||
|
|
|
@ -32,14 +32,14 @@ variable "custom_roles" {
|
||||||
default = {}
|
default = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "iam_members" {
|
variable "iam" {
|
||||||
description = "Map of member lists used to set authoritative bindings, keyed by role."
|
description = "IAM bindings in {ROLE => [MEMBERS]} format."
|
||||||
type = map(set(string))
|
type = map(set(string))
|
||||||
default = {}
|
default = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "iam_additive" {
|
variable "iam_additive" {
|
||||||
description = "Map of roles lists used to set non authoritative bindings, keyed by members"
|
description = "IAM additive bindings in {ROLE => [MEMBERS]} format."
|
||||||
type = map(list(string))
|
type = map(list(string))
|
||||||
default = {}
|
default = {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ module "test" {
|
||||||
billing_account = "12345-12345-12345"
|
billing_account = "12345-12345-12345"
|
||||||
auto_create_network = var.auto_create_network
|
auto_create_network = var.auto_create_network
|
||||||
custom_roles = var.custom_roles
|
custom_roles = var.custom_roles
|
||||||
iam_members = var.iam_members
|
iam = var.iam
|
||||||
iam_additive = var.iam_additive
|
iam_additive = var.iam_additive
|
||||||
labels = var.labels
|
labels = var.labels
|
||||||
lien_reason = var.lien_reason
|
lien_reason = var.lien_reason
|
||||||
|
|
|
@ -24,7 +24,7 @@ variable "custom_roles" {
|
||||||
default = {}
|
default = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "iam_members" {
|
variable "iam" {
|
||||||
type = map(list(string))
|
type = map(list(string))
|
||||||
default = {}
|
default = {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue