diff --git a/modules/apigee/main.tf b/modules/apigee/main.tf index 71bcb8260d..74d3bf3acb 100644 --- a/modules/apigee/main.tf +++ b/modules/apigee/main.tf @@ -47,8 +47,8 @@ resource "google_apigee_environment" "environments" { dynamic "node_config" { for_each = try(each.value.node_config, null) != null ? [""] : [] content { - min_node_count = node_config.min_node_count - max_node_count = node_config.max_node_count + min_node_count = each.value.node_config.min_node_count + max_node_count = each.value.node_config.max_node_count } } org_id = local.org_id diff --git a/tests/modules/apigee/fixture/test.env_only.tfvars b/tests/modules/apigee/fixture/test.env_only.tfvars index 5cc6f49d67..0e4edc4866 100644 --- a/tests/modules/apigee/fixture/test.env_only.tfvars +++ b/tests/modules/apigee/fixture/test.env_only.tfvars @@ -4,5 +4,9 @@ environments = { display_name = "APIs test" description = "APIs Test" envgroups = ["test"] + node_config = { + min_node_count = 2 + max_node_count = 5 + } } -} \ No newline at end of file +}