lib/templates/ruby/project/config/terraform/backend.rb in terraspace_plugin_azurerm-0.5.1 vs lib/templates/ruby/project/config/terraform/backend.rb in terraspace_plugin_azurerm-0.6.0
- old
+ new
@@ -1,8 +1,9 @@
# SUBSCRIPTION_HASH is a short 4-char consistent hash of the longer subscription id.
+# LOCATION_HASH is a short 4-char consistent hash of the longer location.
# This is useful because azure storage account names are not allowed special characters and are limited to 24 chars.
backend("azurerm",
- resource_group_name: "terraform-resources-:LOCATION",
- storage_account_name: "ts:SUBSCRIPTION_HASH:LOCATION:ENV",
+ resource_group_name: ":APP-:ENV-:LOCATION",
+ storage_account_name: "ts:APP_HASH:SUBSCRIPTION_HASH:LOCATION_HASH:ENV",
container_name: "terraform-state",
- key: ":LOCATION/:ENV/:BUILD_DIR/terraform.tfstate",
+ key: ":TYPE_DIR/:APP/:ROLE/:MOD_NAME/:ENV/:EXTRA/:LOCATION/terraform.tfstate",
)