forked from google/megalista
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from DP6/main
build: 🏗️ terraform improvements and CI
- Loading branch information
Showing
5 changed files
with
122 additions
and
52 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,34 @@ | ||
name: Terraform Validate | ||
|
||
on: ['push'] | ||
|
||
jobs: | ||
terraform-actions: | ||
name: Workflow | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./terraform | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@master | ||
|
||
- name: HashiCorp - Setup Terraform | ||
uses: hashicorp/[email protected] | ||
with: | ||
terraform_version: 0.14.6 | ||
|
||
- name: Terraform Init | ||
id: init | ||
run: terraform init | ||
continue-on-error: true | ||
|
||
- name: Terraform Fmt | ||
id: fmt | ||
run: terraform fmt -check -diff | ||
continue-on-error: true | ||
|
||
- name: Terraform Validate | ||
id: validate | ||
run: terraform validate -no-color | ||
continue-on-error: 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,8 @@ | ||
#create detaflow metadata | ||
resource "null_resource" "bucket_megalista_metadata" { | ||
provisioner "local-exec" { | ||
command = "sh ./scripts/deploy_cloud.sh ${data.google_client_config.current.project} ${var.bucket_name} ${var.region}" | ||
} | ||
|
||
depends_on = [google_storage_bucket.my_storage] | ||
} |
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
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
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,62 @@ | ||
locals { | ||
time_zone = "America/Sao_Paulo" | ||
} | ||
|
||
variable "bucket_name" { | ||
type = string | ||
description = "Google Cloud Storage Bucket to create" | ||
} | ||
|
||
variable "bq_ops_dataset" { | ||
type = string | ||
description = "Auxliary bigquery dataset for Megalista operations to create" | ||
} | ||
|
||
variable "developer_token" { | ||
type = string | ||
description = "Google Ads developer Token" | ||
} | ||
|
||
variable "client_id" { | ||
type = string | ||
description = "OAuth Client Id" | ||
} | ||
|
||
variable "client_secret" { | ||
type = string | ||
description = "OAuth Client Secret" | ||
} | ||
|
||
variable "access_token" { | ||
type = string | ||
description = "Access Token" | ||
} | ||
|
||
variable "refresh_token" { | ||
type = string | ||
description = "Refresh Token" | ||
} | ||
|
||
variable "setup_sheet_id" { | ||
type = string | ||
description = "Setup Sheet Id" | ||
} | ||
|
||
variable "location" { | ||
type = string | ||
description = "GCP location https://cloud.google.com/compute/docs/regions-zones?hl=pt-br default us" | ||
default = "us" | ||
} | ||
|
||
variable "region" { | ||
type = string | ||
description = "GCP region https://cloud.google.com/compute/docs/regions-zones?hl=pt-br default us-central1" | ||
default = "us-central1" | ||
} | ||
|
||
variable "zone" { | ||
type = string | ||
description = "GCP zone https://cloud.google.com/compute/docs/regions-zones?hl=pt-br default us-central1" | ||
default = "us-central1-f" | ||
} | ||
|