Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit 9c3b88ab authored by Kenny Moore's avatar Kenny Moore
Browse files

Before GKE changes to network

parent 59507ab5
......@@ -9,6 +9,5 @@ resource "google_billing_account_iam_member" "binding" {
member = "group:${var.billing_mcomm}"
}
# EDITOR; nested in billing MCOMM - umich-gcp-project-tf-test@umich.edu
# umich-gcp-project-tf-test-billing@umich.edu
\ No newline at end of file
# resource "google_compute_subnetwork" "modify_default"{
# name = var.default_subnets[0]
# network = google_compute_network.default_vpc.self_link
# }
data "google_compute_subnetwork" "subnet_input"{
name = var.default_subnets[0]
project = var.project_id
region = "us-central1"
}
locals {
start_cidr = "10.255.192.0/18"
k8s_networks = ["pods","services"]
subnets = cidrsubnets(local.start_cidr,1,2)
}
resource "google_compute_subnetwork" "modify_subnet" {
name = var.default_subnet
ip_cidr_range = data.google_compute_subnetwork.subnet_input.ip_cidr_range
region = "us-central1"
network = data.google_compute_subnetwork.subnet_input.network
secondary_ip_range {
range_name = "gke-services"
ip_cidr_range = "10.255.224.0/20"
}
}
# resource "google_compute_subnetwork" "default_subnet" {
# for_each = local.default_subnets
# project = "${google_project.gcp_project.project_id}"
# name = "default-${each.key}"
# region = each.key
# ip_cidr_range = each.value
# network = google_compute_network.default_vpc.self_link
# }
# module "kubernetes-engine" {
# source = "terraform-google-modules/kubernetes-engine/google"
# version = "5.1.1"
# project_id = module.gcp_project.project_id
# name = "gke-test-1"
# region = "us-central1"
# # zones = ["us-central1-a", "us-central1-b", "us-central1-f"]
# network = "um-default-vpc"
# subnetwork = "default-us-central1"
# ip_range_pods = "us-central1-01-gke-01-pods"
# ip_range_services = "us-central1-01-gke-01-services"
# # http_load_balancing = false
# horizontal_pod_autoscaling = true
# kubernetes_dashboard = true
# # network_policy = true
# # node_pools = [{"name": "node-pool01"}]
# remove_default_node_pool = true
# }
\ No newline at end of file
variable "project_id" {
}
variable "prefix" {
}
variable "default_vpc_name" {
}
variable "default_vpc_self_link" {
}
variable "default_subnets" {
}
\ No newline at end of file
......@@ -8,4 +8,15 @@ output "prefix" {
output "billing_id" {
value = var.billing_id
}
output "default_vpc_name"{
value = google_compute_network.default_vpc.name
}
output "default_vpc_self_link"{
value = google_compute_network.default_vpc.self_link
}
output "default_subnets"{
value = values(google_compute_subnetwork.default_subnet)[*]["name"]
}
\ No newline at end of file
......@@ -47,6 +47,11 @@ variable "vpn" {
default = true
}
variable "gke" {
description = "If set to true, will create secondary IP address ranges in the first network in the region list"
type = bool
default = false
}
# variable "sensitiveData" {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment