Closed thekaveman closed 10 months ago
Backend configuration in main.tf
cannot use variables. Need to figure out how to specify a different backend config per agency (multiple main.tf
files in subdirectories per-agency?)
Backend configuration in
main.tf
cannot use variables. Need to figure out how to specify a different backend config per agency (multiplemain.tf
files in subdirectories per-agency?)
We realized that the pipeline gets its backend resource group and storage account config through the TerraformTask configuration. For local development, we can get our backend config through command-line options.
Therefore, we were able to remove resource group and storage account from being specified in the backend
block; see https://github.com/cal-itp/eligibility-server/pull/343/commits/3803ffa222bfa0be8585eeebdc40ee40c13fc402 and https://github.com/cal-itp/eligibility-server/pull/343/commits/8af3d3252eab1b35e78375e94fc44a7760089157
The following Terraform config files reference MST Courtesy Cards, but should use a variable instead, e.g.
${local.agency_card_name}
So we could have something like:
app_service.tf
azurerm_linux_web_app.main.name
environment.tf
azurerm_resource_group.main.name
front_door.tf
azurerm_cdn_frontdoor_endpoint.main.name
main.tf
terraform.azurerm.resource_group_name
terraform.azurerm.storage_account_name
roles.tf
azurerm_role_assignment.velocity_etl
(make this name more generic?agency_card_data_etl
?)azurerm_role_assignment.velocity_etl.principal_id
[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringLike 'velocity.csv'
storage.tf
azurerm_storage_account.main.name
uptime.tf
healthcheck.name
variables.tf
VELOCITY_ETL_APP_OBJECT_ID
(need a more generic name for variable)init.sh
init
with