start redoing ci/cd and devops

This commit is contained in:
41666 2020-12-02 21:44:49 -05:00
parent 460770407a
commit ab9fe30b42
37 changed files with 418 additions and 825 deletions

20
terraform/functions/.terraform.lock.hcl generated Executable file
View file

@ -0,0 +1,20 @@
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/google" {
version = "3.49.0"
constraints = ">= 3.49.0"
hashes = [
"h1:MgihBNqO052m2jthWBu00wWYkz+eNrETwLqBfWmvMMY=",
"zh:00ea68b3a3b6e11ea469f47ee949c7f8f5751f935a3366152f9d3c6660c27e9b",
"zh:1ef3efc2e81fa31ceb04e39ae25acd0f061629f104827e127bdb4345e95f37d0",
"zh:6bf00943baa776adef0bbc914886359cf95c505b0494f3936cedac5cd1e01a00",
"zh:7d2cce5a9be476d8eee67435d854d094f82b5814a0e34964d10f28c1e88a2c8f",
"zh:841d074e3fb06f0df7c930bc0c4a9733ce0c5f1a19d6af98632a7931d2ca6a59",
"zh:8920ccd27c8904fcf5d701d71baee4f64d9d6f1383e66c4673909d9c53895057",
"zh:91d4479d2d461ad582d127d47aa7094bd74a1278cc8d78ad36a1c4f31301f4f0",
"zh:a97c19cdb42b5f7e4e297183d60eaa45843ee7b0adde1120e47026c4cae456c1",
"zh:cbd862cc4d21866bb832e3e7fe4e6ed959f5e5363bcf3d74e476b42fec716efe",
"zh:ec3c63ba6db74b353fafff6aedbb30e3eb1a4e5c856b4920c7ffa10d7081cbbd",
]
}

View file

@ -0,0 +1,23 @@
resource "google_cloudfunctions_function" "function" {
name = "roleypoly-test-hello-world"
description = "Roleypoly FaaS: /hello-world"
runtime = "go113"
available_memory_mb = 128
source_repository {
url = "https://source.cloud.google.com/projects/roleypoly/repos/github_roleypoly_roleypoly/moveable-alias/gcf/paths/src/functions/hello-world"
}
trigger_http = true
entry_point = "helloGET"
}
# IAM entry for all users to invoke the function
resource "google_cloudfunctions_function_iam_member" "invoker" {
project = google_cloudfunctions_function.function.project
region = google_cloudfunctions_function.function.region
cloud_function = google_cloudfunctions_function.function.name
role = "roles/cloudfunctions.invoker"
member = "allUsers"
}

View file

@ -0,0 +1,26 @@
terraform {
required_version = ">=0.14"
required_providers {
google = {
source = "hashicorp/google"
version = ">=3.49.0"
}
}
}
/*
Google Cloud
*/
# variable "gcs_token" { type = string }
# variable "gcs_region" { type = string }
# variable "gcs_project" { type = string }
provider "google" {
# project = var.gcs_project
# region = var.gcs_region
# credentials = var.gcs_token
scopes = [
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/cloud-platform",
]
}