-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
53 lines (46 loc) · 1.13 KB
/
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
52
53
# Setup Terraform Providers
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 3.74"
}
}
}
# Setup Variable for GCP Project ID
variable "project" {
type = string
description = "Google Cloud Platform Project ID"
}
# Setup Variable for GCP Deployment Region
variable "region" {
type = string
default = "asia-south1"
description = "Google Cloud Platform Deployment Region"
}
# Setup Provider for google
provider "google" {
region = var.region
project = var.project
}
# Setup Provider for google-beta
provider "google-beta" {
region = var.region
project = var.project
}
# Setup GCP Project
# terraform import google_project.geosentry-project <projectID>
resource "google_project" "geosentry-project" {
name = "GeoSentry"
project_id = var.project
}
# Enable Google Earth Engine API
resource "google_project_service" "earthengine-api" {
service = "earthengine.googleapis.com"
disable_on_destroy = false
}
# Enable Cloud Build API
resource "google_project_service" "cloudbuild-api" {
service = "cloudbuild.googleapis.com"
disable_on_destroy = false
}