# Title, CIDR ranges, arrow labels and flow steps for the gallery diagram. Use with: # terravision draw --source gcp-vm-three-tier-migrate.tvg.json --annotate gcp-vm-three-tier-migrate.annotations.yml format: '0.3' title: Google Cloud three-tier VM application migrated from on-premises with Migrate to VMs and DMS update: google_compute_subnetwork.web: ip_cidr_range: 10.140.0.0/24 google_compute_subnetwork.app: ip_cidr_range: 10.140.1.0/24 tv_gcp_onprem.datacenter: label: Corporate Datacenter tv_gcp_zone.europe_west2_a_app: label: Europe West2 A tv_gcp_zone.europe_west2_b_app: label: Europe West2 B google_sql_database_instance.shop: label: Cloud SQL MySQL (HA) tv_gcp_logical_group.migration: label: Migration google_compute_machine_image.migrated: label: Migrate to VMs Migrated google_compute_external_vpn_gateway.datacenter: label: Peer VPN Gateway Datacenter google_compute_backend_service.web: label: Backend Service Web google_compute_forwarding_rule.app_internal_lb: label: Forwarding Rule App Internal Lb google_compute_global_forwarding_rule.https: label: Forwarding Rule Https google_compute_ha_vpn_gateway.migration: label: HA VPN Migration google_compute_instance_template.app: label: Instance Template App google_compute_instance_template.web: label: Instance Template Web google_compute_region_backend_service.app: label: Backend Service App google_compute_region_instance_group_manager.app: label: Managed Instance Group App google_compute_region_instance_group_manager.web: label: Managed Instance Group Web google_compute_router.egress: label: Cloud Router Egress google_compute_router.migration: label: Cloud Router Migration google_compute_router_nat.egress: label: Cloud NAT Egress google_compute_security_policy.edge: label: Cloud Armor Edge google_compute_url_map.shop: label: URL Map Shop google_database_migration_service_connection_profile.source: label: DMS Connection Profile Source google_database_migration_service_migration_job.mysql: label: DMS Migration Job Mysql google_filestore_instance.shared_content: label: Filestore Shared Content google_kms_key_ring.shop: label: Cloud KMS Shop google_logging_project_sink.shop: label: Log Sink Shop google_secret_manager_secret.db_password: label: Secret Manager Db Password connect: google_compute_external_vpn_gateway.datacenter: - google_compute_ha_vpn_gateway.migration: HA VPN google_compute_ha_vpn_gateway.migration: - google_compute_machine_image.migrated: Disk replication - google_database_migration_service_migration_job.mysql: Binlog replication flows: Migrate: description: The application moves from the data centre color: '#D93025' steps: - resource: tv_gcp_server.web_vms -> google_compute_external_vpn_gateway.datacenter xlabel: Replicate detail: Migrate to Virtual Machines replicates the web and app VMs' disks over HA VPN - resource: google_compute_ha_vpn_gateway.migration -> google_compute_machine_image.migrated xlabel: Image detail: and turns each tested replica into an image - resource: google_compute_machine_image.migrated -> google_compute_instance_template.web xlabel: Template detail: which the web and app instance templates boot from - resource: tv_gcp_database.mysql -> google_compute_external_vpn_gateway.datacenter xlabel: Sync detail: Database Migration Service copies MySQL across the VPN - resource: google_database_migration_service_migration_job.mysql -> google_sql_database_instance.shop xlabel: Load detail: and keeps Cloud SQL in sync from the binlog until cutover Serve: description: Customers use the migrated shop color: '#188038' steps: - resource: tv_gcp_users_icon.customers -> google_compute_global_forwarding_rule.https xlabel: HTTPS detail: At cutover DNS points the shop at the global external load balancer - resource: google_compute_backend_service.web -> google_compute_instance.web~1 xlabel: Web detail: which sends requests through Cloud Armor to the web tier's managed instance group in two zones - resource: google_compute_instance.web~1 -> google_filestore_instance.shared_content xlabel: Content detail: The web VMs share uploaded content on Filestore - resource: google_compute_instance.web~1 -> google_compute_forwarding_rule.app_internal_lb xlabel: App detail: and call the app tier through an internal load balancer - resource: google_compute_instance.app~1 -> google_sql_database_instance.shop xlabel: Query detail: The app VMs query the regional HA Cloud SQL instance - resource: google_compute_router_nat.egress -> tv_gcp_server.payment_gateway xlabel: Pay detail: and reach the payment provider through Cloud NAT