diff --git a/2.kubernetes-nginx/README.md b/2.kubernetes-nginx/README.md index ebffb4f..48ee01f 100644 --- a/2.kubernetes-nginx/README.md +++ b/2.kubernetes-nginx/README.md @@ -3,6 +3,8 @@ The work here assumes you have a Kubernetes cluster with `kubectl` installed and The [main.tf](main.tf) file has the configuration that Terraform will use to create the Nginx in the Kubernetes cluster. +This example also has a commented out snippet of using Artifactory as the [Terraform backend](https://jfrog.com/help/r/jfrog-artifactory-documentation/terraform-backend-repository). + 1. Initialize the Terraform configuration by running the following command ```shell terraform init diff --git a/2.kubernetes-nginx/main.tf b/2.kubernetes-nginx/main.tf index 3992fa2..fce770f 100644 --- a/2.kubernetes-nginx/main.tf +++ b/2.kubernetes-nginx/main.tf @@ -1,3 +1,23 @@ +terraform { + ## Configure the remote backend (Artifactory) + ## This will store the state file in Artifactory. + ## Follow https://jfrog.com/help/r/jfrog-artifactory-documentation/terraform-backend-repository + # backend "remote" { + # hostname = "eldada.jfrog.io" + # organization = "terraform-backend" + # workspaces { + # prefix = "demo-" + # } + # } + + required_providers { + # Kubernetes provider + kubernetes = { + source = "hashicorp/kubernetes" + } + } +} + provider "kubernetes" { config_path = "~/.kube/config" }