Difference between revisions of "Terraform Kubernetes resource: kubernetes service account"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
* https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service_account.html | * https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service_account.html | ||
+ | == Official example == | ||
+ | resource "kubernetes_service_account" "example" { | ||
+ | metadata { | ||
+ | name = "terraform-example" | ||
+ | } | ||
+ | secret { | ||
+ | name = "${kubernetes_secret.example.metadata.0.name}" | ||
+ | } | ||
+ | } | ||
+ | resource "kubernetes_secret" "example" { | ||
+ | metadata { | ||
+ | name = "terraform-example" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | == Related == | ||
* [[Configuring a Kubernetes service account to assume an IAM role]] | * [[Configuring a Kubernetes service account to assume an IAM role]] | ||
Revision as of 15:58, 24 October 2023
Official example
resource "kubernetes_service_account" "example" { metadata { name = "terraform-example" } secret { name = "${kubernetes_secret.example.metadata.0.name}" } }
resource "kubernetes_secret" "example" { metadata { name = "terraform-example" } }
Related
See also
- Terraform provider: Kubernetes,
kubernetes_storage_class_v1, kubernetes_persistent_volume, kubernetes_manifest, kubernetes daemonset, kubernetes_service, kubernetes_namespace, kubernetes_service_account, kubernetes_secret, kubernetes_namespace, kubernetes_service_account_v1, kubernetes_secret_v1, kubernetes horizontal pod autoscaler v1, kubernetes_ingress_v1, kubernetes_persistent_volume_claim_v1
- Terraform resources, Terraform providers, Terraform provisioner,
random_password, random_string, null_resource
Advertising: