Last active
March 14, 2021 23:59
-
-
Save lenardchristopher/2450a06c0d35bfe8b6ace154639b3417 to your computer and use it in GitHub Desktop.
Dynamic resource creation with Terraform and CosmosDb Configuration Store
This file contains hidden or 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
data "external" "clusters" { | |
program = ["python", "./cosmosdb_reader.py"] | |
query = { | |
cosmos_endpoint = var.endpoint | |
cosmos_key = var.primary_readonly_master_key | |
region = "centralus" | |
subscription_id = "00000000-0000-0000-0000-000000000000" | |
// CosmosDb query function | |
data_function = "get_region_peerings" | |
} | |
} | |
resource "azurerm_virtual_network_peering" "centralus_to_eastus" { | |
count = data.external.vnets.result.count | |
[...] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment