Merge remote-tracking branch 'origin/master' into fast-dev

This commit is contained in:
Ludovico Magnocavallo
2025-09-03 14:33:52 +02:00
6 changed files with 63 additions and 47 deletions

View File

@@ -18,7 +18,7 @@
locals {
fleet_clusters = var.fleet_config == null ? {} : {
for k, v in var.clusters : k => v.configmanagement_template
for k, v in var.clusters : k => v.fleet_config.configmanagement_template
if v.fleet_config.register == true
}
fleet_mcs_enabled = (

View File

@@ -66,8 +66,9 @@ module "alloydb" {
network = module.vpc.id
}
}
instance_name = "db"
location = var.region
instance_name = "db"
location = var.region
deletion_protection = false
}
# tftest modules=3 resources=17 inventory=simple.yaml e2e
```
@@ -95,6 +96,7 @@ module "alloydb" {
node_count = 2
}
}
deletion_protection = false
}
# tftest modules=1 resources=4 inventory=read_pool.yaml e2e
```
@@ -118,6 +120,7 @@ module "alloydb" {
enabled = true
region = "europe-west12"
}
deletion_protection = false
}
# tftest modules=1 resources=4 inventory=cross_region_replication.yaml e2e
```
@@ -141,6 +144,7 @@ module "alloydb" {
network_config = {
psc_config = { allowed_consumer_projects = [var.project_number] }
}
deletion_protection = false
}
# tftest modules=1 resources=2 inventory=psc.yaml e2e
```
@@ -176,6 +180,7 @@ module "alloydb" {
password = "mypassword"
}
}
deletion_protection = false
}
# tftest modules=1 resources=5 inventory=custom.yaml e2e
```
@@ -246,6 +251,7 @@ module "alloydb" {
encryption_config = {
primary_kms_key_name = module.kms.keys.key-regional.id
}
deletion_protection = false
}
# tftest inventory=cmek.yaml e2e
@@ -286,6 +292,7 @@ module "alloydb" {
tag_bindings = {
env-sandbox = module.org.tag_values["environment/sandbox"].id
}
deletion_protection = false
}
# tftest modules=2 resources=7
```
@@ -295,10 +302,10 @@ module "alloydb" {
| name | description | type | required | default |
|---|---|:---:|:---:|:---:|
| [cluster_name](variables.tf#L81) | Name of the primary cluster. | <code>string</code> | ✓ | |
| [instance_name](variables.tf#L177) | Name of primary instance. | <code>string</code> | ✓ | |
| [location](variables.tf#L189) | Region or zone of the cluster and instance. | <code>string</code> | ✓ | |
| [network_config](variables.tf#L234) | Network configuration for cluster and instance. Only one between psa_config and psc_config can be used. | <code title="object&#40;&#123;&#10; psa_config &#61; optional&#40;object&#40;&#123;&#10; network &#61; string&#10; allocated_ip_range &#61; optional&#40;string&#41;&#10; authorized_external_networks &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; enable_public_ip &#61; optional&#40;bool, false&#41;&#10; enable_outbound_public_ip &#61; optional&#40;bool, false&#41;&#10; &#125;&#41;&#41;&#10; psc_config &#61; optional&#40;object&#40;&#123;&#10; allowed_consumer_projects &#61; list&#40;string&#41;&#10; &#125;&#41;&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | ✓ | |
| [project_id](variables.tf#L269) | The ID of the project where this instances will be created. | <code>string</code> | ✓ | |
| [instance_name](variables.tf#L183) | Name of primary instance. | <code>string</code> | ✓ | |
| [location](variables.tf#L195) | Region or zone of the cluster and instance. | <code>string</code> | ✓ | |
| [network_config](variables.tf#L240) | Network configuration for cluster and instance. Only one between psa_config and psc_config can be used. | <code title="object&#40;&#123;&#10; psa_config &#61; optional&#40;object&#40;&#123;&#10; network &#61; string&#10; allocated_ip_range &#61; optional&#40;string&#41;&#10; authorized_external_networks &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; enable_public_ip &#61; optional&#40;bool, false&#41;&#10; enable_outbound_public_ip &#61; optional&#40;bool, false&#41;&#10; &#125;&#41;&#41;&#10; psc_config &#61; optional&#40;object&#40;&#123;&#10; allowed_consumer_projects &#61; list&#40;string&#41;&#10; &#125;&#41;&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | ✓ | |
| [project_id](variables.tf#L275) | The ID of the project where this instances will be created. | <code>string</code> | ✓ | |
| [annotations](variables.tf#L17) | Map FLAG_NAME=>VALUE for annotations which allow client tools to store small amount of arbitrary data. | <code>map&#40;string&#41;</code> | | <code>null</code> |
| [automated_backup_configuration](variables.tf#L23) | Automated backup settings for cluster. | <code title="object&#40;&#123;&#10; enabled &#61; optional&#40;bool, false&#41;&#10; backup_window &#61; optional&#40;string, &#34;1800s&#34;&#41;&#10; location &#61; optional&#40;string&#41;&#10; weekly_schedule &#61; optional&#40;object&#40;&#123;&#10; days_of_week &#61; optional&#40;list&#40;string&#41;, &#91;&#10; &#34;MONDAY&#34;, &#34;TUESDAY&#34;, &#34;WEDNESDAY&#34;, &#34;THURSDAY&#34;, &#34;FRIDAY&#34;, &#34;SATURDAY&#34;, &#34;SUNDAY&#34;&#10; &#93;&#41;&#10; start_times &#61; optional&#40;object&#40;&#123;&#10; hours &#61; optional&#40;number, 23&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; retention_count &#61; optional&#40;number, 7&#41;&#10; retention_period &#61; optional&#40;string&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [availability_type](variables.tf#L58) | Availability type for the primary replica. Either `ZONAL` or `REGIONAL`. | <code>string</code> | | <code>&#34;REGIONAL&#34;</code> |
@@ -308,22 +315,23 @@ module "alloydb" {
| [cross_region_replication](variables.tf#L97) | Cross region replication config. | <code title="object&#40;&#123;&#10; enabled &#61; optional&#40;bool, false&#41;&#10; promote_secondary &#61; optional&#40;bool, false&#41;&#10; switchover_mode &#61; optional&#40;bool, false&#41;&#10; region &#61; optional&#40;string&#41;&#10; secondary_cluster_display_name &#61; optional&#40;string&#41;&#10; secondary_cluster_name &#61; optional&#40;string&#41;&#10; secondary_instance_display_name &#61; optional&#40;string&#41;&#10; secondary_instance_name &#61; optional&#40;string&#41;&#10; secondary_machine_config &#61; optional&#40;object&#40;&#123;&#10; cpu_count &#61; number&#10; machine_type &#61; optional&#40;string&#41;&#10; &#125;&#41;&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [database_version](variables.tf#L129) | Database type and version to create. | <code>string</code> | | <code>&#34;POSTGRES_15&#34;</code> |
| [deletion_policy](variables.tf#L135) | AlloyDB cluster and instance deletion policy. | <code>string</code> | | <code>null</code> |
| [display_name](variables.tf#L141) | AlloyDB instance display name. | <code>string</code> | | <code>null</code> |
| [encryption_config](variables.tf#L147) | Set encryption configuration. KMS name format: 'projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]'. | <code title="object&#40;&#123;&#10; primary_kms_key_name &#61; string&#10; secondary_kms_key_name &#61; optional&#40;string&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>null</code> |
| [flags](variables.tf#L156) | Map FLAG_NAME=>VALUE for database-specific tuning. | <code>map&#40;string&#41;</code> | | <code>null</code> |
| [gce_zone](variables.tf#L162) | The GCE zone that the instance should serve from. This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. | <code>string</code> | | <code>null</code> |
| [initial_user](variables.tf#L168) | AlloyDB cluster initial user credentials. | <code title="object&#40;&#123;&#10; user &#61; optional&#40;string, &#34;postgres&#34;&#41;&#10; password &#61; string&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>null</code> |
| [labels](variables.tf#L183) | Labels to be attached to all instances. | <code>map&#40;string&#41;</code> | | <code>null</code> |
| [machine_config](variables.tf#L195) | AlloyDB machine config. | <code title="object&#40;&#123;&#10; cpu_count &#61; optional&#40;number, 2&#41;&#10; machine_type &#61; optional&#40;string&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [maintenance_config](variables.tf#L209) | Set maintenance window configuration. | <code title="object&#40;&#123;&#10; enabled &#61; optional&#40;bool, false&#41;&#10; day &#61; optional&#40;string, &#34;SUNDAY&#34;&#41;&#10; start_time &#61; optional&#40;object&#40;&#123;&#10; hours &#61; optional&#40;number, 23&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [prefix](variables.tf#L259) | Optional prefix used to generate instance names. | <code>string</code> | | <code>null</code> |
| [project_number](variables.tf#L274) | The project number of the project where this instances will be created. Only used for testing purposes. | <code>string</code> | | <code>null</code> |
| [query_insights_config](variables.tf#L280) | Query insights config. | <code title="object&#40;&#123;&#10; query_string_length &#61; optional&#40;number, 1024&#41;&#10; record_application_tags &#61; optional&#40;bool, true&#41;&#10; record_client_address &#61; optional&#40;bool, true&#41;&#10; query_plans_per_minute &#61; optional&#40;number, 5&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [read_pool](variables.tf#L291) | Map of read pool instances to create in the primary cluster. | <code title="map&#40;object&#40;&#123;&#10; display_name &#61; optional&#40;string&#41;&#10; node_count &#61; optional&#40;number, 1&#41;&#10; flags &#61; optional&#40;map&#40;string&#41;&#41;&#10; client_connection_config &#61; optional&#40;object&#40;&#123;&#10; require_connectors &#61; optional&#40;bool, false&#41;&#10; ssl_config &#61; optional&#40;object&#40;&#123;&#10; ssl_mode &#61; string&#10; &#125;&#41;&#41;&#10; &#125;&#41;&#41;&#10; machine_config &#61; optional&#40;object&#40;&#123;&#10; cpu_count &#61; optional&#40;number, 2&#41;&#10; machine_type &#61; optional&#40;string&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; network_config &#61; optional&#40;object&#40;&#123;&#10; authorized_external_networks &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; enable_public_ip &#61; optional&#40;bool, false&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; query_insights_config &#61; optional&#40;object&#40;&#123;&#10; query_string_length &#61; optional&#40;number, 1024&#41;&#10; record_application_tags &#61; optional&#40;bool, true&#41;&#10; record_client_address &#61; optional&#40;bool, true&#41;&#10; query_plans_per_minute &#61; optional&#40;number, 5&#41;&#10; &#125;&#41;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [skip_await_major_version_upgrade](variables.tf#L336) | Set to true to skip awaiting on the major version upgrade of the cluster. | <code>bool</code> | | <code>true</code> |
| [subscription_type](variables.tf#L342) | The subscription type of cluster. Possible values are: 'STANDARD' or 'TRIAL'. | <code>string</code> | | <code>&#34;STANDARD&#34;</code> |
| [tag_bindings](variables.tf#L348) | Tag bindings for this service, in key => tag value id format. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [users](variables.tf#L355) | Map of users to create in the primary instance (and replicated to other replicas). Set PASSWORD to null if you want to get an autogenerated password. The user types available are: 'ALLOYDB_BUILT_IN' or 'ALLOYDB_IAM_USER'. | <code title="map&#40;object&#40;&#123;&#10; password &#61; optional&#40;string&#41;&#10; roles &#61; optional&#40;list&#40;string&#41;, &#91;&#34;alloydbsuperuser&#34;&#93;&#41;&#10; type &#61; optional&#40;string, &#34;ALLOYDB_BUILT_IN&#34;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [deletion_protection](variables.tf#L141) | Whether Terraform will be prevented from destroying the cluster. When the field is set to true or unset in Terraform state, a terraform apply or terraform destroy that would delete the cluster will fail. When the field is set to false, deleting the cluster is allowed. | <code>bool</code> | | <code>null</code> |
| [display_name](variables.tf#L147) | AlloyDB instance display name. | <code>string</code> | | <code>null</code> |
| [encryption_config](variables.tf#L153) | Set encryption configuration. KMS name format: 'projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]'. | <code title="object&#40;&#123;&#10; primary_kms_key_name &#61; string&#10; secondary_kms_key_name &#61; optional&#40;string&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>null</code> |
| [flags](variables.tf#L162) | Map FLAG_NAME=>VALUE for database-specific tuning. | <code>map&#40;string&#41;</code> | | <code>null</code> |
| [gce_zone](variables.tf#L168) | The GCE zone that the instance should serve from. This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. | <code>string</code> | | <code>null</code> |
| [initial_user](variables.tf#L174) | AlloyDB cluster initial user credentials. | <code title="object&#40;&#123;&#10; user &#61; optional&#40;string, &#34;postgres&#34;&#41;&#10; password &#61; string&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>null</code> |
| [labels](variables.tf#L189) | Labels to be attached to all instances. | <code>map&#40;string&#41;</code> | | <code>null</code> |
| [machine_config](variables.tf#L201) | AlloyDB machine config. | <code title="object&#40;&#123;&#10; cpu_count &#61; optional&#40;number, 2&#41;&#10; machine_type &#61; optional&#40;string&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [maintenance_config](variables.tf#L215) | Set maintenance window configuration. | <code title="object&#40;&#123;&#10; enabled &#61; optional&#40;bool, false&#41;&#10; day &#61; optional&#40;string, &#34;SUNDAY&#34;&#41;&#10; start_time &#61; optional&#40;object&#40;&#123;&#10; hours &#61; optional&#40;number, 23&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [prefix](variables.tf#L265) | Optional prefix used to generate instance names. | <code>string</code> | | <code>null</code> |
| [project_number](variables.tf#L280) | The project number of the project where this instances will be created. Only used for testing purposes. | <code>string</code> | | <code>null</code> |
| [query_insights_config](variables.tf#L286) | Query insights config. | <code title="object&#40;&#123;&#10; query_string_length &#61; optional&#40;number, 1024&#41;&#10; record_application_tags &#61; optional&#40;bool, true&#41;&#10; record_client_address &#61; optional&#40;bool, true&#41;&#10; query_plans_per_minute &#61; optional&#40;number, 5&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [read_pool](variables.tf#L297) | Map of read pool instances to create in the primary cluster. | <code title="map&#40;object&#40;&#123;&#10; display_name &#61; optional&#40;string&#41;&#10; node_count &#61; optional&#40;number, 1&#41;&#10; flags &#61; optional&#40;map&#40;string&#41;&#41;&#10; client_connection_config &#61; optional&#40;object&#40;&#123;&#10; require_connectors &#61; optional&#40;bool, false&#41;&#10; ssl_config &#61; optional&#40;object&#40;&#123;&#10; ssl_mode &#61; string&#10; &#125;&#41;&#41;&#10; &#125;&#41;&#41;&#10; machine_config &#61; optional&#40;object&#40;&#123;&#10; cpu_count &#61; optional&#40;number, 2&#41;&#10; machine_type &#61; optional&#40;string&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; network_config &#61; optional&#40;object&#40;&#123;&#10; authorized_external_networks &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; enable_public_ip &#61; optional&#40;bool, false&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; query_insights_config &#61; optional&#40;object&#40;&#123;&#10; query_string_length &#61; optional&#40;number, 1024&#41;&#10; record_application_tags &#61; optional&#40;bool, true&#41;&#10; record_client_address &#61; optional&#40;bool, true&#41;&#10; query_plans_per_minute &#61; optional&#40;number, 5&#41;&#10; &#125;&#41;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [skip_await_major_version_upgrade](variables.tf#L342) | Set to true to skip awaiting on the major version upgrade of the cluster. | <code>bool</code> | | <code>true</code> |
| [subscription_type](variables.tf#L348) | The subscription type of cluster. Possible values are: 'STANDARD' or 'TRIAL'. | <code>string</code> | | <code>&#34;STANDARD&#34;</code> |
| [tag_bindings](variables.tf#L354) | Tag bindings for this service, in key => tag value id format. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [users](variables.tf#L361) | Map of users to create in the primary instance (and replicated to other replicas). Set PASSWORD to null if you want to get an autogenerated password. The user types available are: 'ALLOYDB_BUILT_IN' or 'ALLOYDB_IAM_USER'. | <code title="map&#40;object&#40;&#123;&#10; password &#61; optional&#40;string&#41;&#10; roles &#61; optional&#40;list&#40;string&#41;, &#91;&#34;alloydbsuperuser&#34;&#93;&#41;&#10; type &#61; optional&#40;string, &#34;ALLOYDB_BUILT_IN&#34;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
## Outputs

View File

@@ -61,6 +61,7 @@ resource "google_alloydb_cluster" "primary" {
cluster_type = var.cross_region_replication.switchover_mode ? "SECONDARY" : "PRIMARY"
database_version = var.database_version
deletion_policy = var.deletion_policy
deletion_protection = var.deletion_protection
display_name = coalesce(var.cluster_display_name, local.primary_cluster_name)
labels = var.labels
location = var.location

View File

@@ -138,6 +138,12 @@ variable "deletion_policy" {
default = null
}
variable "deletion_protection" {
description = "Whether Terraform will be prevented from destroying the cluster. When the field is set to true or unset in Terraform state, a terraform apply or terraform destroy that would delete the cluster will fail. When the field is set to false, deleting the cluster is allowed."
type = bool
default = null
}
variable "display_name" {
description = "AlloyDB instance display name."
type = string

View File

@@ -945,7 +945,7 @@ module "worker" {
project_id = var.project_id
name = "worker"
region = var.region
launch_stage = "ALPHA"
launch_stage = "BETA"
revision = {
gpu_zonal_redundancy_disabled = true
node_selector = {
@@ -985,15 +985,15 @@ module "worker" {
| [labels](variables.tf#L130) | Resource labels. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [launch_stage](variables.tf#L136) | The launch stage as defined by Google Cloud Platform Launch Stages. | <code>string</code> | | <code>null</code> |
| [managed_revision](variables.tf#L153) | Whether the Terraform module should control the deployment of revisions. | <code>bool</code> | | <code>true</code> |
| [revision](variables.tf#L175) | Revision template configurations. | <code title="object&#40;&#123;&#10; gpu_zonal_redundancy_disabled &#61; optional&#40;bool&#41;&#10; labels &#61; optional&#40;map&#40;string&#41;&#41;&#10; name &#61; optional&#40;string&#41;&#10; node_selector &#61; optional&#40;object&#40;&#123;&#10; accelerator &#61; string&#10; &#125;&#41;&#41;&#10; vpc_access &#61; optional&#40;object&#40;&#123;&#10; connector &#61; optional&#40;string&#41;&#10; egress &#61; optional&#40;string&#41;&#10; network &#61; optional&#40;string&#41;&#10; subnet &#61; optional&#40;string&#41;&#10; tags &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; timeout &#61; optional&#40;string&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [service_account](variables.tf#L235) | Service account email. Unused if service account is auto-created. | <code>string</code> | | <code>null</code> |
| [service_account_create](variables.tf#L241) | Auto-create service account. | <code>bool</code> | | <code>false</code> |
| [service_config](variables.tf#L247) | Cloud Run service specific configuration options. | <code title="object&#40;&#123;&#10; custom_audiences &#61; optional&#40;list&#40;string&#41;, null&#41;&#10; eventarc_triggers &#61; optional&#40;&#10; object&#40;&#123;&#10; audit_log &#61; optional&#40;map&#40;object&#40;&#123;&#10; method &#61; string&#10; service &#61; string&#10; &#125;&#41;&#41;&#41;&#10; pubsub &#61; optional&#40;map&#40;string&#41;&#41;&#10; storage &#61; optional&#40;map&#40;object&#40;&#123;&#10; bucket &#61; string&#10; path &#61; optional&#40;string&#41;&#10; &#125;&#41;&#41;&#41;&#10; service_account_email &#61; optional&#40;string&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; gen2_execution_environment &#61; optional&#40;bool, false&#41;&#10; iap_config &#61; optional&#40;object&#40;&#123;&#10; iam &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; iam_additive &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; &#125;&#41;, null&#41;&#10; ingress &#61; optional&#40;string, null&#41;&#10; invoker_iam_disabled &#61; optional&#40;bool, false&#41;&#10; max_concurrency &#61; optional&#40;number&#41;&#10; scaling &#61; optional&#40;object&#40;&#123;&#10; max_instance_count &#61; optional&#40;number&#41;&#10; min_instance_count &#61; optional&#40;number&#41;&#10; &#125;&#41;&#41;&#10; timeout &#61; optional&#40;string&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [tag_bindings](variables.tf#L310) | Tag bindings for this service, in key => tag value id format. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [type](variables.tf#L317) | Type of Cloud Run resource to deploy: JOB, SERVICE or WORKERPOOL. | <code>string</code> | | <code>&#34;SERVICE&#34;</code> |
| [volumes](variables.tf#L327) | Named volumes in containers in name => attributes format. | <code title="map&#40;object&#40;&#123;&#10; secret &#61; optional&#40;object&#40;&#123;&#10; name &#61; string&#10; default_mode &#61; optional&#40;string&#41;&#10; path &#61; optional&#40;string&#41;&#10; version &#61; optional&#40;string&#41;&#10; mode &#61; optional&#40;string&#41;&#10; &#125;&#41;&#41;&#10; cloud_sql_instances &#61; optional&#40;list&#40;string&#41;&#41;&#10; empty_dir_size &#61; optional&#40;string&#41;&#10; gcs &#61; optional&#40;object&#40;&#123;&#10; bucket &#61; string&#10; is_read_only &#61; optional&#40;bool&#41;&#10; &#125;&#41;&#41;&#10; nfs &#61; optional&#40;object&#40;&#123;&#10; server &#61; string&#10; path &#61; optional&#40;string&#41;&#10; is_read_only &#61; optional&#40;bool&#41;&#10; &#125;&#41;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [revision](variables.tf#L175) | Revision template configurations. | <code title="object&#40;&#123;&#10; gpu_zonal_redundancy_disabled &#61; optional&#40;bool&#41;&#10; labels &#61; optional&#40;map&#40;string&#41;&#41;&#10; name &#61; optional&#40;string&#41;&#10; node_selector &#61; optional&#40;object&#40;&#123;&#10; accelerator &#61; string&#10; &#125;&#41;&#41;&#10; vpc_access &#61; optional&#40;object&#40;&#123;&#10; connector &#61; optional&#40;string&#41;&#10; egress &#61; optional&#40;string&#41;&#10; network &#61; optional&#40;string&#41;&#10; subnet &#61; optional&#40;string&#41;&#10; tags &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; timeout &#61; optional&#40;string&#41;&#10; gen2_execution_environment &#61; optional&#40;any&#41; &#35; DEPRECATED&#10; job &#61; optional&#40;any&#41; &#35; DEPRECATED&#10; max_concurrency &#61; optional&#40;any&#41; &#35; DEPRECATED&#10; max_instance_count &#61; optional&#40;any&#41; &#35; DEPRECATED&#10; min_instance_count &#61; optional&#40;any&#41; &#35; DEPRECATED&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [service_account](variables.tf#L236) | Service account email. Unused if service account is auto-created. | <code>string</code> | | <code>null</code> |
| [service_account_create](variables.tf#L242) | Auto-create service account. | <code>bool</code> | | <code>false</code> |
| [service_config](variables.tf#L248) | Cloud Run service specific configuration options. | <code title="object&#40;&#123;&#10; custom_audiences &#61; optional&#40;list&#40;string&#41;, null&#41;&#10; eventarc_triggers &#61; optional&#40;&#10; object&#40;&#123;&#10; audit_log &#61; optional&#40;map&#40;object&#40;&#123;&#10; method &#61; string&#10; service &#61; string&#10; &#125;&#41;&#41;&#41;&#10; pubsub &#61; optional&#40;map&#40;string&#41;&#41;&#10; storage &#61; optional&#40;map&#40;object&#40;&#123;&#10; bucket &#61; string&#10; path &#61; optional&#40;string&#41;&#10; &#125;&#41;&#41;&#41;&#10; service_account_email &#61; optional&#40;string&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10; gen2_execution_environment &#61; optional&#40;bool, false&#41;&#10; iap_config &#61; optional&#40;object&#40;&#123;&#10; iam &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; iam_additive &#61; optional&#40;list&#40;string&#41;, &#91;&#93;&#41;&#10; &#125;&#41;, null&#41;&#10; ingress &#61; optional&#40;string, null&#41;&#10; invoker_iam_disabled &#61; optional&#40;bool, false&#41;&#10; max_concurrency &#61; optional&#40;number&#41;&#10; scaling &#61; optional&#40;object&#40;&#123;&#10; max_instance_count &#61; optional&#40;number&#41;&#10; min_instance_count &#61; optional&#40;number&#41;&#10; &#125;&#41;&#41;&#10; timeout &#61; optional&#40;string&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [tag_bindings](variables.tf#L311) | Tag bindings for this service, in key => tag value id format. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [type](variables.tf#L318) | Type of Cloud Run resource to deploy: JOB, SERVICE or WORKERPOOL. | <code>string</code> | | <code>&#34;SERVICE&#34;</code> |
| [volumes](variables.tf#L328) | Named volumes in containers in name => attributes format. | <code title="map&#40;object&#40;&#123;&#10; secret &#61; optional&#40;object&#40;&#123;&#10; name &#61; string&#10; default_mode &#61; optional&#40;string&#41;&#10; path &#61; optional&#40;string&#41;&#10; version &#61; optional&#40;string&#41;&#10; mode &#61; optional&#40;string&#41;&#10; &#125;&#41;&#41;&#10; cloud_sql_instances &#61; optional&#40;list&#40;string&#41;&#41;&#10; empty_dir_size &#61; optional&#40;string&#41;&#10; gcs &#61; optional&#40;object&#40;&#123;&#10; bucket &#61; string&#10; is_read_only &#61; optional&#40;bool&#41;&#10; &#125;&#41;&#41;&#10; nfs &#61; optional&#40;object&#40;&#123;&#10; server &#61; string&#10; path &#61; optional&#40;string&#41;&#10; is_read_only &#61; optional&#40;bool&#41;&#10; &#125;&#41;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [vpc_connector_create](variables-vpcconnector.tf#L17) | Populate this to create a Serverless VPC Access connector. | <code title="object&#40;&#123;&#10; ip_cidr_range &#61; optional&#40;string&#41;&#10; machine_type &#61; optional&#40;string&#41;&#10; name &#61; optional&#40;string&#41;&#10; network &#61; optional&#40;string&#41;&#10; instances &#61; optional&#40;object&#40;&#123;&#10; max &#61; optional&#40;number&#41;&#10; min &#61; optional&#40;number&#41;&#10; &#125;&#41;, &#123;&#125;&#10; &#41;&#10; throughput &#61; optional&#40;object&#40;&#123;&#10; max &#61; optional&#40;number&#41;&#10; min &#61; optional&#40;number&#41;&#10; &#125;&#41;, &#123;&#125;&#10; &#41;&#10; subnet &#61; optional&#40;object&#40;&#123;&#10; name &#61; optional&#40;string&#41;&#10; project_id &#61; optional&#40;string&#41;&#10; &#125;&#41;, &#123;&#125;&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>null</code> |
| [workerpool_config](variables.tf#L361) | Cloud Run Worker Pool specific configuration. | <code title="object&#40;&#123;&#10; scaling &#61; optional&#40;object&#40;&#123;&#10; manual_instance_count &#61; optional&#40;number&#41;&#10; max_instance_count &#61; optional&#40;number&#41;&#10; min_instance_count &#61; optional&#40;number&#41;&#10; mode &#61; optional&#40;string&#41;&#10; &#125;&#41;&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
| [workerpool_config](variables.tf#L362) | Cloud Run Worker Pool specific configuration. | <code title="object&#40;&#123;&#10; scaling &#61; optional&#40;object&#40;&#123;&#10; manual_instance_count &#61; optional&#40;number&#41;&#10; max_instance_count &#61; optional&#40;number&#41;&#10; min_instance_count &#61; optional&#40;number&#41;&#10; mode &#61; optional&#40;string&#41;&#10; &#125;&#41;&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>&#123;&#125;</code> |
## Outputs

View File

@@ -189,34 +189,35 @@ variable "revision" {
tags = optional(list(string))
}), {})
timeout = optional(string)
# deprecated fields
gen2_execution_environment = optional(any) # DEPRECATED
job = optional(any) # DEPRECATED
max_concurrency = optional(any) # DEPRECATED
max_instance_count = optional(any) # DEPRECATED
min_instance_count = optional(any) # DEPRECATED
})
default = {}
nullable = false
validation {
condition = !contains(keys(var.revision), "gen2_execution_environment")
error_message = "Field gen2_execution_environment moved to var.service_config."
condition = lookup(var.revision, "gen2_execution_environment", null) == null
error_message = "Field gen2_execution_environment has moved to var.service_config."
}
validation {
condition = !contains(keys(var.revision), "max_concurrency")
error_message = "Field max_concurrency moved to var.service_config."
condition = lookup(var.revision, "job", null) == null
error_message = "Field job has moved to var.job_config."
}
validation {
condition = !contains(keys(var.revision), "max_concurrency")
error_message = "Field max_concurrency moved to var.service_config."
condition = lookup(var.revision, "max_concurrency", null) == null
error_message = "Field max_concurrency has moved to var.service_config."
}
validation {
condition = !contains(keys(var.revision), "max_instance_count")
error_message = "Field max_instance_count moved to var.service_config."
condition = lookup(var.revision, "max_instance_count", null) == null
error_message = "Field max_instance_count has moved to var.service_config."
}
validation {
condition = !contains(keys(var.revision), "min_instance_count")
error_message = "Field min_instance_count moved to var.service_config."
condition = lookup(var.revision, "min_instance_count", null) == null
error_message = "Field min_instance_count has moved to var.service_config."
}
validation {
condition = !contains(keys(var.revision), "job")
error_message = "Field job moved to var.job_config."
}
validation {
condition = (
try(var.revision.vpc_access.egress, null) == null ? true : contains(