-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add developer_portal_url, disable_gateway, enable_client_certificate,…
… api_version_constraint, certificates, custom_properties, identity_user_assigned_identities, virtual_network_type, restore, scm_url, zones and diagnostic_settings columns to the table azure_api_management. Closes #292 (#336)
- Loading branch information
1 parent
e00484d
commit 4f770a0
Showing
12 changed files
with
212 additions
and
112 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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[ | ||
{ | ||
"id": "{{ output.resource_id.value }}", | ||
"name": "{{resourceName}}", | ||
"name": "{{ resourceName }}", | ||
"publisher_email": "[email protected]", | ||
"publisher_name": "TurbotHQ", | ||
"region": "{{ output.location.value }}", | ||
"region": "{{ output.region.value }}", | ||
"sku_capacity": 1, | ||
"sku_name": "Developer_1", | ||
"sku_name": "Developer", | ||
"type": "Microsoft.ApiManagement/service" | ||
} | ||
] | ||
] |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
select name, id, region, type, publisher_email, publisher_name, sku_capacity, sku_name | ||
from azure.azure_api_management | ||
where name = '{{resourceName}}' and resource_group = '{{ output.resource_group_name.value }}' | ||
where name = '{{ resourceName }}' and resource_group = '{{ resourceName }}'; |
4 changes: 2 additions & 2 deletions
4
azure-test/tests/azure_api_management/test-hydrate-expected.json
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[ | ||
{ | ||
"name": "{{resourceName}}", | ||
"name": "{{ resourceName }}", | ||
"sku_name": "Developer" | ||
} | ||
] | ||
] |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
select name, sku_name | ||
from azure.azure_api_management | ||
where name = '{{resourceName}}' and resource_group = '{{ output.resource_group_name.value }}' | ||
where name = '{{ resourceName }}' and resource_group = '{{ resourceName }}'; |
4 changes: 2 additions & 2 deletions
4
azure-test/tests/azure_api_management/test-list-expected.json
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[ | ||
{ | ||
"id": "{{ output.resource_id.value }}", | ||
"name": "{{resourceName}}" | ||
"name": "{{ resourceName }}" | ||
} | ||
] | ||
] |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
select name, id | ||
from azure.azure_api_management | ||
where name = '{{resourceName}}' | ||
where id = '{{ output.resource_id.value }}'; |
2 changes: 1 addition & 1 deletion
2
azure-test/tests/azure_api_management/test-not-found-expected.json
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 |
---|---|---|
@@ -1 +1 @@ | ||
null | ||
null |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
select name, id, region, type, publisher_email, publisher_name, sku_capacity | ||
from azure.azure_api_management | ||
where name = '{{resourceName}}' and resource_group = 'dummy-{{resourceName}}' | ||
where name = '{{ resourceName }}' and resource_group = 'dummy-{{ resourceName }}'; |
9 changes: 3 additions & 6 deletions
9
azure-test/tests/azure_api_management/test-turbot-expected.json
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 |
---|---|---|
@@ -1,13 +1,10 @@ | ||
[ | ||
{ | ||
"akas": [ | ||
"{{output.resource_aka.value }}", | ||
"{{ output.resource_aka.value }}", | ||
"{{ output.resource_aka_lower.value }}" | ||
], | ||
"name": "{{resourceName}}", | ||
"tags": { | ||
"name": "{{resourceName}}" | ||
}, | ||
"title": "{{resourceName}}" | ||
"name": "{{ resourceName }}", | ||
"title": "{{ resourceName }}" | ||
} | ||
] |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
select name, akas, tags, title | ||
select name, akas, title | ||
from azure.azure_api_management | ||
where name = '{{resourceName}}' and resource_group = '{{ output.resource_group_name.value }}' | ||
where name = '{{ resourceName }}' and resource_group = '{{ resourceName }}'; |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
variable "resource_name" { | ||
type = string | ||
default = "turbot-test-20200125-create-update" | ||
|
@@ -17,80 +16,61 @@ variable "azure_subscription" { | |
description = "Azure subscription used for the test." | ||
} | ||
|
||
variable "azure_resource_group" { | ||
type = string | ||
default = "integration_test_rg" | ||
description = "Name of the resource group used throughout the test." | ||
} | ||
|
||
resource "azurerm_resource_group" "named_test_resource" { | ||
name = var.resource_name | ||
location = "West US" | ||
terraform { | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = "=2.77.0" | ||
} | ||
} | ||
} | ||
|
||
provider "azurerm" { | ||
# Cannot be passed as a variable | ||
version = "=1.36.0" | ||
features {} | ||
environment = var.azure_environment | ||
subscription_id = var.azure_subscription | ||
} | ||
|
||
data "azurerm_client_config" "current" {} | ||
|
||
data "null_data_source" "resource" { | ||
inputs = { | ||
scope = "azure:///subscriptions/${data.azurerm_client_config.current.subscription_id}" | ||
} | ||
resource "azurerm_resource_group" "named_test_resource" { | ||
name = var.resource_name | ||
location = "West Europe" | ||
} | ||
|
||
resource "azurerm_api_management" "named_test_resource" { | ||
name = var.resource_name | ||
location = azurerm_resource_group.named_test_resource.location | ||
resource_group_name = azurerm_resource_group.named_test_resource.name | ||
publisher_name = "TurbotHQ" | ||
publisher_email = "[email protected]" | ||
|
||
sku_name = "Developer_1" | ||
name = var.resource_name | ||
location = azurerm_resource_group.named_test_resource.location | ||
resource_group_name = azurerm_resource_group.named_test_resource.name | ||
publisher_name = "TurbotHQ" | ||
publisher_email = "[email protected]" | ||
|
||
sku_name = "Developer_1" | ||
} | ||
|
||
policy { | ||
xml_content = <<XML | ||
<policies> | ||
<inbound /> | ||
<backend /> | ||
<outbound /> | ||
<on-error /> | ||
</policies> | ||
XML | ||
} | ||
tags = { | ||
name = var.resource_name | ||
} | ||
output "region" { | ||
depends_on = [azurerm_api_management.named_test_resource] | ||
value = azurerm_resource_group.named_test_resource.location | ||
} | ||
|
||
output "resource_aka" { | ||
value = "azure://${azurerm_api_management.named_test_resource.id}" | ||
depends_on = [azurerm_api_management.named_test_resource] | ||
value = "azure://${azurerm_api_management.named_test_resource.id}" | ||
} | ||
|
||
output "resource_aka_lower" { | ||
value = "azure://${lower(azurerm_api_management.named_test_resource.id)}" | ||
depends_on = [azurerm_api_management.named_test_resource] | ||
value = "azure://${lower(azurerm_api_management.named_test_resource.id)}" | ||
} | ||
|
||
output "resource_name" { | ||
value = var.resource_name | ||
} | ||
|
||
output "resource_id" { | ||
value = azurerm_api_management.named_test_resource.id | ||
} | ||
|
||
output "location" { | ||
value = azurerm_resource_group.named_test_resource.location | ||
depends_on = [azurerm_api_management.named_test_resource] | ||
value = azurerm_api_management.named_test_resource.id | ||
} | ||
|
||
output "subscription_id" { | ||
value = var.azure_subscription | ||
} | ||
|
||
output "resource_group_name" { | ||
value = var.azure_resource_group | ||
} |
Oops, something went wrong.