generated from tothenew/terraform-aws-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from AnkitToTheNew/ankit
API Management Terraform Module
- Loading branch information
Showing
16 changed files
with
1,051 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.terraform | ||
main.tf | ||
terraform.tfvars | ||
.terraform.lock.hcl | ||
!examples/**/main.tf | ||
!examples/**/terraform.tfvars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
data "azurecaf_name" "apim" { | ||
name = var.stack | ||
resource_type = "azurerm_api_management" | ||
prefixes = var.name_prefix == "" ? null : [local.name_prefix] | ||
suffixes = compact([var.client_name, var.environment, local.name_suffix, var.use_caf_naming ? "" : "apim"]) | ||
use_slug = var.use_caf_naming | ||
clean_input = true | ||
separator = "-" | ||
} | ||
|
||
data "azurecaf_name" "apim_nsg_rule" { | ||
name = var.stack | ||
resource_type = "azurerm_network_security_rule" | ||
prefixes = var.name_prefix == "" ? null : [local.name_prefix] | ||
suffixes = compact([var.client_name, var.environment, local.name_suffix, var.use_caf_naming ? "" : "apim-nsg"]) | ||
use_slug = var.use_caf_naming | ||
clean_input = true | ||
separator = "-" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
locals { | ||
default_tags = var.default_tags_enabled ? { | ||
env = var.environment | ||
stack = var.stack | ||
} : {} | ||
|
||
# Naming locals/constants | ||
name_prefix = lower(var.name_prefix) | ||
name_suffix = lower(var.name_suffix) | ||
|
||
apim_name = coalesce(var.custom_name, data.azurecaf_name.apim.result) | ||
nsg_rule_name = coalesce(var.custom_management_rule_name, data.azurecaf_name.apim_nsg_rule.result) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
output "api_management_name" { | ||
description = "The name of the API Management Service" | ||
value = azurerm_api_management.apim.name | ||
} | ||
|
||
output "api_management_id" { | ||
description = "The ID of the API Management Service" | ||
value = azurerm_api_management.apim.id | ||
} | ||
|
||
output "api_management_additional_location" { | ||
description = "Map listing gateway_regional_url and public_ip_addresses associated" | ||
value = azurerm_api_management.apim.additional_location | ||
} | ||
|
||
output "api_management_gateway_url" { | ||
description = "The URL of the Gateway for the API Management Service" | ||
value = azurerm_api_management.apim.gateway_url | ||
} | ||
|
||
output "api_management_gateway_regional_url" { | ||
description = "The Region URL for the Gateway of the API Management Service" | ||
value = azurerm_api_management.apim.gateway_regional_url | ||
} | ||
|
||
output "api_management_management_api_url" { | ||
description = "The URL for the Management API associated with this API Management service" | ||
value = azurerm_api_management.apim.management_api_url | ||
} | ||
|
||
output "api_management_portal_url" { | ||
description = "The URL for the Publisher Portal associated with this API Management service" | ||
value = azurerm_api_management.apim.portal_url | ||
} | ||
|
||
output "api_management_public_ip_addresses" { | ||
description = "The Public IP addresses of the API Management Service" | ||
value = azurerm_api_management.apim.public_ip_addresses | ||
} | ||
|
||
output "api_management_private_ip_addresses" { | ||
description = "The Private IP addresses of the API Management Service" | ||
value = azurerm_api_management.apim.private_ip_addresses | ||
} | ||
|
||
output "api_management_scm_url" { | ||
description = "The URL for the SCM Endpoint associated with this API Management service" | ||
value = azurerm_api_management.apim.scm_url | ||
} | ||
|
||
output "api_management_identity" { | ||
description = "The identity of the API Management" | ||
value = azurerm_api_management.apim.identity | ||
} |
Oops, something went wrong.