# Static website hosted on Azure Storage This template deploys an [Azure Storage Account](https://www.terraform.io/docs/providers/azurerm/r/storage_account.html) with static website hosting enabled. As this feature is not natively supported throuhg the ARM SDK and hence Terraform, a local-provisioner step is used to enable it with the Azure CLI. ## Resources | Terraform Resource Type | Description | | - | - | | `azurerm_resource_group` | The resource group all resources are deployed into | | `azurerm_storage_account` | The storage account used to host the website | ## Variables | Name | Description | |-|-| | `name` | Name of the deployment | | `environment` | The depolyment environment name (used for postfixing resource names) | | `dns_prefix` | A prefix for globally-unique dns-based resources | | `location` | The Azure Region to deploy these resources in | ## Example ```bash > terraform plan Refreshing Terraform state in-memory prior to plan... The refreshed state will be used to calculate this plan, but will not be persisted to local or remote state storage. ------------------------------------------------------------------------ An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # azurerm_resource_group.default will be created + resource "azurerm_resource_group" "default" { + id = (known after apply) + location = "westus" + name = "demo-tfquickstart-dev-rg" + tags = (known after apply) } # azurerm_storage_account.default will be created + resource "azurerm_storage_account" "default" { + access_tier = (known after apply) + account_encryption_source = "Microsoft.Storage" + account_kind = "StorageV2" + account_replication_type = "LRS" + account_tier = "Standard" + account_type = (known after apply) + enable_advanced_threat_protection = false + enable_blob_encryption = true + enable_file_encryption = true + enable_https_traffic_only = true + id = (known after apply) + is_hns_enabled = false + location = "westus2" + name = "tfquickstartdemode" + primary_access_key = (sensitive value) + primary_blob_connection_string = (sensitive value) + primary_blob_endpoint = (known after apply) + primary_blob_host = (known after apply) + primary_connection_string = (sensitive value) + primary_dfs_endpoint = (known after apply) + primary_dfs_host = (known after apply) + primary_file_endpoint = (known after apply) + primary_file_host = (known after apply) + primary_location = (known after apply) + primary_queue_endpoint = (known after apply) + primary_queue_host = (known after apply) + primary_table_endpoint = (known after apply) + primary_table_host = (known after apply) + primary_web_endpoint = (known after apply) + primary_web_host = (known after apply) + resource_group_name = "demo-dev-rg" + secondary_access_key = (sensitive value) + secondary_blob_connection_string = (sensitive value) + secondary_blob_endpoint = (known after apply) + secondary_blob_host = (known after apply) + secondary_connection_string = (sensitive value) + secondary_dfs_endpoint = (known after apply) + secondary_dfs_host = (known after apply) + secondary_file_endpoint = (known after apply) + secondary_file_host = (known after apply) + secondary_location = (known after apply) + secondary_queue_endpoint = (known after apply) + secondary_queue_host = (known after apply) + secondary_table_endpoint = (known after apply) + secondary_table_host = (known after apply) + secondary_web_endpoint = (known after apply) + secondary_web_host = (known after apply) + tags = (known after apply) + identity { + principal_id = (known after apply) + tenant_id = (known after apply) + type = (known after apply) } + network_rules { + bypass = (known after apply) + default_action = (known after apply) + ip_rules = (known after apply) + virtual_network_subnet_ids = (known after apply) } + queue_properties { + cors_rule { + allowed_headers = (known after apply) + allowed_methods = (known after apply) + allowed_origins = (known after apply) + exposed_headers = (known after apply) + max_age_in_seconds = (known after apply) } + hour_metrics { + enabled = (known after apply) + include_apis = (known after apply) + retention_policy_days = (known after apply) + version = (known after apply) } + logging { + delete = (known after apply) + read = (known after apply) + retention_policy_days = (known after apply) + version = (known after apply) + write = (known after apply) } + minute_metrics { + enabled = (known after apply) + include_apis = (known after apply) + retention_policy_days = (known after apply) + version = (known after apply) } } } Plan: 2 to add, 0 to change, 0 to destroy. ------------------------------------------------------------------------ ```