-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.tf
51 lines (42 loc) · 988 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
terraform {
backend "gcs" {
bucket = "n30-tf-state-bucket"
prefix = ""
}
}
provider "google" {
project = var.project_id
region = var.region
}
provider "google-beta" {
project = var.project_id
region = var.region
}
variable "slack_notification_url" {
default = "https://hooks.slack.com/services/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"
}
variable "env" {
default = "dev"
}
variable "project_id" {
default = "development-380917"
}
variable "region" {
default = "us-east4"
}
variable "rebalance_queue" {
default = "rebalance"
}
locals {
resource_prefix = var.env == "prod" ? "" : "${var.env}-"
}
variable "token_bypass" {
type = string
}
resource "google_project_service" "enable_cloud_resource_manager_api" {
service = "cloudresourcemanager.googleapis.com"
}
resource "google_project_service" "enable_cloud_tasks_api" {
service = "tasks.googleapis.com"
depends_on = [google_project_service.enable_cloud_resource_manager_api]
}