Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*
.terraform
.terraform.lock.hcl
.terraform.tfstate.lock.info

**/.idea
**/*.iml

# Go mod and sum files
go.mod
go.sum
# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*
.terraform
.terraform.lock.hcl
.terraform.tfstate.lock.info
21 changes: 21 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
provider "azurerm" {
features {}

client_id = var.client_id
client_secret = var.client_secret
subscription_id = var.subscription_id
tenant_id = var.tenant_id
}

data "azurerm_resource_group" "existing" {
name = "experiment32"
}

resource "azurerm_api_management" "example" {
name = "my-api-management"
location = data.azurerm_resource_group.existing.location
resource_group_name = "experiment32"
publisher_name = "My Company"
publisher_email = "contact@company.com"
sku_name = "Developer_1"

identity {
type = "SystemAssigned"
}
}
17 changes: 17 additions & 0 deletions terraform.tfstate
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": 4,
"terraform_version": "1.4.6",
"serial": 1,
"lineage": "e01cd7b0-7802-c464-5743-41db12f8ea73",
"outputs": {},
"resources": [
{
"mode": "managed",
"type": "azurerm_api_management",
"name": "example",
"provider": "provider[\"registry.terraform.io/hashicorp/azurerm\"]",
"instances": []
}
],
"check_results": null
}
4 changes: 4 additions & 0 deletions terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
client_secret="sek8Q~dDXuChQRvBdqigMjcaiLgP6dRzgFn55bNx"
client_id="c1cd6156-8e0b-4ed1-b2fa-d3e7fae3919a"
tenant_id="1e8647b3-1bcf-4d17-9721-28853cbe413f"
subscription_id="77b45418-7fb5-4763-bc5c-fa8dccc10889"
15 changes: 15 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
variable "client_id" {
description = "Azure client ID"
}

variable "client_secret" {
description = "Azure client secret"
}

variable "subscription_id" {
description = "Azure subscription ID"
}

variable "tenant_id" {
description = "Azure tenant ID"
}