-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.terraform/ | ||
.terraform.lock* | ||
*.tfstate* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
<!-- spell:disable --> | ||
<!-- markdownlint-disable MD033 --> | ||
|
||
# This is a Work In Progress | ||
|
||
* Currently running locally and auth'ing with `gcloud auth`: | ||
|
||
```shell | ||
❯ gc auth list | ||
Credentialed Accounts | ||
ACTIVE ACCOUNT | ||
* [email protected] | ||
|
||
To set the active account, run: | ||
$ gcloud config set account `ACCOUNT` | ||
``` | ||
|
||
# Docker to GCP VM | ||
|
||
This is a [GitHub Action](https://github.com/features/actions) that can deploy any [Docker](https://www.bitovi.com/academy/learn-docker.html)-based app | ||
|
@@ -39,7 +54,6 @@ You'll need to [enable authentication](https://cloud.google.com/docs/authenticat | |
## Environment variables | ||
|
||
<!-- # TODO: clarify this --> | ||
For environment variables in your app, you can provide: | ||
|
||
* `repo_env` - A file in your repo that contains env vars | ||
* `ghv_env` - An entry in [Github actions variables](https://docs.github.com/en/actions/learn-github-actions/variables) | ||
|
@@ -130,7 +144,7 @@ The following inputs can be used as `step.with` keys | |
| `checkout` | Boolean | Set to `false` if the code is already checked out (Default is `true`) (Optional) | | ||
| `gcp_access_key_id` | String | GCP access key ID | | ||
| `gcp_default_region` | String | GCP default region | | ||
| `gcp_ami_id` | String | GCP AMI ID. Will default to latest Ubuntu 22.04 server image (HVM). Accepts `ami-####` values | | ||
| `gcp_image_id` | String | GCP Machine Image ID. Will default to latest Ubuntu 22.04 server image (HVM). Accepts `ami-####` values | | ||
| `domain_name` | String | Define the root domain name for the application. e.g. bitovi.com' | | ||
| `sub_domain` | String | Define the sub-domain part of the URL. Defaults to `${org}-${repo}-{branch}` | | ||
| `root_domain` | Boolean | Deploy application to root domain. Will create root and www records. Defaults to `false` | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
# Create a VM instance from a public image | ||
# in the `default` VPC network and subnet | ||
|
||
resource "google_compute_instance" "tftest" { | ||
project = "278540881566" | ||
name = "my-vm" | ||
machine_type = "n1-standard-1" | ||
zone = "us-central1-a" | ||
|
||
boot_disk { | ||
initialize_params { | ||
image = "ubuntu-minimal-2210-kinetic-amd64-v20230126" | ||
} | ||
} | ||
|
||
network_interface { | ||
network = "default" | ||
access_config {} | ||
} | ||
} |