Merge pull request #1717 from apichick/apigee-module-fix-try

Apigee module fix try
This commit is contained in:
apichick 2023-10-01 14:26:21 +02:00 committed by GitHub
commit f0f6996053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View File

@ -67,8 +67,9 @@ resource "google_apigee_envgroup_attachment" "envgroup_attachments" {
envgroup = v2
}
}])...)
envgroup_id = try(google_apigee_envgroup.envgroups[each.value.envgroup].id, each.value.envgroup)
envgroup_id = "${local.org_id}/envgroups/${each.value.envgroup}"
environment = google_apigee_environment.environments[each.value.environment].name
depends_on = [google_apigee_envgroup.envgroups]
}
resource "google_apigee_environment_iam_binding" "binding" {
@ -120,8 +121,8 @@ resource "google_apigee_instance_attachment" "instance_attachments" {
}
}])...)
instance_id = google_apigee_instance.instances[each.value.instance].id
environment = try(google_apigee_environment.environments[each.value.environment].name,
"${local.org_id}/environments/${each.value.environment}")
environment = each.value.environment
depends_on = [google_apigee_environment.environments]
}
resource "google_apigee_endpoint_attachment" "endpoint_attachments" {

View File

@ -14,7 +14,7 @@
values:
google_apigee_envgroup_attachment.envgroup_attachments["apis-test-test"]:
envgroup_id: test
envgroup_id: organizations/my-project/envgroups/test
environment: apis-test
timeouts: null
google_apigee_environment.environments["apis-test"]:

View File

@ -14,7 +14,7 @@
values:
google_apigee_envgroup_attachment.envgroup_attachments["apis-test-test"]:
envgroup_id: test
envgroup_id: organizations/my-project/envgroups/test
environment: apis-test
google_apigee_environment.environments["apis-test"]:
api_proxy_type: PROGRAMMABLE
@ -22,8 +22,8 @@ values:
display_name: APIs test
name: apis-test
node_config:
- max_node_count: '5'
min_node_count: '2'
- max_node_count: "5"
min_node_count: "2"
org_id: organizations/my-project
counts:

View File

@ -14,7 +14,7 @@
values:
google_apigee_envgroup_attachment.envgroup_attachments["apis-test-test"]:
envgroup_id: test
envgroup_id: organizations/my-project/envgroups/test
environment: apis-test
timeouts: null
google_apigee_environment.environments["apis-test"]:
@ -23,12 +23,11 @@ values:
display_name: APIs test
name: apis-test
node_config:
- max_node_count: '5'
min_node_count: '2'
- max_node_count: "5"
min_node_count: "2"
org_id: organizations/my-project
timeouts: null
counts:
google_apigee_envgroup_attachment: 1
google_apigee_environment: 1