File tree Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 1
- resource "azurerm_role_assignment" "role_assignment_storage_function " {
1
+ resource "azurerm_role_assignment" "function_role_assignment_storage " {
2
2
scope = azurerm_storage_account. storage . id
3
3
role_definition_name = " Storage Blob Data Owner"
4
4
principal_id = azapi_resource. function . identity [0 ]. principal_id
5
5
}
6
+
7
+ resource "azurerm_role_assignment" "function_role_assignment_key_vault" {
8
+ scope = azurerm_key_vault. key_vault . id
9
+ role_definition_name = " Key Vault Secrets User"
10
+ principal_id = azapi_resource. function . identity [0 ]. principal_id
11
+ }
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ variable "tags" {
33
33
}
34
34
35
35
variable "vnet_id" {
36
- description = " Specifies the resource ID of the Vnet used for the Data Landing Zone "
36
+ description = " Specifies the resource ID of the Vnet used for the Azure Function. "
37
37
type = string
38
38
sensitive = false
39
39
validation {
@@ -43,7 +43,7 @@ variable "vnet_id" {
43
43
}
44
44
45
45
variable "nsg_id" {
46
- description = " Specifies the resource ID of the default network security group for the Data Landing Zone "
46
+ description = " Specifies the resource ID of the default network security group for the Azure Function. "
47
47
type = string
48
48
sensitive = false
49
49
validation {
@@ -53,7 +53,7 @@ variable "nsg_id" {
53
53
}
54
54
55
55
variable "route_table_id" {
56
- description = " Specifies the resource ID of the default route table for the Data Landing Zone "
56
+ description = " Specifies the resource ID of the default route table for the Azure Function. "
57
57
type = string
58
58
sensitive = false
59
59
validation {
@@ -62,6 +62,17 @@ variable "route_table_id" {
62
62
}
63
63
}
64
64
65
+ variable "python_version" {
66
+ description = " Specifies the python version of the Azure Function."
67
+ type = string
68
+ sensitive = false
69
+ default = " 3.10"
70
+ validation {
71
+ condition = contains ([" 3.9" , " 3.10" ], var. python_version )
72
+ error_message = " Please specify a valid Python version."
73
+ }
74
+ }
75
+
65
76
variable "private_dns_zone_id_blob" {
66
77
description = " Specifies the resource ID of the private DNS zone for Azure Storage blob endpoints. Not required if DNS A-records get created via Azue Policy."
67
78
type = string
You can’t perform that action at this time.
0 commit comments