First commit
This commit is contained in:
12
infrastructure/modules/static_web_app/main.tf
Normal file
12
infrastructure/modules/static_web_app/main.tf
Normal file
@@ -0,0 +1,12 @@
|
||||
resource "azurerm_static_web_app" "static_web_app" {
|
||||
name = var.static_web_app_name
|
||||
resource_group_name = var.resource_group_name
|
||||
location = var.region
|
||||
}
|
||||
|
||||
resource "azurerm_static_web_app_custom_domain" "static_web_app_custom_domain" {
|
||||
count = var.custom_domain_name_count
|
||||
static_web_app_id = azurerm_static_web_app.static_web_app.id
|
||||
domain_name = "${var.subdomain_name}.${var.domain_name}"
|
||||
validation_type = "cname-delegation"
|
||||
}
|
||||
11
infrastructure/modules/static_web_app/outputs.tf
Normal file
11
infrastructure/modules/static_web_app/outputs.tf
Normal file
@@ -0,0 +1,11 @@
|
||||
output "id" {
|
||||
value = azurerm_static_web_app.static_web_app.id
|
||||
}
|
||||
|
||||
output "api_key" {
|
||||
value = azurerm_static_web_app.static_web_app.api_key
|
||||
}
|
||||
|
||||
output "default_host_name" {
|
||||
value = azurerm_static_web_app.static_web_app.default_host_name
|
||||
}
|
||||
24
infrastructure/modules/static_web_app/variables.tf
Normal file
24
infrastructure/modules/static_web_app/variables.tf
Normal file
@@ -0,0 +1,24 @@
|
||||
variable "region" {
|
||||
|
||||
}
|
||||
|
||||
variable "resource_group_name" {
|
||||
|
||||
}
|
||||
|
||||
variable "static_web_app_name" {
|
||||
|
||||
}
|
||||
|
||||
variable "custom_domain_name_count" {
|
||||
|
||||
}
|
||||
|
||||
variable "domain_name" {
|
||||
|
||||
}
|
||||
|
||||
variable "subdomain_name" {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user