Created
September 30, 2020 17:06
-
-
Save steven-terrana/57278ea75744c435466be0f8ef739c95 to your computer and use it in GitHub Desktop.
use outputs from co-created resources with kubernetes-alpha provider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: test-config-${int} | |
namespace: default | |
data: | |
something: "value" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "kubernetes-alpha"{ | |
config_path = "~/.kube/config" | |
} | |
resource "random_integer" "priority" { | |
min = 1 | |
max = 50000 | |
} | |
resource "kubernetes_manifest" "test-configmap" { | |
provider = kubernetes-alpha | |
manifest = yamldecode(templatefile("application.yaml", { int: random_integer.priority.result })) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment