From eb5f294606640ef187753e6b782450efb8ca2aa2 Mon Sep 17 00:00:00 2001 From: Garrett Johnson <67717+gjohnson@users.noreply.github.com> Date: Thu, 13 Apr 2023 06:21:19 -0400 Subject: [PATCH] Remove terraform.tfvars from example (#150) * Remove terraform.tfvars, use variables.tf for defaults * Run pre-commit --------- Co-authored-by: gjohnson Co-authored-by: Rodrigue Koffi --- examples/existing-cluster-with-base-and-infra/README.md | 5 +++-- .../existing-cluster-with-base-and-infra/terraform.tfvars | 8 -------- .../existing-cluster-with-base-and-infra/variables.tf | 1 + 3 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 examples/existing-cluster-with-base-and-infra/terraform.tfvars diff --git a/examples/existing-cluster-with-base-and-infra/README.md b/examples/existing-cluster-with-base-and-infra/README.md index f7c7859..2bf6b8a 100644 --- a/examples/existing-cluster-with-base-and-infra/README.md +++ b/examples/existing-cluster-with-base-and-infra/README.md @@ -43,7 +43,8 @@ To run this example, you need to provide your EKS cluster name. If you don't have a cluster ready, visit [this example](../eks-cluster-with-vpc) first to create a new one. -Add your cluster name for `eks_cluster_id="..."` to the `terraform.tfvars` or use an environment variable `export TF_VAR_eks_cluster_id=xxx`. +Add your cluster name for `eks_cluster_id="..."` to a new `terraform.tfvars` file +or use an environment variable `export TF_VAR_eks_cluster_id=xxx`. 4. Amazon Managed Grafana workspace @@ -170,7 +171,7 @@ terraform destroy -var-file=terraform.tfvars | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [aws\_region](#input\_aws\_region) | AWS Region | `string` | n/a | yes | -| [eks\_cluster\_id](#input\_eks\_cluster\_id) | Name of the EKS cluster | `string` | n/a | yes | +| [eks\_cluster\_id](#input\_eks\_cluster\_id) | Name of the EKS cluster | `string` | `"eks-cluster-with-vpc"` | no | | [enable\_dashboards](#input\_enable\_dashboards) | Enables or disables curated dashboards | `bool` | `true` | no | | [grafana\_api\_key](#input\_grafana\_api\_key) | API key for authorizing the Grafana provider to make changes to Amazon Managed Grafana | `string` | n/a | yes | | [managed\_grafana\_workspace\_id](#input\_managed\_grafana\_workspace\_id) | Amazon Managed Grafana Workspace ID | `string` | n/a | yes | diff --git a/examples/existing-cluster-with-base-and-infra/terraform.tfvars b/examples/existing-cluster-with-base-and-infra/terraform.tfvars deleted file mode 100644 index e0eaf56..0000000 --- a/examples/existing-cluster-with-base-and-infra/terraform.tfvars +++ /dev/null @@ -1,8 +0,0 @@ -# (mandatory) AWS Region where your resources will be located -aws_region = "" - -# (mandatory) EKS Cluster name -eks_cluster_id = "eks-cluster-with-vpc" - -# (optional) Leave it empty for a new workspace to be created -managed_prometheus_workspace_id = "" diff --git a/examples/existing-cluster-with-base-and-infra/variables.tf b/examples/existing-cluster-with-base-and-infra/variables.tf index 034d18e..3478fbc 100644 --- a/examples/existing-cluster-with-base-and-infra/variables.tf +++ b/examples/existing-cluster-with-base-and-infra/variables.tf @@ -1,6 +1,7 @@ variable "eks_cluster_id" { description = "Name of the EKS cluster" type = string + default = "eks-cluster-with-vpc" } variable "aws_region" {