Skip to content

Commit c0e67c7

Browse files
committed
Fixed terraform validate error
1 parent 87b3a21 commit c0e67c7

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

main.tf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
provider "azurerm" {
2+
features {}
3+
}
4+
5+
terraform {
6+
required_providers {
7+
azurerm = "~> 2.0"
8+
}
9+
}
10+
111
resource "azurerm_storage_account" "storage" {
212
name = var.storage_account_name
313
resource_group_name = var.resource_group_name
@@ -34,7 +44,7 @@ resource "azurerm_function_app" "function" {
3444
location = var.location
3545
app_service_plan_id = azurerm_app_service_plan.serverfarm.id
3646
storage_account_name = azurerm_storage_account.storage.name
37-
storage_account_access_key = azurerm_storage_account.storage.primaryaccess_key
47+
storage_account_access_key = azurerm_storage_account.storage.primary_access_key
3848
version = "~3"
3949
https_only = true
4050
client_affinity_enabled = false

outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
output "principal_id" {
2-
value = azurerm_function_app.function.identity.principal_id
2+
value = azurerm_function_app.function.identity[0].principal_id
33
description = "Created Managed Identity Principal ID"
44
}
55

66
output "tenant_id" {
7-
value = azurerm_function_app.function.identity.tenant_id
7+
value = azurerm_function_app.function.identity[0].tenant_id
88
description = "Created Managed Identity Tenant ID"
99
}

variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ variable "app_insights_name" {
1818
description = "The name of the Application Insights to create."
1919
}
2020

21-
variable "location" {
21+
variable "resource_group_name" {
2222
type = string
23-
description = "Azure region to create resources."
23+
description = "Resource group name to be added."
2424
}
2525

26-
variable "resource_group_name" {
26+
variable "location" {
2727
type = string
28-
description = "Resource group name to be added."
28+
description = "Azure region to create resources."
2929
}
3030

3131
variable "vault_uri" {

0 commit comments

Comments
 (0)