Skip to content

Commit

Permalink
Fix api_management resource name (Azure#26)
Browse files Browse the repository at this point in the history
Fixes the api_management resource name to match how it is defined in the
azurerm provider (azurerm_api_management). Also fixes a typo.
  • Loading branch information
travisty- authored Aug 27, 2020
1 parent 00ccb41 commit 6a72b3e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ postgresql_server = {
| Name | Description |
|------|-------------|
| analysis\_services\_server | n/a |
| api\_managment\_service | n/a |
| api\_management | n/a |
| app\_configuration | n/a |
| application\_gateway | n/a |
| application\_security\_group | n/a |
Expand Down
4 changes: 2 additions & 2 deletions docs/defined_specs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ az = {
service_bus_topic = "sbt"
automation_account = "aa" // Not in the specs

// Managment and governance
// Management and governance
blueprint = "bp"
key_vault = "kv"
key_vault_key = "kvk"
Expand All @@ -100,4 +100,4 @@ az = {
//Migration
azure_migrate_project = "migr"
database_migration_service_instance = "dms"
}
}
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ locals {
scope = "resourceGroup"
regex = "^[a-z][a-z0-9]+$"
}
api_managment_service = {
api_management = {
name = substr(join("", compact([local.prefix_safe, "apim", local.suffix_safe])), 0, 50)
name_unique = substr(join("", compact([local.prefix_safe, "apim", local.suffix_unique_safe])), 0, 50)
dashes = false
Expand Down Expand Up @@ -2207,9 +2207,9 @@ locals {
valid_name = length(regexall(local.az.analysis_services_server.regex, local.az.analysis_services_server.name)) > 0 && length(local.az.analysis_services_server.name) > local.az.analysis_services_server.min_length
valid_name_unique = length(regexall(local.az.analysis_services_server.regex, local.az.analysis_services_server.name_unique)) > 0
}
api_managment_service = {
valid_name = length(regexall(local.az.api_managment_service.regex, local.az.api_managment_service.name)) > 0 && length(local.az.api_managment_service.name) > local.az.api_managment_service.min_length
valid_name_unique = length(regexall(local.az.api_managment_service.regex, local.az.api_managment_service.name_unique)) > 0
api_management = {
valid_name = length(regexall(local.az.api_management.regex, local.az.api_management.name)) > 0 && length(local.az.api_management.name) > local.az.api_management.min_length
valid_name_unique = length(regexall(local.az.api_management.regex, local.az.api_management.name_unique)) > 0
}
app_configuration = {
valid_name = length(regexall(local.az.app_configuration.regex, local.az.app_configuration.name)) > 0 && length(local.az.app_configuration.name) > local.az.app_configuration.min_length
Expand Down
4 changes: 2 additions & 2 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ output "analysis_services_server" {
value = local.az.analysis_services_server
}

output "api_managment_service" {
value = local.az.api_managment_service
output "api_management" {
value = local.az.api_management
}

output "app_configuration" {
Expand Down
2 changes: 1 addition & 1 deletion resourceDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dashes": false
},
{
"name": "api_managment_service",
"name": "api_management",
"length": {
"min": 1,
"max": 50
Expand Down

0 comments on commit 6a72b3e

Please sign in to comment.