You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[cloudinit_config.ci](https://registry.terraform.io/providers/hashicorp/cloudinit/latest/docs/data-sources/config)| data source |
55
+
|[google_compute_snapshot.latest_prod](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/compute_snapshot)| data source |
47
56
|[google_project_iam_custom_role.gce-start](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/project_iam_custom_role)| data source |
48
57
|[google_project_iam_custom_role.gce-suspend](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/project_iam_custom_role)| data source |
49
58
@@ -58,24 +67,24 @@ Deploy a docker compose project to a Google Cloud Compute Instance.
58
67
| <aname="input_allowed_ips"></a> [allowed\_ips](#input\_allowed\_ips)| CIDR IP Addresses allowed to turn on this site's GCP instance |`list(string)`|`[]`| no |
59
68
| <aname="input_allowed_ssh_ipv4"></a> [allowed\_ssh\_ipv4](#input\_allowed\_ssh\_ipv4)| CIDR IPv4 Addresses allowed to to SSH into this site's GCP instance |`list(string)`|`[]`| no |
60
69
| <aname="input_allowed_ssh_ipv6"></a> [allowed\_ssh\_ipv6](#input\_allowed\_ssh\_ipv6)| CIDR IPv6 Addresses allowed to SSH into this site's GCP instance |`list(string)`|`[]`| no |
61
-
| <aname="input_disk_size_gb"></a> [disk\_size\_gb](#input\_disk\_size\_gb)| Data disk size in GB |`number`|`25`| no |
70
+
| <aname="input_disk_size_gb"></a> [disk\_size\_gb](#input\_disk\_size\_gb)| Data disk size in GB |`number`|`50`| no |
62
71
| <aname="input_docker_compose_branch"></a> [docker\_compose\_branch](#input\_docker\_compose\_branch)| git branch to checkout for var.docker\_compose\_repo |`string`|`"main"`| no |
63
72
| <aname="input_docker_compose_down"></a> [docker\_compose\_down](#input\_docker\_compose\_down)| Command to stop the docker compose project |`string`|`"docker compose down"`| no |
64
73
| <aname="input_docker_compose_init"></a> [docker\_compose\_init](#input\_docker\_compose\_init)| After cloning the docker compose git repo, any initialization that needs to happen before the docker compose project can start |`string`|`""`| no |
65
74
| <aname="input_docker_compose_up"></a> [docker\_compose\_up](#input\_docker\_compose\_up)| Command to start the docker compose project |`string`|`"docker compose up --remove-orphans"`| no |
66
-
| <aname="input_machine_type"></a> [machine\_type](#input\_machine\_type)| VM machine type |`string`|`"e2-medium"`| no |
75
+
| <aname="input_machine_type"></a> [machine\_type](#input\_machine\_type)| VM machine type (General-purpose series that support Hyperdisk Balanced |`string`|`"n4-standard-2"`| no |
67
76
| <aname="input_os"></a> [os](#input\_os)| The host OS to install on the GCP instance |`string`|`"cos-125-19216-104-25"`| no |
68
-
| <aname="input_region"></a> [region](#input\_region)| GCP region for resources |`string`|`"us-central1"`| no |
69
-
| <aname="input_zone"></a> [zone](#input\_zone)| GCP zone for resources |`string`|`"us-central1-f"`| no |
77
+
| <aname="input_overlay_source_instance"></a> [overlay\_source\_instance](#input\_overlay\_source\_instance)| Name of production instance to get latest snapshot from (e.g., 'ojs-production'). Terraform will automatically use the most recent snapshot from this instance's data disk. Leave empty for production environments. |`string`|`""`| no |
78
+
| <aname="input_region"></a> [region](#input\_region)| GCP region for resources |`string`|`"us-east5"`| no |
79
+
| <aname="input_run_snapshots"></a> [run\_snapshots](#input\_run\_snapshots)| Enable daily snapshots of the data disk (recommended for production). Last seven days of snapshots are available. Also weekly snapshots for past year. |`bool`|`false`| no |
80
+
| <aname="input_volume_names"></a> [volume\_names](#input\_volume\_names)| List of docker volumes to overlay from production snapshot (e.g., ['compose\_ojs-public']). Production data is mounted read-only as lower layer, staging writes go to upper layer. |`list(string)`|`[]`| no |
81
+
| <aname="input_zone"></a> [zone](#input\_zone)| GCP zone for resources |`string`|`"us-east5-b"`| no |
70
82
71
83
## Outputs
72
84
73
85
| Name | Description |
74
86
|------|-------------|
75
87
| <aname="output_appGsa"></a> [appGsa](#output\_appGsa)| The Google Service Account the app can leverage to auth to other Google services |
76
-
| <aname="output_instanceGsa"></a> [instanceGsa](#output\_instanceGsa)| The Google Service Account the compute instance runs as |
The staging VM then relies on a snapshot of the public files docker volume. This is to allow staging to mirror production.
15
+
16
+
So need wait until snapshot schedule executes (~1h) OR get a snapshot of the production docker volume disk immediately. then the rest of the terraform runs can just execute as normal
0 commit comments