Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
sync updates from internal repo since open sourcing
Browse files Browse the repository at this point in the history
- forgot to specify versions of each provider
- forgot to include `project` in some resources
  • Loading branch information
mattnworb committed Dec 11, 2019
1 parent eb46514 commit 2ea39db
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.tf
Expand Up @@ -14,6 +14,7 @@ resource "google_container_cluster" "kubeflow_cluster" {

name = "${var.cluster_name}"
location = "${var.cluster_zone}"
project = "${var.project}"

# TPU requires a separate ip range (https://cloud.google.com/tpu/docs/kubernetes-engine-setup)
# Disable it for now until we figure out how it works with xpn network
Expand Down Expand Up @@ -102,6 +103,7 @@ resource "google_container_node_pool" "main_pool" {

cluster = "${google_container_cluster.kubeflow_cluster.name}"
location = "${var.cluster_zone}"
project = "${var.project}"

name = "${var.main_node_pool_name}"

Expand Down Expand Up @@ -149,6 +151,7 @@ resource "google_container_node_pool" "gpu_pool" {

cluster = "${google_container_cluster.kubeflow_cluster.name}"
location = "${var.cluster_zone}"
project = "${var.project}"

name = "${var.gpu_node_pool_name}"

Expand Down Expand Up @@ -201,6 +204,7 @@ resource "google_container_node_pool" "highmem_pool" {

cluster = "${google_container_cluster.kubeflow_cluster.name}"
location = "${var.cluster_zone}"
project = "${var.project}"

name = "${var.highmem_node_pool_name}"

Expand Down Expand Up @@ -246,6 +250,7 @@ resource "google_container_node_pool" "highmem_pool" {
resource "google_compute_disk" "artifact_store" {
name = "${var.cluster_name}-artifact-store"
zone = "${var.cluster_zone}"
project = "${var.project}"
physical_block_size_bytes = 4096
size = 200
labels = {
Expand Down
12 changes: 12 additions & 0 deletions providers.tf
@@ -1,13 +1,25 @@
# set project for the provider as a whole to avoid having to repeat it for each resource
provider "google" {
project = "${var.project}"
version = "~> 2.7"
}

provider "google-beta" {
project = "${var.project}"
version = "~> 2.7"
}

provider "random" {
version = "~> 2.2"
}

provider "null" {
version = "~> 2.1"
}

provider "kubernetes" {
version = "~> 1.7"

# don't load config from ~/.kube/config
load_config_file = false

Expand Down
2 changes: 2 additions & 0 deletions velero.tf
Expand Up @@ -17,6 +17,8 @@ locals {
resource "google_storage_bucket" "backup_bucket" {
name = "${var.project}_${var.cluster_region}_${var.cluster_name}_backup"

bucket_policy_only = true

location = "EU"

# don't destroy buckets containing backup data if re-creating a cluster
Expand Down

0 comments on commit 2ea39db

Please sign in to comment.