diff --git a/.github/actions/tftest/Dockerfile b/.github/actions/tftest/Dockerfile
index 3a54d78..e0b36a9 100644
--- a/.github/actions/tftest/Dockerfile
+++ b/.github/actions/tftest/Dockerfile
@@ -17,7 +17,7 @@ FROM python:3-alpine
RUN apk add --no-cache \
git
-ENV TERRAFORM_VERSION=1.3.4
+ENV TERRAFORM_VERSION=1.4.4
RUN wget -q "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" && \
unzip "terraform_${TERRAFORM_VERSION}_linux_amd64.zip" && rm "terraform_${TERRAFORM_VERSION}_linux_amd64.zip" && \
diff --git a/modules/apigee-x-core/README.md b/modules/apigee-x-core/README.md
index 9195fc9..3840a20 100644
--- a/modules/apigee-x-core/README.md
+++ b/modules/apigee-x-core/README.md
@@ -1,6 +1,5 @@
# Apigee Core Setup
-
## Providers
| Name | Version |
@@ -11,9 +10,9 @@
| Name | Source | Version |
|------|--------|---------|
-| [apigee](#module\_apigee) | github.com/terraform-google-modules/cloud-foundation-fabric//modules/apigee | v19.0.0 |
-| [kms-inst-disk](#module\_kms-inst-disk) | github.com/terraform-google-modules/cloud-foundation-fabric//modules/kms | v19.0.0 |
-| [kms-org-db](#module\_kms-org-db) | github.com/terraform-google-modules/cloud-foundation-fabric//modules/kms | v19.0.0 |
+| [apigee](#module\_apigee) | github.com/terraform-google-modules/cloud-foundation-fabric//modules/apigee | v26.0.0 |
+| [kms-inst-disk](#module\_kms-inst-disk) | github.com/terraform-google-modules/cloud-foundation-fabric//modules/kms | v26.0.0 |
+| [kms-org-db](#module\_kms-org-db) | github.com/terraform-google-modules/cloud-foundation-fabric//modules/kms | v26.0.0 |
## Resources
@@ -27,7 +26,7 @@
|------|-------------|------|---------|:--------:|
| [apigee\_envgroups](#input\_apigee\_envgroups) | Apigee Environment Groups. |
map(object({
hostnames = list(string)
}))
| `{}` | no |
| [apigee\_environments](#input\_apigee\_environments) | Apigee Environments. | map(object({
display_name = optional(string)
description = optional(string, "Terraform-managed")
node_config = optional(object({
min_node_count = optional(number)
max_node_count = optional(number)
}))
iam = optional(map(list(string)))
envgroups = list(string)
}))
| `null` | no |
-| [apigee\_instances](#input\_apigee\_instances) | Apigee Instances (only one instance for EVAL). | map(object({
region = string
ip_range = string
environments = list(string)
keyring_create = optional(bool, true)
keyring_name = optional(string, null)
keyring_location = optional(string, null)
key_name = optional(string, "inst-disk")
key_rotation_period = optional(string, "2592000s")
key_labels = optional(map(string), null)
consumer_accept_list = optional(list(string), null)
}))
| `{}` | no |
+| [apigee\_instances](#input\_apigee\_instances) | Apigee Instances (only one instance for EVAL). | map(object({
region = string
ip_range = string
environments = list(string)
keyring_create = optional(bool, true)
keyring_name = optional(string, null)
keyring_location = optional(string, null)
key_name = optional(string, "inst-disk")
key_rotation_period = optional(string, "2592000s")
key_labels = optional(map(string), null)
consumer_accept_list = optional(list(string), null)
}))
| `{}` | no |
| [ax\_region](#input\_ax\_region) | GCP region for storing Apigee analytics data (see https://cloud.google.com/apigee/docs/api-platform/get-started/install-cli). | `string` | n/a | yes |
| [billing\_type](#input\_billing\_type) | Billing type of the Apigee organization. | `string` | `null` | no |
| [network](#input\_network) | Network (self-link) to peer with the Apigee tennant project. | `string` | n/a | yes |
@@ -50,4 +49,3 @@
| [instance\_service\_attachments](#output\_instance\_service\_attachments) | Map of instance region -> instance PSC service attachment |
| [org\_id](#output\_org\_id) | Apigee Organization ID in the format of 'organizations/' |
| [organization](#output\_organization) | Apigee Organization. |
-
diff --git a/modules/apigee-x-core/main.tf b/modules/apigee-x-core/main.tf
index 4afa4d0..c51b557 100644
--- a/modules/apigee-x-core/main.tf
+++ b/modules/apigee-x-core/main.tf
@@ -16,12 +16,11 @@
locals {
envgroups = { for key, value in var.apigee_envgroups : key => value.hostnames }
- instances = { for key, value in var.apigee_instances : key => {
- region = value.region
- environments = value.environments
- psa_ip_cidr_range = value.ip_range
- disk_encryption_key = module.kms-inst-disk[key].key_ids[value.key_name]
- consumer_accept_list = value.consumer_accept_list
+ instances = { for key, value in var.apigee_instances : value.region => {
+ environments = value.environments
+ runtime_ip_cidr_range = value.ip_range
+ disk_encryption_key = module.kms-inst-disk[key].key_ids[value.key_name]
+ consumer_accept_list = value.consumer_accept_list
} }
}
@@ -32,12 +31,10 @@ resource "google_project_service_identity" "apigee_sa" {
}
module "kms-org-db" {
- source = "github.com/terraform-google-modules/cloud-foundation-fabric//modules/kms?ref=v19.0.0"
+ source = "github.com/terraform-google-modules/cloud-foundation-fabric//modules/kms?ref=v26.0.0"
project_id = var.project_id
- key_iam = {
- org-db = {
- "roles/cloudkms.cryptoKeyEncrypterDecrypter" = ["serviceAccount:${google_project_service_identity.apigee_sa.email}"]
- }
+ iam = {
+ "roles/cloudkms.cryptoKeyEncrypterDecrypter" = ["serviceAccount:${google_project_service_identity.apigee_sa.email}"]
}
keyring = {
location = coalesce(var.org_kms_keyring_location, var.ax_region)
@@ -51,12 +48,10 @@ module "kms-org-db" {
module "kms-inst-disk" {
for_each = var.apigee_instances
- source = "github.com/terraform-google-modules/cloud-foundation-fabric//modules/kms?ref=v19.0.0"
+ source = "github.com/terraform-google-modules/cloud-foundation-fabric//modules/kms?ref=v26.0.0"
project_id = var.project_id
- key_iam = {
- (each.value.key_name) = {
- "roles/cloudkms.cryptoKeyEncrypterDecrypter" = ["serviceAccount:${google_project_service_identity.apigee_sa.email}"]
- }
+ iam = {
+ "roles/cloudkms.cryptoKeyEncrypterDecrypter" = ["serviceAccount:${google_project_service_identity.apigee_sa.email}"]
}
keyring = {
location = coalesce(each.value.keyring_location, each.value.region)
@@ -72,7 +67,7 @@ module "kms-inst-disk" {
}
module "apigee" {
- source = "github.com/terraform-google-modules/cloud-foundation-fabric//modules/apigee?ref=v19.0.0"
+ source = "github.com/terraform-google-modules/cloud-foundation-fabric//modules/apigee?ref=v26.0.0"
project_id = var.project_id
organization = {
display_name = var.org_display_name
diff --git a/modules/apigee-x-core/versions.tf b/modules/apigee-x-core/versions.tf
index 1238916..c55065e 100644
--- a/modules/apigee-x-core/versions.tf
+++ b/modules/apigee-x-core/versions.tf
@@ -15,7 +15,7 @@
*/
terraform {
- required_version = ">= 1.1.0"
+ required_version = ">= 1.4.4"
required_providers {
google = {
source = "hashicorp/google"
diff --git a/tests/samples/test_controlled_internet_egress.py b/tests/samples/test_controlled_internet_egress.py
index 314249c..5176591 100644
--- a/tests/samples/test_controlled_internet_egress.py
+++ b/tests/samples/test_controlled_internet_egress.py
@@ -44,7 +44,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
+ assert_instance_attachment(resources, ["test1-europe-west1", "test2-europe-west1"])
def test_envgroup_attachment(resources):
diff --git a/tests/samples/test_dns_peering.py b/tests/samples/test_dns_peering.py
index d9acc14..cc0c552 100644
--- a/tests/samples/test_dns_peering.py
+++ b/tests/samples/test_dns_peering.py
@@ -16,7 +16,7 @@
import os
import pytest
from .utils import *
-
+import json
FIXTURES_DIR = os.path.join(os.path.dirname(__file__), "../../samples/x-dns-peering")
@@ -28,6 +28,7 @@ def resources(recursive_plan_runner):
project_id="testonly",
project_create="true"
)
+ print(json.dumps(resources,indent=2))
return resources
@@ -43,7 +44,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
+ assert_instance_attachment(resources, ["test1-europe-west1", "test2-europe-west1"])
def test_envgroup_attachment(resources):
diff --git a/tests/samples/test_ilb_mtls.py b/tests/samples/test_ilb_mtls.py
index 3807ad3..1b04e40 100644
--- a/tests/samples/test_ilb_mtls.py
+++ b/tests/samples/test_ilb_mtls.py
@@ -43,7 +43,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
+ assert_instance_attachment(resources, ["test1-europe-west1","test2-europe-west1"])
def test_envgroup_attachment(resources):
diff --git a/tests/samples/test_l4xlb_mtls.py b/tests/samples/test_l4xlb_mtls.py
index a903c00..7655891 100644
--- a/tests/samples/test_l4xlb_mtls.py
+++ b/tests/samples/test_l4xlb_mtls.py
@@ -43,8 +43,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
-
+ assert_instance_attachment(resources, ["test1-europe-west1","test2-europe-west1"])
def test_envgroup_attachment(resources):
"Test Apigee Envgroup Attachments."
diff --git a/tests/samples/test_l7xlb.py b/tests/samples/test_l7xlb.py
index 5c10265..b6984d7 100644
--- a/tests/samples/test_l7xlb.py
+++ b/tests/samples/test_l7xlb.py
@@ -43,7 +43,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
+ assert_instance_attachment(resources, ["test1-europe-west1","test2-europe-west1"])
def test_envgroup_attachment(resources):
diff --git a/tests/samples/test_multi_region.py b/tests/samples/test_multi_region.py
index 369b322..cae6caa 100644
--- a/tests/samples/test_multi_region.py
+++ b/tests/samples/test_multi_region.py
@@ -43,7 +43,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
+ assert_instance_attachment(resources, ["test1-europe-west1","test2-europe-west1"])
def test_envgroup_attachment(resources):
diff --git a/tests/samples/test_nb_psc_xlb.py b/tests/samples/test_nb_psc_xlb.py
index f13870b..f41ea19 100644
--- a/tests/samples/test_nb_psc_xlb.py
+++ b/tests/samples/test_nb_psc_xlb.py
@@ -43,7 +43,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
+ assert_instance_attachment(resources, ["test1-europe-west1","test2-europe-west1"])
def test_envgroup_attachment(resources):
diff --git a/tests/samples/test_sb_psc.py b/tests/samples/test_sb_psc.py
index a8d5b11..851ba14 100644
--- a/tests/samples/test_sb_psc.py
+++ b/tests/samples/test_sb_psc.py
@@ -44,7 +44,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
+ assert_instance_attachment(resources, ["test1-europe-west1","test2-europe-west1"])
def test_envgroup_attachment(resources):
diff --git a/tests/samples/test_shared_vpc.py b/tests/samples/test_shared_vpc.py
index e8a5b66..cd8212f 100644
--- a/tests/samples/test_shared_vpc.py
+++ b/tests/samples/test_shared_vpc.py
@@ -43,7 +43,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
+ assert_instance_attachment(resources, ["test1-europe-west1","test2-europe-west1"])
def test_envgroup_attachment(resources):
diff --git a/tests/samples/test_transtive_peering.py b/tests/samples/test_transtive_peering.py
index 5df43b8..a718f13 100644
--- a/tests/samples/test_transtive_peering.py
+++ b/tests/samples/test_transtive_peering.py
@@ -45,7 +45,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
+ assert_instance_attachment(resources, ["test1-europe-west1","test2-europe-west1"])
def test_envgroup_attachment(resources):
diff --git a/tests/samples/test_x_basic.py b/tests/samples/test_x_basic.py
index 07a4ebb..026268e 100644
--- a/tests/samples/test_x_basic.py
+++ b/tests/samples/test_x_basic.py
@@ -43,7 +43,7 @@ def test_apigee_instance(resources):
def test_apigee_instance_attachment(resources):
"Test Apigee Instance Attachments."
- assert_instance_attachment(resources, ["euw1-instance-test1", "euw1-instance-test2"])
+ assert_instance_attachment(resources, ["test1-europe-west1", "test2-europe-west1"])
def test_envgroup_attachment(resources):