Skip to content

Latest commit

 

History

History

x-dns-peering

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Basic Apigee X Setup DNS Peering

This Example deploys an Apigee X organization with an internal endpoint. It also creates a demo backend and a private Cloud DNS zone that is peered with the Apigee X service network.

The private DNS Zone for the internal. domain contains the following A records:

  • demo.internal pointing at the ILB of the demo backend
  • ${ENV_GROUP_NAME}-api.internal pointing at all Apigee instance endpoints

Setup Instructions

Set the project ID where you want your Apigee Organization to be deployed to:

PROJECT_ID=my-project-id
cd samples/... # Sample from above
cp ./x-demo.tfvars ./my-config.tfvars

Decide on a backend and create the necessary config. To use a backend on Google Cloud Storage (GCS) use:

gsutil mb "gs://$PROJECT_ID-tf"

cat <<EOF >terraform.tf
terraform {
  backend "gcs" {
    bucket  = "$PROJECT_ID-tf"
    prefix  = "terraform/state"
  }
}
EOF

Validate your config:

terraform init
terraform plan --var-file=./my-config.tfvars -var "project_id=$PROJECT_ID"

and provision everything (takes roughly 25min):

terraform apply --var-file=./my-config.tfvars -var "project_id=$PROJECT_ID"

Providers

Name Version
google n/a

Modules

Name Source Version
apigee-x-core ../../modules/apigee-x-core n/a
backend-example ../../modules/development-backend n/a
private-dns github.com/terraform-google-modules/cloud-foundation-fabric//modules/dns v28.0.0
project github.com/terraform-google-modules/cloud-foundation-fabric//modules/project v28.0.0
vpc github.com/terraform-google-modules/cloud-foundation-fabric//modules/net-vpc v28.0.0

Resources

Name Type
google_compute_firewall.allow-backend-ingress resource
google_service_networking_peered_dns_domain.apigee resource

Inputs

Name Description Type Default Required
apigee_envgroups Apigee Environment Groups.
map(object({
hostnames = list(string)
}))
null no
apigee_environments Apigee Environments.
map(object({
display_name = optional(string)
description = optional(string)
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 Apigee Instances (only one instance for EVAL orgs).
map(object({
region = string
ip_range = string
environments = list(string)
}))
null no
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
backend Example Backend.
object({
name = string
subnet = string
subnet_cidr = string
region = string
})
n/a yes
billing_account Billing account id. string null no
dns Example DNS Zone.
object({
name = string
domain = string
})
n/a yes
network Name of the VPC network to peer with the Apigee tennant project. string n/a yes
peering_range Service Peering CIDR range. string n/a yes
project_create Create project. When set to false, uses a data source to reference existing project. bool false no
project_id Project id (also used for the Apigee Organization). string n/a yes
project_parent Parent folder or organization in 'folders/folder_id' or 'organizations/org_id' format. string null no
support_range Support CIDR range of length /28 (required by Apigee for troubleshooting purposes). string n/a yes

Outputs

No outputs.