Changed volume_mounts from list to map
This commit is contained in:
parent
35f51261bf
commit
2ae7965c5f
|
@ -136,11 +136,11 @@ module "cloud_run" {
|
||||||
|
|
||||||
| name | description | type | required | default |
|
| name | description | type | required | default |
|
||||||
|---|---|:---: |:---:|:---:|
|
|---|---|:---: |:---:|:---:|
|
||||||
| containers | Containers | <code title="list(object({ image = string command = list(string) args = list(string) env = map(string) env_from = map(object({ key = string name = string })) resources = object({ limits = object({ cpu = string memory = string }) requests = object({ cpu = string memory = string }) }) ports = list(object({ name = string protocol = string container_port = string })) volume_mounts = list(object({ name = string mount_path = string })) }))">list(object({...}))</code> | ✓ | |
|
| containers | Containers | <code title="list(object({ image = string command = list(string) args = list(string) env = map(string) env_from = map(object({ key = string name = string })) resources = object({ limits = object({ cpu = string memory = string }) requests = object({ cpu = string memory = string }) }) ports = list(object({ name = string protocol = string container_port = string })) volume_mounts = map(string) }))">list(object({...}))</code> | ✓ | |
|
||||||
| name | Name used for cloud run service | <code title="">string</code> | ✓ | |
|
| name | Name used for cloud run service | <code title="">string</code> | ✓ | |
|
||||||
| project_id | Project id used for all resources. | <code title="">string</code> | ✓ | |
|
| project_id | Project id used for all resources. | <code title="">string</code> | ✓ | |
|
||||||
| *audit_log_triggers* | Event arc triggers (Audit log) | <code title="list(object({ service_name = string method_name = string }))">list(object({...}))</code> | | <code title="">null</code> |
|
| *audit_log_triggers* | Event arc triggers (Audit log) | <code title="list(object({ service_name = string method_name = string }))">list(object({...}))</code> | | <code title="">null</code> |
|
||||||
| *iam* | IAM bindings for topic in {ROLE => [MEMBERS]} format. | <code title="map(list(string))">map(list(string))</code> | | <code title="">{}</code> |
|
| *iam* | IAM bindings for Cloud Run service in {ROLE => [MEMBERS]} format. | <code title="map(list(string))">map(list(string))</code> | | <code title="">{}</code> |
|
||||||
| *ingress_settings* | Ingress settings | <code title="">string</code> | | <code title="">null</code> |
|
| *ingress_settings* | Ingress settings | <code title="">string</code> | | <code title="">null</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> |
|
||||||
| *prefix* | Optional prefix used for resource names. | <code title="">string</code> | | <code title="">null</code> |
|
| *prefix* | Optional prefix used for resource names. | <code title="">string</code> | | <code title="">null</code> |
|
||||||
|
|
|
@ -96,10 +96,10 @@ resource "google_cloud_run_service" "service" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dynamic "volume_mounts" {
|
dynamic "volume_mounts" {
|
||||||
for_each = containers.value["volume_mounts"] == null ? [] : containers.value["volume_mounts"]
|
for_each = containers.value["volume_mounts"] == null ? {} : containers.value["volume_mounts"]
|
||||||
content {
|
content {
|
||||||
name = volume_mounts.value["name"]
|
name = volume_mounts.key
|
||||||
mount_path = volume_mounts.value["mount_path"]
|
mount_path = volume_mounts.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,10 +50,7 @@ variable "containers" {
|
||||||
protocol = string
|
protocol = string
|
||||||
container_port = string
|
container_port = string
|
||||||
}))
|
}))
|
||||||
volume_mounts = list(object({
|
volume_mounts = map(string)
|
||||||
name = string
|
|
||||||
mount_path = string
|
|
||||||
}))
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue