to create manually on GCP:
- create manually GCP service account(SA):
- grant Owner and Storage Admin permissions on project level to this SA
- create SA key to be used by terraform for resource provision
see this doumentation - you need to configure your provider "google" correctly
create the repository for Terraform:
create via Terraform next infrastructure:
- VPC Network:
- google_compute_network
- google_compute_subnetwork - this example already have network creation inside
- Cloud NAT
- google_compute_router
- google_compute_router_nat - this example already has network, subnetwork, compute router, and cloudnat!!!! check this to understand how chain the dependet resources
- SQL instance with private IP address
- google_sql_database_instance - example has all required, just need to reconfigure with right parameters
- SQL database
- google_sql_database - take just database instance from previous step
- google_sql_user
- Cloud Storage Bucket for Application content
- google_storage_bucket - mind this example has life-cycle you dont need this, just simple bucket
- google_storage_default_object_access_control
- Service Account for Application instance
- Instance template (with initial startup-script)
- google_compute_instance_template - example already has SA creation in it. !!! MIND - THIS INSTANCE GROUP SHOULD USE STARTUP_SCRIPT THAT YOU CONFIGURED. however as it will use new database and storage, some variables should be changed.
- Managed Instance Group
- Firewall rules
- HTTP Load Balancer
- google_compute_backend_service - read whole document page
- google_compute_url_map - read whole document page
- google_compute_target_http_proxy - example of LB and all dependent resources from above
- google_compute_global_forwarding_rule - example of LB forwarding rule and all dependent resources from above
- google_compute_health_check
all above resources are to be created with parameters provided from your technical design documents and task description, configuration parameters for those resources you may get from deploy.sh script from steps branch