Hello,
I am looking for a terraform example to use persistent_volume_claim on kubernetes_deployment_v1 resource,
as per Terraform Registry
my current terraform as below,
resource “kubernetes_deployment_v1” “example” {
metadata {
name = “deployment-name”
namespace = “deployment-namespace”
labels = {
“app.kubernetes.io/name” = “deployment-name”
}
}
spec {
replicas = 1
selector {
match_labels = {
“app.kubernetes.io/name” = “deployment-name”
}
}
template {
metadata {
labels = {
“app.kubernetes.io/name” = “deployment-name”
}
}
spec {
image_pull_secrets {
name = “image-pull-secret”
}
container {
image = “container-path”
name = “container-name”
}
}
}
}
}