Skip to content

Commit eda4db4

Browse files
committed
Rename new idfdev cluster
1 parent 8484c62 commit eda4db4

File tree

6 files changed

+97
-8
lines changed

6 files changed

+97
-8
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Deploys Science Platform Dev GCP Project with Terraform
2-
name: 'RSP DEV2 GKE'
2+
name: 'RSP DEV NEW GKE'
33

44
on:
55
pull_request:
66
paths:
7-
- 'environment/deployments/science-platform/env/dev2-gke.tfvars'
7+
- 'environment/deployments/science-platform/env/dev-new-gke.tfvars'
88
push:
99
branches:
1010
- main
1111
paths:
12-
- 'environment/deployments/science-platform/env/dev2-gke.tfvars'
12+
- 'environment/deployments/science-platform/env/dev-new-gke.tfvars'
1313
schedule:
1414
- cron: 25 2 * * *
1515
workflow_dispatch:
@@ -55,7 +55,7 @@ jobs:
5555

5656
# Initialize a new or existing terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
5757
- name: Terraform Init
58-
run: terraform init -backend-config=bucket=${{ secrets.TERRAFORM_STATE_BUCKET }} -backend-config=prefix=science-platform/dev2/gke
58+
run: terraform init -backend-config=bucket=${{ secrets.TERRAFORM_STATE_BUCKET }} -backend-config=prefix=science-platform/dev-new/gke
5959

6060
# Checks that all terraform configuration files adhere to a canonical format
6161
- name: Terraform Validate
@@ -64,12 +64,12 @@ jobs:
6464
# Generates an execution plan for terraform
6565
- name: Terraform Plan
6666
id: plan
67-
run: terraform plan -var-file=../env/dev2-gke.tfvars -no-color
67+
run: terraform plan -var-file=../env/dev-new-gke.tfvars -no-color
6868

6969
# On push to main, build or change infrastructure according to Terraform configuration files
7070
- name: Terraform Apply
7171
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
72-
run: terraform apply -var-file=../env/dev2-gke.tfvars -auto-approve
72+
run: terraform apply -var-file=../env/dev-new-gke.tfvars -auto-approve
7373

7474
- name: Report status
7575
if: failure() && github.ref == 'refs/heads/main'

environment/deployments/roundtable/gke/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module "gke" {
3333
source = "../../../../modules/gke"
3434

3535
# Cluster
36-
name = "${var.application_name}-${var.environment}"
36+
name = var.cluster_name ? var.cluster_name : "${var.application_name}-${var.environment}"
3737
project_id = local.project_id
3838
network = var.network_name
3939
subnetwork = local.subnetwork

environment/deployments/roundtable/gke/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ variable "environment" {
1010
type = string
1111
}
1212

13+
variable "cluster_name" {
14+
description = "The name of the GKE cluster, if you want it to be different than application_name"
15+
type = string
16+
default = null
17+
}
18+
1319
# VPC
1420

1521
variable "network_name" {

environment/deployments/science-platform/env/dev2-gke.tfvars renamed to environment/deployments/science-platform/env/dev-new-gke.tfvars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Project
22
environment = "dev"
33
application_name = "science-platform"
4+
cluster_name = "rsp-dev"
45

56
# This refers to the pre-DataplaneV2 Calico network policies. These are not
67
# compatible with DataplaneV2, so they must not be enabled in clusters with

environment/deployments/science-platform/gke/.terraform.lock.hcl

Lines changed: 82 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

environment/deployments/science-platform/gke/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module "gke" {
3333
source = "../../../../modules/gke"
3434

3535
# Cluster
36-
name = "${var.application_name}-${var.environment}2"
36+
name = "${var.application_name}-${var.environment}"
3737
project_id = local.project_id
3838
network = var.network_name
3939
subnetwork = local.subnetwork

0 commit comments

Comments
 (0)