Skip to content

Commit 87c9748

Browse files
Merge pull request #9 from Indu-Sah-Foundation/test
static_web_app + go version to 19
2 parents 7f0f0df + 6965a48 commit 87c9748

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

main.tf

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ resource "azurerm_linux_web_app" "backend" {
3232

3333
site_config {
3434
application_stack {
35-
go_version = "1.21"
35+
go_version = "1.19"
3636
}
3737
cors {
3838
allowed_origins = ["*"]
@@ -45,16 +45,10 @@ resource "azurerm_linux_web_app" "backend" {
4545
}
4646
}
4747

48-
resource "azurerm_static_site" "frontend" {
48+
resource "azurerm_static_web_app" "frontend" {
4949
name = "${var.app_name}-react-frontend"
5050
resource_group_name = azurerm_resource_group.rg.name
5151
location = var.location
5252
sku_tier = "Free"
5353
sku_size = "Free"
54-
}
55-
56-
resource "azurerm_static_site_custom_domain" "frontend_env" {
57-
static_site_id = azurerm_static_site.frontend.id
58-
domain_name = azurerm_static_site.frontend.default_host_name
59-
validation_type = "cname-delegation"
6054
}

outputs.tf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
output "frontend_url" {
2-
value = "https://${azurerm_static_site.frontend.default_host_name}"
2+
value = "https://${azurerm_static_web_app.frontend.default_host_name}"
33
description = "React app URL"
44
}
55

@@ -14,10 +14,16 @@ output "backend_api_url_for_react" {
1414
}
1515

1616
output "static_web_app_name" {
17-
value = azurerm_static_site.frontend.name
17+
value = azurerm_static_web_app.frontend.name
1818
description = "For deployment token"
1919
}
2020

21+
output "static_web_app_api_key" {
22+
value = azurerm_static_web_app.frontend.api_key
23+
description = "Deployment token for Static Web App"
24+
sensitive = true
25+
}
26+
2127
output "app_service_name" {
2228
value = azurerm_linux_web_app.backend.name
2329
description = "For publish profile"

0 commit comments

Comments
 (0)