Skip to content

Commit

Permalink
fix: Default to us-central1 and us-central1-a (#135)
Browse files Browse the repository at this point in the history
Co-authored-by: Nim Jayawardena <[email protected]>
  • Loading branch information
JohnbelMDev and NimJay authored Jul 24, 2024
1 parent 7d4f3a3 commit 2fe27b4
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 55 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Functional examples are included in the
| enable\_apis | Whether or not to enable underlying apis in this solution. . | `string` | `true` | no |
| labels | A map of labels to apply to contained resources. | `map(string)` | <pre>{<br> "three-tier-app": true<br>}</pre> | no |
| project\_id | The project ID to deploy to | `string` | n/a | yes |
| region | The Compute Region to deploy to | `string` | n/a | yes |
| region | The Compute Region to deploy to | `string` | `"us-central1"` | no |
| run\_roles\_list | The list of roles that run needs | `list(string)` | <pre>[<br> "roles/cloudsql.instanceUser",<br> "roles/cloudsql.client"<br>]</pre> | no |
| zone | The Compute Zone to deploy to | `string` | n/a | yes |
| zone | The Compute Zone to deploy to | `string` | `"us-central1-a"` | no |

## Outputs

Expand Down
106 changes: 53 additions & 53 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,71 +27,71 @@ spec:
version: 0.1.9
actuationTool:
flavor: Terraform
version: '>= 0.13'
version: ">= 0.13"
description:
tagline: Create a web app using a three-tiered architecture
detailed: |-
This solution quickly and securely creates a web app using a three-tiered architecture with a front end, middleware, and back end (PostgreSQL database).
You can choose whether to deploy your solution through the console directly or download as Terraform on GitHub to deploy later.
architecture:
- User requests are sent to the front end, which is deployed on two Cloud Run services as containers to support high scalability applications.
- 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.
- 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.
- For new requests from the users, Cloud SQL provides the backend as the database layer. The response is then served back to the user.
- For DevOps, Cloud Build packages up the containers and deploys them to be available as Cloud Run services.
- User requests are sent to the front end, which is deployed on two Cloud Run services as containers to support high scalability applications.
- 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.
- 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.
- For new requests from the users, Cloud SQL provides the backend as the database layer. The response is then served back to the user.
- For DevOps, Cloud Build packages up the containers and deploys them to be available as Cloud Run services.
content:
documentation:
- title: Architecture Diagram
url: assets/three_tier_web_app_v4.svg
- title: Architecture Diagram
url: assets/three_tier_web_app_v4.svg
examples:
- name: simple_example
location: examples/simple_example
- name: simple_example
location: examples/simple_example
interfaces:
variables:
- name: deployment_name
description: The name of this particular deployment, will get added as a prefix to most resources.
varType: string
defaultValue: three-tier-app
- name: enable_apis
description: Whether or not to enable underlying apis in this solution. .
varType: string
defaultValue: true
- name: labels
description: A map of labels to apply to contained resources.
varType: map(string)
defaultValue:
three-tier-app: true
- name: project_id
description: The project ID to deploy to
varType: string
required: true
- name: region
description: The Compute Region to deploy to
varType: string
required: true
- name: run_roles_list
description: The list of roles that run needs
varType: list(string)
defaultValue:
- roles/cloudsql.instanceUser
- roles/cloudsql.client
- name: zone
description: The Compute Zone to deploy to
varType: string
required: true
- name: deployment_name
description: The name of this particular deployment, will get added as a prefix to most resources.
varType: string
defaultValue: three-tier-app
- name: enable_apis
description: Whether or not to enable underlying apis in this solution. .
varType: string
defaultValue: true
- name: labels
description: A map of labels to apply to contained resources.
varType: map(string)
defaultValue:
three-tier-app: true
- name: project_id
description: The project ID to deploy to
varType: string
required: true
- name: region
description: The Compute Region to deploy to
varType: string
defaultValue: us-central1
- name: run_roles_list
description: The list of roles that run needs
varType: list(string)
defaultValue:
- roles/cloudsql.instanceUser
- roles/cloudsql.client
- name: zone
description: The Compute Zone to deploy to
varType: string
defaultValue: us-central1-a
outputs:
- name: endpoint
description: The url of the front end which we want to surface to the user
- name: neos_toc_url
description: The URL to launch the in-console tutorial for the Three Tier App solution
- name: sqlservername
description: The name of the database that we randomly generated.
- name: endpoint
description: The url of the front end which we want to surface to the user
- name: neos_toc_url
description: The URL to launch the in-console tutorial for the Three Tier App solution
- name: sqlservername
description: The name of the database that we randomly generated.
requirements:
roles:
- level: Project
roles:
- roles/owner
- level: Project
roles:
- roles/owner
services:
- cloudresourcemanager.googleapis.com
- serviceusage.googleapis.com
- servicenetworking.googleapis.com
- cloudresourcemanager.googleapis.com
- serviceusage.googleapis.com
- servicenetworking.googleapis.com
3 changes: 3 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ variable "project_id" {
variable "region" {
type = string
description = "The Compute Region to deploy to"
default = "us-central1"

}

variable "zone" {
type = string
description = "The Compute Zone to deploy to"
default = "us-central1-a"
}

variable "deployment_name" {
Expand Down

0 comments on commit 2fe27b4

Please sign in to comment.