Creating Secrets in K8 using Multiple Provider -Terraform

provider “kubernetes”{

}
resource "kubernetes_secret" "example" {
metadata {
namespace = "developers"
}

data = {
username = "admin"
password = "P4ssw0rd"
}

provider “kubernetes”{
alias = “developers”
token = var.dev_token
}
provider “kubernetes”{
alias = “testing”
token = var.qa_token
}
provider “kubernetes”{
alias = “staging”
token = var.stag
}

resource “kubernetes_secret” “dev_secret”{
metadata = {
namespace= “developers”
}
providers = kuberenetes.developers
data={

}
//2nd one
resource “kubernetes_secret” “qa_secret”{
metadata = {
namespace= “testers”
}
providers = kuberenetes.testing
data={

}
// similarly for others…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store