Fix Agent Engine PSC-I configuration (#3687)

This commit is contained in:
Luca Prete
2026-01-30 09:38:41 +03:00
committed by GitHub
parent 3877a40119
commit dc2ccfe518
3 changed files with 21 additions and 11 deletions

View File

@@ -48,6 +48,7 @@ resource "google_vertex_ai_reasoning_engine" "managed" {
var.agent_engine_config.max_instances != null ||
var.agent_engine_config.min_instances != null ||
var.agent_engine_config.resource_limits != null ||
var.networking_config != null ||
length(var.agent_engine_config.environment_variables) > 0 ||
length(var.agent_engine_config.secret_environment_variables) > 0
? { 1 = 1 }
@@ -72,7 +73,6 @@ resource "google_vertex_ai_reasoning_engine" "managed" {
dynamic "psc_interface_config" {
for_each = var.networking_config == null ? {} : { 1 = 1 }
content {
network_attachment = var.networking_config.network_attachment_id
@@ -80,12 +80,12 @@ resource "google_vertex_ai_reasoning_engine" "managed" {
for_each = var.networking_config.dns_peering_configs
content {
domain = each.key
target_network = each.value.target_network_id
domain = dns_peering_configs.key
target_network = dns_peering_configs.value.target_network_name
target_project = (
each.value.target_project_id == null
dns_peering_configs.value.target_project_id == null
? var.project_id
: each.value.target_project_id
: dns_peering_configs.value.target_project_id
)
}
}

View File

@@ -48,6 +48,7 @@ resource "google_vertex_ai_reasoning_engine" "unmanaged" {
var.agent_engine_config.max_instances != null ||
var.agent_engine_config.min_instances != null ||
var.agent_engine_config.resource_limits != null ||
var.networking_config != null ||
length(var.agent_engine_config.environment_variables) > 0 ||
length(var.agent_engine_config.secret_environment_variables) > 0
? { 1 = 1 }
@@ -72,7 +73,6 @@ resource "google_vertex_ai_reasoning_engine" "unmanaged" {
dynamic "psc_interface_config" {
for_each = var.networking_config == null ? {} : { 1 = 1 }
content {
network_attachment = var.networking_config.network_attachment_id
@@ -80,12 +80,12 @@ resource "google_vertex_ai_reasoning_engine" "unmanaged" {
for_each = var.networking_config.dns_peering_configs
content {
domain = each.key
target_network = each.value.target_network_id
domain = dns_peering_configs.key
target_network = dns_peering_configs.value.target_network_name
target_project = (
each.value.target_project_id == null
dns_peering_configs.value.target_project_id == null
? var.project_id
: each.value.target_project_id
: dns_peering_configs.value.target_project_id
)
}
}