Skip to content

Commit

Permalink
Merge pull request #5 from sailthru/upgrade-ambassador-tf12
Browse files Browse the repository at this point in the history
Upgrade module to terraform 0.12
  • Loading branch information
jnichols3 authored Mar 6, 2020
2 parents edcb890 + d5629d9 commit e300161
Show file tree
Hide file tree
Showing 13 changed files with 430 additions and 504 deletions.
68 changes: 30 additions & 38 deletions admin_service.tf
Original file line number Diff line number Diff line change
@@ -1,42 +1,34 @@
resource "kubernetes_service" "this_admin" {
count = "${var.admin_service_enable ? 1 : 0}"
count = var.admin_service_enable ? 1 : 0

metadata = [
{
annotations = "${var.admin_service_annotations}"
metadata {
annotations = var.admin_service_annotations
name = "${var.name}-admin"
namespace = var.namespace_name

labels = {
terrafrom = "true",
app = var.name
}
}

spec {
type = var.admin_service_type

port {
name = "${var.name}-admin"
namespace = "${var.namespace_name}"

labels {
terrafrom = "true"
}

labels {
app = "${var.name}"
}
},
]

spec = [
{
type = "${var.admin_service_type}"

port = [
{
name = "${var.name}-admin"
port = 8877
protocol = "TCP"
target_port = 8877
},
]

selector {
app = "${var.name}"
}

session_affinity = "None"
},
]

depends_on = ["kubernetes_namespace.this"]
port = 8877
protocol = "TCP"
target_port = 8877
}

selector = {
app = var.name
}

session_affinity = "None"
}

depends_on = [kubernetes_namespace.this]
}

18 changes: 8 additions & 10 deletions config.tf
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
resource "kubernetes_config_map" "this" {
metadata {
name = "${var.name}-config"
namespace = "${var.namespace_name}"
namespace = var.namespace_name

labels {
terrafrom = "true"
}

labels {
app = "${var.name}"
labels = {
terrafrom = "true",
app = var.name
}
}

data {
exporterConfiguration = "${var.exporter_configuration}"
data = {
exporterConfiguration = var.exporter_configuration
}

depends_on = ["kubernetes_namespace.this"]
depends_on = [kubernetes_namespace.this]
}

Loading

0 comments on commit e300161

Please sign in to comment.