Skip to content

Commit

Permalink
https://github.com/terraform-providers/terraform-provider-rancher2/is…
Browse files Browse the repository at this point in the history
…sues/27#issuecomment-647597415
  • Loading branch information
jjno91 committed Jun 22, 2020
1 parent 6bca5c1 commit d040fa2
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ resource "kubernetes_namespace" "this" {
metadata {
name = var.id
}

lifecycle {
ignore_changes = [
metadata[0].annotations,
metadata[0].labels
]
}
}

resource "kubernetes_cluster_role_binding" "this" {
Expand All @@ -21,15 +28,29 @@ resource "kubernetes_cluster_role_binding" "this" {
api_group = ""
namespace = kubernetes_namespace.this.metadata[0].name
}

lifecycle {
ignore_changes = [
metadata[0].annotations,
metadata[0].labels
]
}
}

resource "kubernetes_service_account" "this" {
automount_service_account_token = true

metadata {
name = "this"
namespace = kubernetes_namespace.this.metadata[0].name
}

automount_service_account_token = true
lifecycle {
ignore_changes = [
metadata[0].annotations,
metadata[0].labels
]
}
}

resource "kubernetes_deployment" "this" {
Expand Down Expand Up @@ -107,6 +128,13 @@ resource "kubernetes_deployment" "this" {
}
}
}

lifecycle {
ignore_changes = [
metadata[0].annotations,
metadata[0].labels
]
}
}

resource "kubernetes_service" "this" {
Expand Down Expand Up @@ -160,6 +188,13 @@ resource "kubernetes_ingress" "this" {
}
}
}

lifecycle {
ignore_changes = [
metadata[0].annotations,
metadata[0].labels
]
}
}

resource "kubernetes_persistent_volume_claim" "this" {
Expand All @@ -179,4 +214,11 @@ resource "kubernetes_persistent_volume_claim" "this" {
}
}
}

lifecycle {
ignore_changes = [
metadata[0].annotations,
metadata[0].labels
]
}
}

0 comments on commit d040fa2

Please sign in to comment.