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
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" | |
} |
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
peerings, err := getRegionPeerings(params) | |
for _, p := range peerings { | |
_, err = network.NewVirtualNetworkPeering(ctx, p.Region+"-to-"+p.Name+"-vnet", &network.VirtualNetworkPeeringArgs{ | |
Name: pulumi.StringPtr("to-" + p.Region + "-vnet-" + p.Name), | |
ResourceGroupName: pulumi.String("ctus-assets"), | |
VirtualNetworkName: pulumi.String(p.Region + "-vnet"), | |
RemoteVirtualNetwork: network.SubResourcePtrInput(&network.SubResourceArgs{ | |
Id: pulumi.StringPtr(fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s", p.SubscriptionID, p.Name, p.Region+"-vnet")), | |
}), |
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
resource "azurerm_resource_group" "rg" { | |
for_each = { | |
a_group = "eastus" | |
another_group = "westus2" | |
} | |
name = each.key | |
location = each.value | |
} |
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
name: Golang Lint | |
on: [pull_request] | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: golangci-lint |
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
name: Testing | |
on: [pull_request] | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: |
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
name: Testing | |
on: | |
- pull_request | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v2 |
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
name: "Docker Build" | |
on: | |
pull_request: | |
branches: | |
- "main" | |
jobs: | |
docker-build: | |
name: Docker Build | |
runs-on: ubuntu-latest |