forked from Ayanfe19/apim-terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
54 lines (44 loc) · 1.2 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
44
45
46
47
48
49
50
51
52
53
54
provider "azurerm" {
version = "=2.98.0"
features {}
}
variable "resource_group_name" {
type = string
}
variable "apim_name" {
type = string
}
variable "location_name" {
type = string
}
variable "publisher_name" {
type = string
}
variable "publisher_email" {
type = string
}
resource "azurerm_resource_group" "example" {
name = var.resource_group_name
location = var.location_name
}
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 = var.publisher_name
publisher_email = var.publisher_email
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")
}
}