Skip to content

Commit

Permalink
Bugfix: #56, by forking hcl, submitted PR (#63)
Browse files Browse the repository at this point in the history
* Bugfix: #56, by forking hcl, submitted PR

* added test

Co-authored-by: Roni Frantchi <roni-frantchi@users.noreply.github.com>
  • Loading branch information
shlomimatichin and roni-frantchi committed Oct 12, 2020
1 parent a215c41 commit e45c8e2
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go.mod
Expand Up @@ -14,3 +14,7 @@ require (
golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect
google.golang.org/protobuf v1.24.0 // indirect
)

// remove the following directive when https://github.com/hashicorp/hcl/issues/402 gets fixed

replace github.com/hashicorp/hcl/v2 => github.com/env0/hcl/v2 v2.2.1-0.20201012055633-9ccfb031dba0
2 changes: 2 additions & 0 deletions go.sum
Expand Up @@ -142,6 +142,8 @@ github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCf
github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1/go.mod h1:lcy9/2gH1jn/VCLouHA6tOEwLoNVd4GW6zhuKLmHC2Y=
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/env0/hcl/v2 v2.2.1-0.20201012055633-9ccfb031dba0 h1:pvNP3LKzxNNMVCB/IlPJ+tEzL6eY7E8PMiBqt609Qqs=
github.com/env0/hcl/v2 v2.2.1-0.20201012055633-9ccfb031dba0/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY=
github.com/env0/tfschema v0.3.1-0.20190530131153-e80f61aaf88b/go.mod h1:6Zuhgp4anExvB/JgjHyZNWDV690Jixmu41OuiWvg+7U=
github.com/env0/tfschema v0.3.1-0.20200726141535-d161300e087f h1:Ks45XC1aKTtIoDlYxO12TpLDWHi7UfNIAjfMTiyKdoU=
github.com/env0/tfschema v0.3.1-0.20200726141535-d161300e087f/go.mod h1:6Zuhgp4anExvB/JgjHyZNWDV690Jixmu41OuiWvg+7U=
Expand Down
@@ -0,0 +1,34 @@
resource "kubernetes_deployment" "audit_server" {
metadata {
name = "terraform-example"
}
spec {
template {
metadata {
labels = {
app = "as"
}
}
spec {
container {
image = "helloworld"
name = "as"
}
}
}
replicas = true ? 0 : (false ? 3 : 4)
strategy {
type = "Recreate"
}
}
}

resource "google_pubsub_topic" "audit_topic" {
name = "yuvu"
labels = merge( local.terratag_added_main, local.terratag_added_main)
}

locals {
terratag_added_main = {"env0_environment_id"="40907eff-cf7c-419a-8694-e1c6bf1d1168","env0_project_id"="43fd4ff1-8d37-4d9d-ac97-295bd850bf94"}
}

@@ -0,0 +1,29 @@
resource "kubernetes_deployment" "audit_server" {
metadata {
name = "terraform-example"
}
spec {
template {
metadata {
labels = {
app = "as"
}
}
spec {
container {
image = "helloworld"
name = "as"
}
}
}
replicas = true ? 0 : (false ? 3 : 4)
strategy {
type = "Recreate"
}
}
}

resource "google_pubsub_topic" "audit_topic" {
name = "yuvu"
labels = local.terratag_added_main
}
@@ -0,0 +1,29 @@
resource "kubernetes_deployment" "audit_server" {
metadata {
name = "terraform-example"
}
spec {
template {
metadata {
labels = {
app = "as"
}
}
spec {
container {
image = "helloworld"
name = "as"
}
}
}
replicas = true ? 0 : (false ? 3 : 4)
strategy {
type = "Recreate"
}
}
}

resource "google_pubsub_topic" "audit_topic" {
name = "yuvu"
labels = local.terratag_added_main
}

0 comments on commit e45c8e2

Please sign in to comment.