-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.tf
43 lines (36 loc) · 1.14 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
40
41
42
43
provider "azurerm" {
# whilst the `version` attribute is optional, we recommend pinning to a given version of the Provider
version = "=2.20.0"
features {}
}
variable "resource_group_name" {
type = string
}
variable "apim_name" {
type = string
}
resource "azurerm_resource_group" "example" {
name = var.resource_group_name
location = "West Europe"
}
resource "azurerm_api_management" "example" {
name = var.apim_name
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
publisher_name = "My Company"
publisher_email = "[email protected]"
sku_name = "Developer_1"
}
resource "azurerm_api_management_api" "example" {
name = "example-api"
resource_group_name = azurerm_resource_group.example.name
api_management_name = azurerm_api_management.example.name
revision = "1"
display_name = "Example API"
path = "example"
protocols = ["https"]
import {
content_format = "swagger-json"
content_value = file("${path.module}/conference-api.json")
}
}