Skip to content

Commit 2fe27b4

Browse files
JohnbelMDevNimJay
andauthored
fix: Default to us-central1 and us-central1-a (#135)
Co-authored-by: Nim Jayawardena <[email protected]>
1 parent 7d4f3a3 commit 2fe27b4

File tree

3 files changed

+58
-55
lines changed

3 files changed

+58
-55
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ Functional examples are included in the
4444
| enable\_apis | Whether or not to enable underlying apis in this solution. . | `string` | `true` | no |
4545
| labels | A map of labels to apply to contained resources. | `map(string)` | <pre>{<br> "three-tier-app": true<br>}</pre> | no |
4646
| project\_id | The project ID to deploy to | `string` | n/a | yes |
47-
| region | The Compute Region to deploy to | `string` | n/a | yes |
47+
| region | The Compute Region to deploy to | `string` | `"us-central1"` | no |
4848
| run\_roles\_list | The list of roles that run needs | `list(string)` | <pre>[<br> "roles/cloudsql.instanceUser",<br> "roles/cloudsql.client"<br>]</pre> | no |
49-
| zone | The Compute Zone to deploy to | `string` | n/a | yes |
49+
| zone | The Compute Zone to deploy to | `string` | `"us-central1-a"` | no |
5050

5151
## Outputs
5252

metadata.yaml

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -27,71 +27,71 @@ spec:
2727
version: 0.1.9
2828
actuationTool:
2929
flavor: Terraform
30-
version: '>= 0.13'
30+
version: ">= 0.13"
3131
description:
3232
tagline: Create a web app using a three-tiered architecture
3333
detailed: |-
3434
This solution quickly and securely creates a web app using a three-tiered architecture with a front end, middleware, and back end (PostgreSQL database).
3535
You can choose whether to deploy your solution through the console directly or download as Terraform on GitHub to deploy later.
3636
architecture:
37-
- User requests are sent to the front end, which is deployed on two Cloud Run services as containers to support high scalability applications.
38-
- The request then lands on the middle tier, which is the API layer that provides access to the backend. This is also deployed on Cloud Run for scalability and ease of deployment in multiple languages. This middleware is a Golang based API.
39-
- The frequent requests are cached in Memorystore for Redis for serving the request fast in-memory. The response is then served back to the user.
40-
- For new requests from the users, Cloud SQL provides the backend as the database layer. The response is then served back to the user.
41-
- For DevOps, Cloud Build packages up the containers and deploys them to be available as Cloud Run services.
37+
- User requests are sent to the front end, which is deployed on two Cloud Run services as containers to support high scalability applications.
38+
- The request then lands on the middle tier, which is the API layer that provides access to the backend. This is also deployed on Cloud Run for scalability and ease of deployment in multiple languages. This middleware is a Golang based API.
39+
- The frequent requests are cached in Memorystore for Redis for serving the request fast in-memory. The response is then served back to the user.
40+
- For new requests from the users, Cloud SQL provides the backend as the database layer. The response is then served back to the user.
41+
- For DevOps, Cloud Build packages up the containers and deploys them to be available as Cloud Run services.
4242
content:
4343
documentation:
44-
- title: Architecture Diagram
45-
url: assets/three_tier_web_app_v4.svg
44+
- title: Architecture Diagram
45+
url: assets/three_tier_web_app_v4.svg
4646
examples:
47-
- name: simple_example
48-
location: examples/simple_example
47+
- name: simple_example
48+
location: examples/simple_example
4949
interfaces:
5050
variables:
51-
- name: deployment_name
52-
description: The name of this particular deployment, will get added as a prefix to most resources.
53-
varType: string
54-
defaultValue: three-tier-app
55-
- name: enable_apis
56-
description: Whether or not to enable underlying apis in this solution. .
57-
varType: string
58-
defaultValue: true
59-
- name: labels
60-
description: A map of labels to apply to contained resources.
61-
varType: map(string)
62-
defaultValue:
63-
three-tier-app: true
64-
- name: project_id
65-
description: The project ID to deploy to
66-
varType: string
67-
required: true
68-
- name: region
69-
description: The Compute Region to deploy to
70-
varType: string
71-
required: true
72-
- name: run_roles_list
73-
description: The list of roles that run needs
74-
varType: list(string)
75-
defaultValue:
76-
- roles/cloudsql.instanceUser
77-
- roles/cloudsql.client
78-
- name: zone
79-
description: The Compute Zone to deploy to
80-
varType: string
81-
required: true
51+
- name: deployment_name
52+
description: The name of this particular deployment, will get added as a prefix to most resources.
53+
varType: string
54+
defaultValue: three-tier-app
55+
- name: enable_apis
56+
description: Whether or not to enable underlying apis in this solution. .
57+
varType: string
58+
defaultValue: true
59+
- name: labels
60+
description: A map of labels to apply to contained resources.
61+
varType: map(string)
62+
defaultValue:
63+
three-tier-app: true
64+
- name: project_id
65+
description: The project ID to deploy to
66+
varType: string
67+
required: true
68+
- name: region
69+
description: The Compute Region to deploy to
70+
varType: string
71+
defaultValue: us-central1
72+
- name: run_roles_list
73+
description: The list of roles that run needs
74+
varType: list(string)
75+
defaultValue:
76+
- roles/cloudsql.instanceUser
77+
- roles/cloudsql.client
78+
- name: zone
79+
description: The Compute Zone to deploy to
80+
varType: string
81+
defaultValue: us-central1-a
8282
outputs:
83-
- name: endpoint
84-
description: The url of the front end which we want to surface to the user
85-
- name: neos_toc_url
86-
description: The URL to launch the in-console tutorial for the Three Tier App solution
87-
- name: sqlservername
88-
description: The name of the database that we randomly generated.
83+
- name: endpoint
84+
description: The url of the front end which we want to surface to the user
85+
- name: neos_toc_url
86+
description: The URL to launch the in-console tutorial for the Three Tier App solution
87+
- name: sqlservername
88+
description: The name of the database that we randomly generated.
8989
requirements:
9090
roles:
91-
- level: Project
92-
roles:
93-
- roles/owner
91+
- level: Project
92+
roles:
93+
- roles/owner
9494
services:
95-
- cloudresourcemanager.googleapis.com
96-
- serviceusage.googleapis.com
97-
- servicenetworking.googleapis.com
95+
- cloudresourcemanager.googleapis.com
96+
- serviceusage.googleapis.com
97+
- servicenetworking.googleapis.com

variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ variable "project_id" {
2222
variable "region" {
2323
type = string
2424
description = "The Compute Region to deploy to"
25+
default = "us-central1"
26+
2527
}
2628

2729
variable "zone" {
2830
type = string
2931
description = "The Compute Zone to deploy to"
32+
default = "us-central1-a"
3033
}
3134

3235
variable "deployment_name" {

0 commit comments

Comments
 (0)