-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
39 lines (34 loc) · 1.15 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# create azure resource group
resource "azurerm_resource_group" "rg" {
name = "my-rg"
location = "westus"
}
# create azure storage account
resource "azurerm_storage_account" "sa" {
name = "mystorageaccount"
resource_group_name = "${azurerm_resource_group.rg.name}"
location = "${azurerm_resource_group.rg.location}"
account_tier = "Standard"
account_replication_type = "LRS"
}
# create an api management resource
resource "azurerm_api_management" "apim" {
name = "my-apim"
location = "${azurerm_resource_group.rg.location}"
resource_group_name = "${azurerm_resource_group.rg.name}"
publisher_name = "My Company"
publisher_email = ""
sku_name = "Developer_1"
identity {
type = "SystemAssigned"
}
}
# create an api management product
resource "azurerm_api_management_product" "product" {
name = "my-product"
resource_group_name = "${azurerm_resource_group.rg.name}"
api_management_name = "${azurerm_api_management.apim.name}"
approval_required = false
subscriptions_limit = 1000
state = "published"
}