Skip to content

Commit

Permalink
docs(Terraform): add more details around variables (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld authored Nov 8, 2022
2 parents 0f9df46 + 85c8e19 commit 08819ab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"python.testing.pytestEnabled": true,
"[terraform]": {
"editor.defaultFormatter": "hashicorp.terraform"
},
"[terraform-vars]": {
"editor.defaultFormatter": "hashicorp.terraform"
}
}
7 changes: 1 addition & 6 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ Terraform is [`plan`](https://www.terraform.io/cli/commands/plan)'d when code is
```

1. Outside the [dev container](https://docs.calitp.org/eligibility-server/getting-started/), navigate to the `terraform/` directory.
1. Create a `terraform.tfvars` file and specify the [variables](variables.tf):

```hcl
VELOCITY_ETL_SERVICE_PRINCIPAL_ID = "..."
```

1. Create a [`terraform.tfvars` file](https://developer.hashicorp.com/terraform/language/values/variables#variable-definitions-tfvars-files) and specify the [variables](variables.tf).
1. [Initialize Terraform.](https://www.terraform.io/cli/commands/init) You can also use this script later to switch between [environments](#environments).

```sh
Expand Down
6 changes: 5 additions & 1 deletion terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# needs to be uppercase "because Azure DevOps will always transform pipeline variables to uppercase environment variables"
# https://gaunacode.com/terraform-input-variables-using-azure-devops

variable "VELOCITY_ETL_SERVICE_PRINCIPAL_ID" {
description = "Object ID from the registered application for the Velocity server ETL uploading: https://cloudsight.zendesk.com/hc/en-us/articles/360016785598-Azure-finding-your-service-principal-object-ID"
type = string
}

variable "IP_ADDRESS_WHITELIST" {
description = "List of IP addresses allowed to connect to the app service."
description = "List of IP addresses allowed to connect to the app service, in CIDR notation: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_web_app#ip_address. By default, all IP addresses are allowed."
type = list(string)
default = []
}

0 comments on commit 08819ab

Please sign in to comment.