Terraform to update in-place the instance without destroying it, because updating the version from Google UI updates the instance
resource "google_data_fusion_instance" "instance" {
name = var.name
project = var.project
description = var.description
region = var.region
type = var.type
enable_stackdriver_logging = var.enable_stackdriver_logging
enable_stackdriver_monitoring = var.enable_stackdriver_monitoring
labels = var.labels
version = var.datafusion_version
options = var.options
private_instance = var.private_instance
dynamic "network_config" {
for_each = var.network_config == null ? [] : [var.network_config]
content {
network = var.network_config.network
ip_allocation = var.network_config.ip_allocation
}
}
}
module "data_fusion" {
source = "../modules/instance/"
name = "instance-test"
project = local.project_id
region = local.region
dataproc_service_account = data.google_app_engine_default_service_account.default.email
datafusion_version = "6.8.0"
network_config = {
network = local.network
ip_allocation = local.ip_allocation
}
}
# module.data_fusion.google_data_fusion_instance.instance must be replaced
-/+ resource "google_data_fusion_instance" "instance" {
~ api_endpoint = "https://instance-test-xxx-xxx-dot-xxx.datafusion.googleusercontent.com/api" -> (known after apply)
~ create_time = "2023-01-25T03:17:04.119017648Z" -> (known after apply)
- enable_rbac = false -> null
~ gcs_bucket = "gs://df-1xxx25169-zxn6xx4l4xxxbbqaaaa" -> (known after apply)
~ id = "projects/xxxx/locations/europe-west1/instances/instance-test" -> (known after apply)
- labels = {} -> null
name = "instance-test"
- options = {} -> null
~ p4_service_account = "[email protected]" -> (known after apply)
~ service_endpoint = "https://instance-test-xxxx.datafusion.googleusercontent.com" -> (known after apply)
~ state = "ACTIVE" -> (known after apply)
+ state_message = (known after apply)
~ tenant_project_id = "zbb26cd6b97964399-tp" -> (known after apply)
~ update_time = "2023-01-25T03:31:11.307380027Z" -> (known after apply)
~ version = "6.7.2" -> "6.8.0" # forces replacement
+ zone = (known after apply)
# (6 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Plan: 1 to add, 0 to change, 1 to destroy.