-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
31aa007
commit 56c4f34
Showing
14 changed files
with
432 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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 @@ | ||
[ | ||
{ | ||
"id": "{{ output.resource_id.value }}", | ||
"name": "{{ resourceName }}", | ||
"region": "{{ output.region.value }}", | ||
"resource_group": "{{ resourceName }}", | ||
"subscription_id": "{{ output.subscription_id.value }}", | ||
"tags": { | ||
"name": "{{ resourceName }}" | ||
}, | ||
"type": "Microsoft.Network/loadBalancers" | ||
} | ||
] |
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,3 @@ | ||
select name, id, type, region, resource_group, subscription_id, tags | ||
from azure.azure_lb | ||
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[ | ||
{ | ||
"id": "{{ output.resource_id.value }}", | ||
"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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
select name, id | ||
from azure.azure_lb | ||
where 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
select name, id, type, region | ||
from azure.azure_lb | ||
where name = 'dummy-test{{ 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[ | ||
{ | ||
"akas": [ | ||
"{{ output.resource_aka.value }}", | ||
"{{ output.resource_aka_lower.value }}" | ||
], | ||
"name": "{{ resourceName }}", | ||
"tags": { | ||
"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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
select name, akas, tags, title | ||
from azure.azure_lb | ||
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
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,65 @@ | ||
variable "resource_name" { | ||
type = string | ||
default = "turbot-test-20200125-create-update" | ||
description = "Name of the resource used throughout the test." | ||
} | ||
|
||
variable "azure_environment" { | ||
type = string | ||
default = "public" | ||
description = "Azure environment used for the test." | ||
} | ||
|
||
variable "azure_subscription" { | ||
type = string | ||
default = "3510ae4d-530b-497d-8f30-53c0616fc6c1" | ||
description = "Azure environment used for the test." | ||
} | ||
|
||
provider "azurerm" { | ||
# Cannot be passed as a variable | ||
version = "=1.36.0" | ||
environment = var.azure_environment | ||
subscription_id = var.azure_subscription | ||
} | ||
|
||
data "azuread_client_config" "current" {} | ||
|
||
resource "azurerm_resource_group" "named_test_resource" { | ||
name = var.resource_name | ||
location = "West Europe" | ||
} | ||
|
||
resource "azurerm_lb" "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 | ||
tags = { | ||
name = var.resource_name | ||
} | ||
} | ||
|
||
output "region" { | ||
value = azurerm_resource_group.named_test_resource.location | ||
} | ||
|
||
output "resource_aka" { | ||
depends_on = [azurerm_lb.named_test_resource] | ||
value = "azure://${azurerm_lb.named_test_resource.id}" | ||
} | ||
|
||
output "resource_aka_lower" { | ||
value = "azure://${lower(azurerm_lb.named_test_resource.id)}" | ||
} | ||
|
||
output "resource_name" { | ||
value = var.resource_name | ||
} | ||
|
||
output "resource_id" { | ||
value = azurerm_lb.named_test_resource.id | ||
} | ||
|
||
output "subscription_id" { | ||
value = var.azure_subscription | ||
} |
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
Oops, something went wrong.