diff --git a/hello-cloudbuild/k8s/demo/production-values.yaml b/hello-cloudbuild/k8s/demo/production-values.yaml index f67c74a..4578cee 100755 --- a/hello-cloudbuild/k8s/demo/production-values.yaml +++ b/hello-cloudbuild/k8s/demo/production-values.yaml @@ -1 +1 @@ -environment: production +phase: production diff --git a/hello-cloudbuild/k8s/demo/staging-values.yaml b/hello-cloudbuild/k8s/demo/staging-values.yaml index ca87939..3590016 100755 --- a/hello-cloudbuild/k8s/demo/staging-values.yaml +++ b/hello-cloudbuild/k8s/demo/staging-values.yaml @@ -1 +1 @@ -environment: staging +phase: staging diff --git a/hello-cloudbuild/k8s/demo/templates/deployment.yaml b/hello-cloudbuild/k8s/demo/templates/deployment.yaml index 53e6629..abe8c12 100755 --- a/hello-cloudbuild/k8s/demo/templates/deployment.yaml +++ b/hello-cloudbuild/k8s/demo/templates/deployment.yaml @@ -8,7 +8,7 @@ spec: metadata: labels: app: {{ .Values.container.name }} - environment: {{ .Values.environment }} + phase: {{ .Values.phase }} spec: containers: - name: {{ .Values.container.name }} @@ -16,6 +16,6 @@ spec: ports: - containerPort: {{ .Values.container.port }} env: - - name: ENVIRONMENT - value: {{ .Values.environment }} + - name: PHASE + value: {{ .Values.phase }} diff --git a/hello-cloudbuild/k8s/demo/values.yaml b/hello-cloudbuild/k8s/demo/values.yaml index 908a42a..7a1a6f4 100755 --- a/hello-cloudbuild/k8s/demo/values.yaml +++ b/hello-cloudbuild/k8s/demo/values.yaml @@ -1,4 +1,4 @@ -environment: development +phase: development container: name: demo port: 8888 diff --git a/hello-drone/k8s/demo/production-values.yaml b/hello-drone/k8s/demo/production-values.yaml index f67c74a..4578cee 100755 --- a/hello-drone/k8s/demo/production-values.yaml +++ b/hello-drone/k8s/demo/production-values.yaml @@ -1 +1 @@ -environment: production +phase: production diff --git a/hello-drone/k8s/demo/staging-values.yaml b/hello-drone/k8s/demo/staging-values.yaml index ca87939..3590016 100755 --- a/hello-drone/k8s/demo/staging-values.yaml +++ b/hello-drone/k8s/demo/staging-values.yaml @@ -1 +1 @@ -environment: staging +phase: staging diff --git a/hello-drone/k8s/demo/templates/deployment.yaml b/hello-drone/k8s/demo/templates/deployment.yaml index 53e6629..abe8c12 100755 --- a/hello-drone/k8s/demo/templates/deployment.yaml +++ b/hello-drone/k8s/demo/templates/deployment.yaml @@ -8,7 +8,7 @@ spec: metadata: labels: app: {{ .Values.container.name }} - environment: {{ .Values.environment }} + phase: {{ .Values.phase }} spec: containers: - name: {{ .Values.container.name }} @@ -16,6 +16,6 @@ spec: ports: - containerPort: {{ .Values.container.port }} env: - - name: ENVIRONMENT - value: {{ .Values.environment }} + - name: PHASE + value: {{ .Values.phase }} diff --git a/hello-drone/k8s/demo/values.yaml b/hello-drone/k8s/demo/values.yaml index 908a42a..7a1a6f4 100755 --- a/hello-drone/k8s/demo/values.yaml +++ b/hello-drone/k8s/demo/values.yaml @@ -1,4 +1,4 @@ -environment: development +phase: development container: name: demo port: 8888 diff --git a/hello-helm/k8s/demo/production-values.yaml b/hello-helm/k8s/demo/production-values.yaml index f67c74a..4578cee 100755 --- a/hello-helm/k8s/demo/production-values.yaml +++ b/hello-helm/k8s/demo/production-values.yaml @@ -1 +1 @@ -environment: production +phase: production diff --git a/hello-helm/k8s/demo/staging-values.yaml b/hello-helm/k8s/demo/staging-values.yaml index ca87939..3590016 100755 --- a/hello-helm/k8s/demo/staging-values.yaml +++ b/hello-helm/k8s/demo/staging-values.yaml @@ -1 +1 @@ -environment: staging +phase: staging diff --git a/hello-helm/k8s/demo/templates/deployment.yaml b/hello-helm/k8s/demo/templates/deployment.yaml index 53e6629..abe8c12 100755 --- a/hello-helm/k8s/demo/templates/deployment.yaml +++ b/hello-helm/k8s/demo/templates/deployment.yaml @@ -8,7 +8,7 @@ spec: metadata: labels: app: {{ .Values.container.name }} - environment: {{ .Values.environment }} + phase: {{ .Values.phase }} spec: containers: - name: {{ .Values.container.name }} @@ -16,6 +16,6 @@ spec: ports: - containerPort: {{ .Values.container.port }} env: - - name: ENVIRONMENT - value: {{ .Values.environment }} + - name: PHASE + value: {{ .Values.phase }} diff --git a/hello-helm/k8s/demo/values.yaml b/hello-helm/k8s/demo/values.yaml index 908a42a..7a1a6f4 100755 --- a/hello-helm/k8s/demo/values.yaml +++ b/hello-helm/k8s/demo/values.yaml @@ -1,4 +1,4 @@ -environment: development +phase: development container: name: demo port: 8888 diff --git a/hello-skaffold/k8s/demo/production-values.yaml b/hello-skaffold/k8s/demo/production-values.yaml index f67c74a..4578cee 100755 --- a/hello-skaffold/k8s/demo/production-values.yaml +++ b/hello-skaffold/k8s/demo/production-values.yaml @@ -1 +1 @@ -environment: production +phase: production diff --git a/hello-skaffold/k8s/demo/staging-values.yaml b/hello-skaffold/k8s/demo/staging-values.yaml index ca87939..3590016 100755 --- a/hello-skaffold/k8s/demo/staging-values.yaml +++ b/hello-skaffold/k8s/demo/staging-values.yaml @@ -1 +1 @@ -environment: staging +phase: staging diff --git a/hello-skaffold/k8s/demo/templates/deployment.yaml b/hello-skaffold/k8s/demo/templates/deployment.yaml index 53e6629..abe8c12 100755 --- a/hello-skaffold/k8s/demo/templates/deployment.yaml +++ b/hello-skaffold/k8s/demo/templates/deployment.yaml @@ -8,7 +8,7 @@ spec: metadata: labels: app: {{ .Values.container.name }} - environment: {{ .Values.environment }} + phase: {{ .Values.phase }} spec: containers: - name: {{ .Values.container.name }} @@ -16,6 +16,6 @@ spec: ports: - containerPort: {{ .Values.container.port }} env: - - name: ENVIRONMENT - value: {{ .Values.environment }} + - name: PHASE + value: {{ .Values.phase }} diff --git a/hello-skaffold/k8s/demo/values.yaml b/hello-skaffold/k8s/demo/values.yaml index dc78816..779f854 100755 --- a/hello-skaffold/k8s/demo/values.yaml +++ b/hello-skaffold/k8s/demo/values.yaml @@ -1,4 +1,4 @@ -environment: development +phase: development image: repository: demo tag: hello diff --git a/hello-sops/k8s/demo/production-values.yaml b/hello-sops/k8s/demo/production-values.yaml index f67c74a..4578cee 100755 --- a/hello-sops/k8s/demo/production-values.yaml +++ b/hello-sops/k8s/demo/production-values.yaml @@ -1 +1 @@ -environment: production +phase: production diff --git a/hello-sops/k8s/demo/staging-values.yaml b/hello-sops/k8s/demo/staging-values.yaml index ca87939..3590016 100755 --- a/hello-sops/k8s/demo/staging-values.yaml +++ b/hello-sops/k8s/demo/staging-values.yaml @@ -1 +1 @@ -environment: staging +phase: staging diff --git a/hello-sops/k8s/demo/templates/deployment.yaml b/hello-sops/k8s/demo/templates/deployment.yaml index 1d569cd..720d2cf 100755 --- a/hello-sops/k8s/demo/templates/deployment.yaml +++ b/hello-sops/k8s/demo/templates/deployment.yaml @@ -8,7 +8,7 @@ spec: metadata: labels: app: {{ .Values.container.name }} - environment: {{ .Values.environment }} + phase: {{ .Values.phase }} spec: containers: - name: {{ .Values.container.name }} diff --git a/hello-sops/k8s/demo/templates/secrets.yaml b/hello-sops/k8s/demo/templates/secrets.yaml index 69b42e9..df0b7b2 100644 --- a/hello-sops/k8s/demo/templates/secrets.yaml +++ b/hello-sops/k8s/demo/templates/secrets.yaml @@ -4,5 +4,5 @@ metadata: name: {{ .Values.container.name }}-secrets type: Opaque data: - {{ $environment := .Values.environment }} - secrets.yaml: {{ .Files.Get (nospace (cat $environment "-secrets.yaml")) | b64enc }} + {{ $phase := .Values.phase }} + secrets.yaml: {{ .Files.Get (nospace (cat $phase "-secrets.yaml")) | b64enc }} diff --git a/hello-sops/k8s/demo/values.yaml b/hello-sops/k8s/demo/values.yaml index 908a42a..7a1a6f4 100755 --- a/hello-sops/k8s/demo/values.yaml +++ b/hello-sops/k8s/demo/values.yaml @@ -1,4 +1,4 @@ -environment: development +phase: development container: name: demo port: 8888 diff --git a/terraform/aws/bucket/01/main.tf b/terraform/aws/bucket/01/main.tf index d5b283a..652cd3f 100644 --- a/terraform/aws/bucket/01/main.tf +++ b/terraform/aws/bucket/01/main.tf @@ -5,7 +5,7 @@ resource "aws_s3_bucket" "bucket" { acl = "private" tags { - App = "demo" - Environment = "test" + App = "demo" + Phase = "test" } } diff --git a/terraform/aws/bucket/02/main.tf b/terraform/aws/bucket/02/main.tf index 66ccd61..7d52146 100644 --- a/terraform/aws/bucket/02/main.tf +++ b/terraform/aws/bucket/02/main.tf @@ -1,11 +1,11 @@ provider "aws" {} resource "aws_s3_bucket" "bucket" { - bucket = "${var.environment}-${var.your_name}-cloudnativedevops-${var.name}-bucket" + bucket = "${var.phase}-${var.your_name}-cloudnativedevops-${var.name}-bucket" acl = "private" tags { - App = "${var.name}" - Environment = "${var.environment}" + App = "${var.name}" + Phase = "${var.phase}" } } diff --git a/terraform/aws/bucket/02/variables.tf b/terraform/aws/bucket/02/variables.tf index c97f056..380c141 100644 --- a/terraform/aws/bucket/02/variables.tf +++ b/terraform/aws/bucket/02/variables.tf @@ -2,7 +2,7 @@ variable "name" { default = "demo" } -variable "environment" { +variable "phase" { default = "test" } diff --git a/terraform/aws/bucket/03/main.tf b/terraform/aws/bucket/03/main.tf index 66ccd61..7d52146 100644 --- a/terraform/aws/bucket/03/main.tf +++ b/terraform/aws/bucket/03/main.tf @@ -1,11 +1,11 @@ provider "aws" {} resource "aws_s3_bucket" "bucket" { - bucket = "${var.environment}-${var.your_name}-cloudnativedevops-${var.name}-bucket" + bucket = "${var.phase}-${var.your_name}-cloudnativedevops-${var.name}-bucket" acl = "private" tags { - App = "${var.name}" - Environment = "${var.environment}" + App = "${var.name}" + Phase = "${var.phase}" } } diff --git a/terraform/aws/bucket/03/production.tfvars b/terraform/aws/bucket/03/production.tfvars index 58351f9..e8228a4 100644 --- a/terraform/aws/bucket/03/production.tfvars +++ b/terraform/aws/bucket/03/production.tfvars @@ -1 +1 @@ -environment = "production" +phase = "production" diff --git a/terraform/aws/bucket/03/staging.tfvars b/terraform/aws/bucket/03/staging.tfvars index b227228..fb1e61f 100644 --- a/terraform/aws/bucket/03/staging.tfvars +++ b/terraform/aws/bucket/03/staging.tfvars @@ -1 +1 @@ -environment = "staging" +phase = "staging" diff --git a/terraform/aws/bucket/03/variables.tf b/terraform/aws/bucket/03/variables.tf index c97f056..380c141 100644 --- a/terraform/aws/bucket/03/variables.tf +++ b/terraform/aws/bucket/03/variables.tf @@ -2,7 +2,7 @@ variable "name" { default = "demo" } -variable "environment" { +variable "phase" { default = "test" } diff --git a/terraform/aws/database/main.tf b/terraform/aws/database/main.tf index 06f2758..cbc1456 100644 --- a/terraform/aws/database/main.tf +++ b/terraform/aws/database/main.tf @@ -9,7 +9,7 @@ resource "aws_rds_cluster" "db" { skip_final_snapshot = true tags { - App = "${var.name}" - Environment = "${var.environment}" + App = "${var.name}" + Phase = "${var.phase}" } } diff --git a/terraform/aws/database/variables.tf b/terraform/aws/database/variables.tf index 4d9ca2d..3eed5da 100644 --- a/terraform/aws/database/variables.tf +++ b/terraform/aws/database/variables.tf @@ -2,6 +2,6 @@ variable "name" { default = "demo" } -variable "environment" { +variable "phase" { default = "test" } diff --git a/terraform/aws/vm/main.tf b/terraform/aws/vm/main.tf index b07bc52..070a5a4 100644 --- a/terraform/aws/vm/main.tf +++ b/terraform/aws/vm/main.tf @@ -5,8 +5,8 @@ resource "aws_instance" "vm" { instance_type = "t2.micro" tags { - App = "${var.name}" - Environent = "${var.environment}" - Name = "${var.environment}-${var.name}" + App = "${var.name}" + Phase = "${var.phase}" + Name = "${var.phase}-${var.name}" } } diff --git a/terraform/aws/vm/production.tfvars b/terraform/aws/vm/production.tfvars index 58351f9..e8228a4 100644 --- a/terraform/aws/vm/production.tfvars +++ b/terraform/aws/vm/production.tfvars @@ -1 +1 @@ -environment = "production" +phase = "production" diff --git a/terraform/aws/vm/staging.tfvars b/terraform/aws/vm/staging.tfvars index b227228..fb1e61f 100644 --- a/terraform/aws/vm/staging.tfvars +++ b/terraform/aws/vm/staging.tfvars @@ -1 +1 @@ -environment = "staging" +phase = "staging" diff --git a/terraform/aws/vm/variables.tf b/terraform/aws/vm/variables.tf index 4d9ca2d..3eed5da 100644 --- a/terraform/aws/vm/variables.tf +++ b/terraform/aws/vm/variables.tf @@ -2,6 +2,6 @@ variable "name" { default = "demo" } -variable "environment" { +variable "phase" { default = "test" } diff --git a/terraform/gcp/bucket/01/main.tf b/terraform/gcp/bucket/01/main.tf index 2fae8be..9c27257 100644 --- a/terraform/gcp/bucket/01/main.tf +++ b/terraform/gcp/bucket/01/main.tf @@ -4,7 +4,7 @@ resource "google_storage_bucket" "bucket" { name = "test--cloudnativedevops-demo-bucket" labels { - app = "demo" - environment = "test" + app = "demo" + phase = "test" } } diff --git a/terraform/gcp/bucket/02/main.tf b/terraform/gcp/bucket/02/main.tf index 6b54f84..d7e2403 100644 --- a/terraform/gcp/bucket/02/main.tf +++ b/terraform/gcp/bucket/02/main.tf @@ -1,10 +1,10 @@ provider "google" {} resource "google_storage_bucket" "bucket" { - name = "${var.environment}-${var.your_name}-cloudnativedevops-${var.name}-bucket" + name = "${var.phase}-${var.your_name}-cloudnativedevops-${var.name}-bucket" labels { - app = "${var.name}" - environment = "${var.environment}" + app = "${var.name}" + phase = "${var.phase}" } } diff --git a/terraform/gcp/bucket/02/variables.tf b/terraform/gcp/bucket/02/variables.tf index c97f056..380c141 100644 --- a/terraform/gcp/bucket/02/variables.tf +++ b/terraform/gcp/bucket/02/variables.tf @@ -2,7 +2,7 @@ variable "name" { default = "demo" } -variable "environment" { +variable "phase" { default = "test" } diff --git a/terraform/gcp/bucket/03/production.tfvars b/terraform/gcp/bucket/03/production.tfvars index 58351f9..e8228a4 100644 --- a/terraform/gcp/bucket/03/production.tfvars +++ b/terraform/gcp/bucket/03/production.tfvars @@ -1 +1 @@ -environment = "production" +phase = "production" diff --git a/terraform/gcp/bucket/03/staging.tfvars b/terraform/gcp/bucket/03/staging.tfvars index b227228..fb1e61f 100644 --- a/terraform/gcp/bucket/03/staging.tfvars +++ b/terraform/gcp/bucket/03/staging.tfvars @@ -1 +1 @@ -environment = "staging" +phase = "staging" diff --git a/terraform/gcp/bucket/03/variables.tf b/terraform/gcp/bucket/03/variables.tf index c97f056..380c141 100644 --- a/terraform/gcp/bucket/03/variables.tf +++ b/terraform/gcp/bucket/03/variables.tf @@ -2,7 +2,7 @@ variable "name" { default = "demo" } -variable "environment" { +variable "phase" { default = "test" } diff --git a/terraform/gcp/database/variables.tf b/terraform/gcp/database/variables.tf index 4d9ca2d..3eed5da 100644 --- a/terraform/gcp/database/variables.tf +++ b/terraform/gcp/database/variables.tf @@ -2,6 +2,6 @@ variable "name" { default = "demo" } -variable "environment" { +variable "phase" { default = "test" } diff --git a/terraform/gcp/k8scluster/main.tf b/terraform/gcp/k8scluster/main.tf index 6200038..d44191d 100644 --- a/terraform/gcp/k8scluster/main.tf +++ b/terraform/gcp/k8scluster/main.tf @@ -1,7 +1,7 @@ provider "google" {} resource "google_container_cluster" "k8s-cluster" { - name = "${var.environment}-cloudnativedevops-${var.name}-k8s-cluster" + name = "${var.phase}-cloudnativedevops-${var.name}-k8s-cluster" initial_node_count = "${var.initial_node_count}" zone = "${var.zone}" } diff --git a/terraform/gcp/k8scluster/production.tfvars b/terraform/gcp/k8scluster/production.tfvars index 391eb0a..b87ba03 100644 --- a/terraform/gcp/k8scluster/production.tfvars +++ b/terraform/gcp/k8scluster/production.tfvars @@ -1,3 +1,3 @@ -environment = "production" +phase = "production" initial_node_count = 4 diff --git a/terraform/gcp/k8scluster/staging.tfvars b/terraform/gcp/k8scluster/staging.tfvars index 96d004c..e36fa66 100644 --- a/terraform/gcp/k8scluster/staging.tfvars +++ b/terraform/gcp/k8scluster/staging.tfvars @@ -1,3 +1,3 @@ -environment = "staging" +phase = "staging" initial_node_count = 3 diff --git a/terraform/gcp/k8scluster/variables.tf b/terraform/gcp/k8scluster/variables.tf index 52999d2..6fb4bb5 100644 --- a/terraform/gcp/k8scluster/variables.tf +++ b/terraform/gcp/k8scluster/variables.tf @@ -2,7 +2,7 @@ variable "name" { default = "demo" } -variable "environment" { +variable "phase" { default = "test" }