зеркало из https://github.com/microsoft/AzureTRE.git
Terraform null resources to terraform_data (#3429)
TF null resources to tf_data, new provider ver
This commit is contained in:
Родитель
a390aa3c8a
Коммит
b4831eb19e
|
@ -2,22 +2,22 @@
|
|||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/hashicorp/azurerm" {
|
||||
version = "3.47.0"
|
||||
constraints = ">= 3.8.0, >= 3.16.0, 3.47.0"
|
||||
version = "3.51.0"
|
||||
constraints = ">= 3.8.0, >= 3.16.0, 3.51.0"
|
||||
hashes = [
|
||||
"h1:gWdjrOUCdfRB5VrQ0qxJI/coNh5chWw9884qM/nTg0E=",
|
||||
"zh:099ffaec3ef0ef45a23aebd851fdf49a279f872632dd2e72fa3cb897621511ac",
|
||||
"zh:0a2c33eff74c8934a371cff9647edc59a35cd2810d63613e5de4f6f2e43ae014",
|
||||
"zh:0ac4934c8ebff2cdb5aba2728693ba8e2143f7a16f51dadaff5847a442d535b3",
|
||||
"zh:125d2e039796ccf50f08e254be6f6258c28739fe28083c8e9fcb3952084bebb5",
|
||||
"zh:39de12f00902dbe42a07b75687b9f4c2f141874bd8c0d544b02f23991e295f66",
|
||||
"zh:584241a1dbee15d09007cfba5a341d0ae05722c194f51a67e01e4f6258dadc5e",
|
||||
"zh:a0001c265faa25e3b3595fd530891cb08a01108cecea9b84289420a83e3d57dc",
|
||||
"zh:c636316dc16226754b7c340fe0ad16fb1b2d9d4530303e9179be7205568cf40f",
|
||||
"zh:ce6e92a57a5f277f9ccab2a119f939faa28ada04eb2cc9d3f2d2c70dc19a1a84",
|
||||
"zh:cfde69b8c48edda6ac232d3afa676cfd9fa60515e43d764666a657b190b7ed71",
|
||||
"h1:X13zyweEi+honSpCdijEJBawbG6m1NmGyWDccICIKXs=",
|
||||
"zh:045a56f984882b8cf111301550e14a51346c817ec0b3d6dc752f7533585ed99b",
|
||||
"zh:102fa2fb9213f20c2834b7abb51d44f1c766bb28ad4f14c98d2c149faba0a911",
|
||||
"zh:173e38d128bf559b4a3e4bf5511974ab87951ffad9460f769067f62edc66acc7",
|
||||
"zh:22b7f74a6bf86fa4f735783331335b9c4783d5437c672a7d2579cedea8463e3b",
|
||||
"zh:3e37e83a5f39f73fa3b310162ef9fc58449445aaeb2ddad66404251ceb6908a5",
|
||||
"zh:6609b1c63ea9466bea599f6e1e32573a13889db6be89dd068c0eb114f7de50d5",
|
||||
"zh:6a2cc4ab06a467369f03c4e1fb1eeb23f0ea8a98fb1c0651284fe45ca3d5b02f",
|
||||
"zh:91885a417d4fd1cdc81b64d26330dacf608ef2f9d272b8f7073d93e71d6bccef",
|
||||
"zh:96d1879e52f399f3c813bcf36c7ceee72273a3e020077d09b03f6b7fdef4430c",
|
||||
"zh:dcdae19688d83dbf5dbc4c75d4c5f2d6d8abeb4fddc404c20880f9f3fa22c3ed",
|
||||
"zh:e2e11ffae353f43f4bf4bb88fa386fb214b8dd4aebfe7665b3142484652f9651",
|
||||
"zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c",
|
||||
"zh:fc1269b2f4d27cd2d14cd970e5b5066adf68a3b267f21d57edc36b8ef6dba82f",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -61,26 +61,6 @@ provider "registry.terraform.io/hashicorp/local" {
|
|||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/null" {
|
||||
version = "3.2.1"
|
||||
constraints = ">= 3.0.0"
|
||||
hashes = [
|
||||
"h1:FbGfc+muBsC17Ohy5g806iuI1hQc4SIexpYCrQHQd8w=",
|
||||
"zh:58ed64389620cc7b82f01332e27723856422820cfd302e304b5f6c3436fb9840",
|
||||
"zh:62a5cc82c3b2ddef7ef3a6f2fedb7b9b3deff4ab7b414938b08e51d6e8be87cb",
|
||||
"zh:63cff4de03af983175a7e37e52d4bd89d990be256b16b5c7f919aff5ad485aa5",
|
||||
"zh:74cb22c6700e48486b7cabefa10b33b801dfcab56f1a6ac9b6624531f3d36ea3",
|
||||
"zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3",
|
||||
"zh:79e553aff77f1cfa9012a2218b8238dd672ea5e1b2924775ac9ac24d2a75c238",
|
||||
"zh:a1e06ddda0b5ac48f7e7c7d59e1ab5a4073bbcf876c73c0299e4610ed53859dc",
|
||||
"zh:c37a97090f1a82222925d45d84483b2aa702ef7ab66532af6cbcfb567818b970",
|
||||
"zh:e4453fbebf90c53ca3323a92e7ca0f9961427d2f0ce0d2b65523cc04d5d999c2",
|
||||
"zh:e80a746921946d8b6761e77305b752ad188da60688cfd2059322875d363be5f5",
|
||||
"zh:fbdb892d9822ed0e4cb60f2fedbdbb556e4da0d88d3b942ae963ed6ff091e48f",
|
||||
"zh:fca01a623d90d0cad0843102f9b8b9fe0d3ff8244593bd817f126582b52dd694",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/random" {
|
||||
version = "3.4.3"
|
||||
constraints = ">= 3.0.0, ~> 3.4.0"
|
||||
|
|
|
@ -43,13 +43,11 @@ resource "azurerm_application_gateway" "agw" {
|
|||
subnet_id = var.app_gw_subnet
|
||||
}
|
||||
|
||||
# HTTP Port
|
||||
frontend_port {
|
||||
name = local.insecure_frontend_port_name
|
||||
port = 80
|
||||
}
|
||||
|
||||
# HTTPS Port
|
||||
frontend_port {
|
||||
name = local.secure_frontend_port_name
|
||||
port = 443
|
||||
|
@ -160,7 +158,7 @@ resource "azurerm_application_gateway" "agw" {
|
|||
|
||||
path_rule {
|
||||
name = "api"
|
||||
paths = ["/api/*", "/api/docs", "/openapi.json", "/api/docs/oauth2-redirect"]
|
||||
paths = ["/api/*", "/openapi.json"]
|
||||
backend_address_pool_name = local.api_backend_pool_name
|
||||
backend_http_settings_name = local.api_http_setting_name
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ terraform {
|
|||
required_providers {
|
||||
azurerm = {
|
||||
source = "hashicorp/azurerm"
|
||||
version = "=3.47.0"
|
||||
version = "=3.51.0"
|
||||
}
|
||||
random = {
|
||||
source = "hashicorp/random"
|
||||
|
|
|
@ -5,10 +5,6 @@ terraform {
|
|||
source = "hashicorp/azurerm"
|
||||
version = ">= 3.8"
|
||||
}
|
||||
null = {
|
||||
source = "hashicorp/null"
|
||||
version = ">= 3.0"
|
||||
}
|
||||
random = {
|
||||
source = "hashicorp/random"
|
||||
version = ">= 3.0"
|
||||
|
@ -138,17 +134,15 @@ resource "azurerm_linux_virtual_machine_scale_set" "vm_linux" {
|
|||
|
||||
# CustomData (e.g. image tag to run) changes will only take affect after vmss instances are reimaged.
|
||||
# https://docs.microsoft.com/en-us/azure/virtual-machines/custom-data#can-i-update-custom-data-after-the-vm-has-been-created
|
||||
resource "null_resource" "vm_linux_reimage" {
|
||||
resource "terraform_data" "vm_linux_reimage" {
|
||||
provisioner "local-exec" {
|
||||
command = "az vmss reimage --name ${azurerm_linux_virtual_machine_scale_set.vm_linux.name} --resource-group ${var.resource_group_name}"
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
replace_triggered_by = [
|
||||
# although we mainly want to catch image tag changes, this covers any custom data change.
|
||||
azurerm_linux_virtual_machine_scale_set.vm_linux.custom_data
|
||||
]
|
||||
}
|
||||
triggers_replace = [
|
||||
# although we mainly want to catch image tag changes, this covers any custom data change.
|
||||
azurerm_linux_virtual_machine_scale_set.vm_linux.custom_data
|
||||
]
|
||||
|
||||
depends_on = [
|
||||
azurerm_linux_virtual_machine_scale_set.vm_linux
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "0.8.0"
|
||||
__version__ = "0.8.1"
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/hashicorp/azurerm" {
|
||||
version = "3.47.0"
|
||||
constraints = "3.47.0"
|
||||
version = "3.51.0"
|
||||
constraints = "3.51.0"
|
||||
hashes = [
|
||||
"h1:gWdjrOUCdfRB5VrQ0qxJI/coNh5chWw9884qM/nTg0E=",
|
||||
"zh:099ffaec3ef0ef45a23aebd851fdf49a279f872632dd2e72fa3cb897621511ac",
|
||||
"zh:0a2c33eff74c8934a371cff9647edc59a35cd2810d63613e5de4f6f2e43ae014",
|
||||
"zh:0ac4934c8ebff2cdb5aba2728693ba8e2143f7a16f51dadaff5847a442d535b3",
|
||||
"zh:125d2e039796ccf50f08e254be6f6258c28739fe28083c8e9fcb3952084bebb5",
|
||||
"zh:39de12f00902dbe42a07b75687b9f4c2f141874bd8c0d544b02f23991e295f66",
|
||||
"zh:584241a1dbee15d09007cfba5a341d0ae05722c194f51a67e01e4f6258dadc5e",
|
||||
"zh:a0001c265faa25e3b3595fd530891cb08a01108cecea9b84289420a83e3d57dc",
|
||||
"zh:c636316dc16226754b7c340fe0ad16fb1b2d9d4530303e9179be7205568cf40f",
|
||||
"zh:ce6e92a57a5f277f9ccab2a119f939faa28ada04eb2cc9d3f2d2c70dc19a1a84",
|
||||
"zh:cfde69b8c48edda6ac232d3afa676cfd9fa60515e43d764666a657b190b7ed71",
|
||||
"h1:X13zyweEi+honSpCdijEJBawbG6m1NmGyWDccICIKXs=",
|
||||
"zh:045a56f984882b8cf111301550e14a51346c817ec0b3d6dc752f7533585ed99b",
|
||||
"zh:102fa2fb9213f20c2834b7abb51d44f1c766bb28ad4f14c98d2c149faba0a911",
|
||||
"zh:173e38d128bf559b4a3e4bf5511974ab87951ffad9460f769067f62edc66acc7",
|
||||
"zh:22b7f74a6bf86fa4f735783331335b9c4783d5437c672a7d2579cedea8463e3b",
|
||||
"zh:3e37e83a5f39f73fa3b310162ef9fc58449445aaeb2ddad66404251ceb6908a5",
|
||||
"zh:6609b1c63ea9466bea599f6e1e32573a13889db6be89dd068c0eb114f7de50d5",
|
||||
"zh:6a2cc4ab06a467369f03c4e1fb1eeb23f0ea8a98fb1c0651284fe45ca3d5b02f",
|
||||
"zh:91885a417d4fd1cdc81b64d26330dacf608ef2f9d272b8f7073d93e71d6bccef",
|
||||
"zh:96d1879e52f399f3c813bcf36c7ceee72273a3e020077d09b03f6b7fdef4430c",
|
||||
"zh:dcdae19688d83dbf5dbc4c75d4c5f2d6d8abeb4fddc404c20880f9f3fa22c3ed",
|
||||
"zh:e2e11ffae353f43f4bf4bb88fa386fb214b8dd4aebfe7665b3142484652f9651",
|
||||
"zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c",
|
||||
"zh:fc1269b2f4d27cd2d14cd970e5b5066adf68a3b267f21d57edc36b8ef6dba82f",
|
||||
]
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ terraform {
|
|||
required_providers {
|
||||
azurerm = {
|
||||
source = "hashicorp/azurerm"
|
||||
version = "3.47.0"
|
||||
version = "3.51.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "0.5.0"
|
||||
__version__ = "0.5.1"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
schemaVersion: 1.0.0
|
||||
name: tre-workspace-base
|
||||
version: 1.2.0
|
||||
version: 1.2.2
|
||||
description: "A base Azure TRE workspace"
|
||||
dockerfile: Dockerfile.tmpl
|
||||
registry: azuretre
|
||||
|
@ -146,7 +146,7 @@ outputs:
|
|||
mixins:
|
||||
- exec
|
||||
- terraform:
|
||||
clientVersion: 1.3.6
|
||||
clientVersion: 1.4.4
|
||||
- az:
|
||||
clientVersion: 2.37.0
|
||||
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/azure/azapi" {
|
||||
version = "1.3.0"
|
||||
constraints = ">= 1.3.0, 1.3.0"
|
||||
version = "1.5.0"
|
||||
constraints = ">= 1.3.0, 1.5.0"
|
||||
hashes = [
|
||||
"h1:b4PzksrgRiHgOTVXIMTODOAlsvdj3uWSdCvA7lw+9ik=",
|
||||
"zh:0923b297c5b71ed584e5f3a0b2393e80244076e85102a90438159833353274b0",
|
||||
"zh:11fa2922aa98ca55beaf7cc33c7edbde81bbd405fdfea2955276c7f5a8537240",
|
||||
"zh:14af830fb6091d084bfc2711c8e9c7bf05aa3c56fe8fd8e2fb4eddeb345be88d",
|
||||
"zh:25258425ecbffbdf09b0c8131d2c680cddd19b504e0036ee5f83972dcae7df0a",
|
||||
"zh:2922b535fe4d4f0963189548f2f8360a0aaf951fd411354f2269a111d8a0c1ad",
|
||||
"zh:32c9360305e00c25d0f9d0a84dfbdbad8da2465be769a9c1f11f132c0225358e",
|
||||
"zh:4ddd3ee23c340d5000839d8d30ba7f94e695476d63075f95cfb041e67d8f6ef6",
|
||||
"zh:5c1514392a5c3dd51084aa70cb6c4dcc8b027c4508b5e4eb9f8c3990fd403213",
|
||||
"zh:6b3ecac7099ab86c007b5ad636bd029f5e5f3e9bd06b0f74c82f0451a7995ecc",
|
||||
"zh:6cb7081745b378e910e0cf09fb5717a2ad35e629ce3e07415d6682c1c1407872",
|
||||
"zh:7107eda5125c1b983380f1f6418c592fb7fb2eb5b589ad0e08f6c47341f36318",
|
||||
"zh:c6fa7af32a7a47d23a85e0eea4d4cbb065378ae75aed8c9c628fb625b04bc619",
|
||||
"h1:wiX+oIlwttTKq6z3LGbrqmRCkN66C0YgqxM+jKQbejw=",
|
||||
"zh:14109c169973e1b0d526131ca047e25f62700a44ecce4303aacb15793764be3e",
|
||||
"zh:19417f2bbbadd0a079d51646a929d43ae7a0293f0fc13c3fa369d32780c1c846",
|
||||
"zh:3254370d3304227ea0ec1352d98aa4a4a59e6a76ddede26454bdb55048101ec3",
|
||||
"zh:34d9a96e6401f4fc087100b9c63aa47c77904a45478155671787854db13872c1",
|
||||
"zh:62f615527a6bda5b9808baf75edf80648b106ba449418665ea4841ded978aee7",
|
||||
"zh:6d3fc50788e74fba509586d99c4b80a1ef96345f21a0033746dfbf69dc6c2c1d",
|
||||
"zh:7858f0e8b63590c34defd0ef7e844beaed942f8e2ae6df5a591d031d1db077a4",
|
||||
"zh:80563967234c853f18cffffa821df7a5dd43c0a72c02e499111dcda0064223d7",
|
||||
"zh:ae691de55bd1fd18820a5bf1b6bf8204711e8ddd01adde70a2db4e585523fb42",
|
||||
"zh:b5700bab09282c0c05d76ca7910d43158e065d854e0780348fa8a5de06fba44f",
|
||||
"zh:c378578d65b4a51e2aa57122c8149e136bad72e5c8de516d269e6259051f9428",
|
||||
"zh:c5093f71eb18e84f93947d24c369e67a7dc4fa02950b9ae6b09cb71bc62a8b40",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,42 +42,22 @@ provider "registry.terraform.io/hashicorp/azuread" {
|
|||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/azurerm" {
|
||||
version = "3.41.0"
|
||||
constraints = ">= 3.8.0, >= 3.33.0, 3.41.0"
|
||||
version = "3.51.0"
|
||||
constraints = ">= 3.8.0, >= 3.33.0, 3.51.0"
|
||||
hashes = [
|
||||
"h1:Kn7sqPk/YpsvORFEd/zHXa8U7KkVB551DXUMwvqiU0s=",
|
||||
"zh:123838b581a27499d0a1e3a9804a6f57304969f58c4ea7fbd938ae2a795b2a19",
|
||||
"zh:761a7bff3872a192202411aa62e3e6aedc3046f0df86967a1f9ed5a74207f451",
|
||||
"zh:83092681a9e14d5e548edccece5086d822f86de6ff8227bb78706b41f0041697",
|
||||
"zh:95fd6be4a3b995dc8ad40054646e2261e01365af7e8f8ebe0e62133cee8250cd",
|
||||
"zh:995c3eb0aa23fc6948f45e68173034facc4bd92f4865abc3bba4bd305596fc86",
|
||||
"zh:9f7b158d39f3e9fbc01ee27e6a63600838e34b7364715ebeea7d62717e48cb56",
|
||||
"zh:b23193883592a4889942e82e73782e70dfbb517561a4f24b09f8ab6cbdc46866",
|
||||
"zh:c4884d654d03a0546ec78f348563e32220ae35a2c76f22cb3c960f989dc6be48",
|
||||
"zh:dda1c6720c6cef052db2fb4886a9cd46dee849e4367d6d66b45ad9d5bb607b94",
|
||||
"zh:f0bc878d67785343bfc36a7d14ec58a67fa436f5b8b497221aea3931e3dccefd",
|
||||
"h1:X13zyweEi+honSpCdijEJBawbG6m1NmGyWDccICIKXs=",
|
||||
"zh:045a56f984882b8cf111301550e14a51346c817ec0b3d6dc752f7533585ed99b",
|
||||
"zh:102fa2fb9213f20c2834b7abb51d44f1c766bb28ad4f14c98d2c149faba0a911",
|
||||
"zh:173e38d128bf559b4a3e4bf5511974ab87951ffad9460f769067f62edc66acc7",
|
||||
"zh:22b7f74a6bf86fa4f735783331335b9c4783d5437c672a7d2579cedea8463e3b",
|
||||
"zh:3e37e83a5f39f73fa3b310162ef9fc58449445aaeb2ddad66404251ceb6908a5",
|
||||
"zh:6609b1c63ea9466bea599f6e1e32573a13889db6be89dd068c0eb114f7de50d5",
|
||||
"zh:6a2cc4ab06a467369f03c4e1fb1eeb23f0ea8a98fb1c0651284fe45ca3d5b02f",
|
||||
"zh:91885a417d4fd1cdc81b64d26330dacf608ef2f9d272b8f7073d93e71d6bccef",
|
||||
"zh:96d1879e52f399f3c813bcf36c7ceee72273a3e020077d09b03f6b7fdef4430c",
|
||||
"zh:dcdae19688d83dbf5dbc4c75d4c5f2d6d8abeb4fddc404c20880f9f3fa22c3ed",
|
||||
"zh:e2e11ffae353f43f4bf4bb88fa386fb214b8dd4aebfe7665b3142484652f9651",
|
||||
"zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c",
|
||||
"zh:f6aa3c25f7106619cc6760e1d34b29b0956c50f285994f009939890a85e7b058",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/null" {
|
||||
version = "3.2.1"
|
||||
constraints = "3.2.1"
|
||||
hashes = [
|
||||
"h1:FbGfc+muBsC17Ohy5g806iuI1hQc4SIexpYCrQHQd8w=",
|
||||
"zh:58ed64389620cc7b82f01332e27723856422820cfd302e304b5f6c3436fb9840",
|
||||
"zh:62a5cc82c3b2ddef7ef3a6f2fedb7b9b3deff4ab7b414938b08e51d6e8be87cb",
|
||||
"zh:63cff4de03af983175a7e37e52d4bd89d990be256b16b5c7f919aff5ad485aa5",
|
||||
"zh:74cb22c6700e48486b7cabefa10b33b801dfcab56f1a6ac9b6624531f3d36ea3",
|
||||
"zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3",
|
||||
"zh:79e553aff77f1cfa9012a2218b8238dd672ea5e1b2924775ac9ac24d2a75c238",
|
||||
"zh:a1e06ddda0b5ac48f7e7c7d59e1ab5a4073bbcf876c73c0299e4610ed53859dc",
|
||||
"zh:c37a97090f1a82222925d45d84483b2aa702ef7ab66532af6cbcfb567818b970",
|
||||
"zh:e4453fbebf90c53ca3323a92e7ca0f9961427d2f0ce0d2b65523cc04d5d999c2",
|
||||
"zh:e80a746921946d8b6761e77305b752ad188da60688cfd2059322875d363be5f5",
|
||||
"zh:fbdb892d9822ed0e4cb60f2fedbdbb556e4da0d88d3b942ae963ed6ff091e48f",
|
||||
"zh:fca01a623d90d0cad0843102f9b8b9fe0d3ff8244593bd817f126582b52dd694",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -94,15 +94,15 @@ resource "azurerm_key_vault_access_policy" "deployer" {
|
|||
secret_permissions = ["Get", "List", "Set", "Delete", "Purge", "Recover"]
|
||||
}
|
||||
|
||||
resource "null_resource" "wait_for_dns_vault" {
|
||||
resource "terraform_data" "wait_for_dns_vault" {
|
||||
provisioner "local-exec" {
|
||||
command = "bash -c \"sleep 120s\""
|
||||
on_failure = fail
|
||||
}
|
||||
|
||||
triggers = {
|
||||
always_run = azurerm_private_endpoint.kvpe.private_service_connection[0].private_ip_address # only wait on new/changed private IP address
|
||||
}
|
||||
triggers_replace = [
|
||||
azurerm_private_endpoint.kvpe.private_service_connection[0].private_ip_address # only wait on new/changed private IP address
|
||||
]
|
||||
|
||||
depends_on = [azurerm_private_endpoint.kvpe]
|
||||
|
||||
|
@ -116,7 +116,7 @@ resource "azurerm_key_vault_secret" "aad_tenant_id" {
|
|||
depends_on = [
|
||||
azurerm_key_vault_access_policy.deployer,
|
||||
azurerm_key_vault_access_policy.resource_processor,
|
||||
null_resource.wait_for_dns_vault
|
||||
terraform_data.wait_for_dns_vault
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ resource "azurerm_key_vault_secret" "client_id" {
|
|||
depends_on = [
|
||||
azurerm_key_vault_access_policy.deployer,
|
||||
azurerm_key_vault_access_policy.resource_processor,
|
||||
null_resource.wait_for_dns_vault
|
||||
terraform_data.wait_for_dns_vault
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -152,6 +152,6 @@ resource "azurerm_key_vault_secret" "client_secret" {
|
|||
depends_on = [
|
||||
azurerm_key_vault_access_policy.deployer,
|
||||
azurerm_key_vault_access_policy.resource_processor,
|
||||
null_resource.wait_for_dns_vault
|
||||
terraform_data.wait_for_dns_vault
|
||||
]
|
||||
}
|
||||
|
|
|
@ -77,40 +77,35 @@ resource "azurerm_subnet_route_table_association" "rt_services_subnet_associatio
|
|||
|
||||
data "azurerm_client_config" "current" {}
|
||||
|
||||
resource "null_resource" "az_login_sp" {
|
||||
|
||||
resource "terraform_data" "az_login_sp" {
|
||||
count = var.arm_use_msi == true ? 0 : 1
|
||||
provisioner "local-exec" {
|
||||
command = "az cloud set --name ${var.azure_environment} && az login --service-principal --username ${var.arm_client_id} --password ${var.arm_client_secret} --tenant ${var.arm_tenant_id}"
|
||||
}
|
||||
|
||||
triggers = {
|
||||
timestamp = timestamp()
|
||||
}
|
||||
|
||||
triggers_replace = [
|
||||
timestamp()
|
||||
]
|
||||
}
|
||||
|
||||
resource "null_resource" "az_login_msi" {
|
||||
|
||||
resource "terraform_data" "az_login_msi" {
|
||||
count = var.arm_use_msi == true ? 1 : 0
|
||||
provisioner "local-exec" {
|
||||
command = "az cloud set --name ${var.azure_environment} && az login --identity -u '${data.azurerm_client_config.current.client_id}'"
|
||||
}
|
||||
|
||||
triggers = {
|
||||
timestamp = timestamp()
|
||||
}
|
||||
triggers_replace = [
|
||||
timestamp()
|
||||
]
|
||||
}
|
||||
|
||||
resource "null_resource" "ws_core_peer_sync" {
|
||||
resource "terraform_data" "ws_core_peer_sync" {
|
||||
depends_on = [
|
||||
azurerm_virtual_network_peering.core_ws_peer,
|
||||
null_resource.az_login_sp,
|
||||
null_resource.az_login_msi
|
||||
terraform_data.az_login_sp,
|
||||
terraform_data.az_login_msi
|
||||
]
|
||||
triggers_replace = [
|
||||
join(",", azurerm_virtual_network.ws.address_space)
|
||||
]
|
||||
triggers = {
|
||||
vnet2addr = join(",", azurerm_virtual_network.ws.address_space)
|
||||
}
|
||||
provisioner "local-exec" {
|
||||
command = <<CMD
|
||||
az network vnet peering sync --ids ${azurerm_virtual_network_peering.ws_core_peer.id}
|
||||
|
@ -118,15 +113,15 @@ resource "null_resource" "ws_core_peer_sync" {
|
|||
}
|
||||
}
|
||||
|
||||
resource "null_resource" "core_ws_sync" {
|
||||
resource "terraform_data" "core_ws_sync" {
|
||||
depends_on = [
|
||||
azurerm_virtual_network_peering.core_ws_peer,
|
||||
null_resource.az_login_sp,
|
||||
null_resource.az_login_msi
|
||||
terraform_data.az_login_sp,
|
||||
terraform_data.az_login_msi
|
||||
]
|
||||
triggers_replace = [
|
||||
join(",", azurerm_virtual_network.ws.address_space)
|
||||
]
|
||||
triggers = {
|
||||
vnet2addr = join(",", azurerm_virtual_network.ws.address_space)
|
||||
}
|
||||
provisioner "local-exec" {
|
||||
command = <<CMD
|
||||
az network vnet peering sync --ids ${azurerm_virtual_network_peering.core_ws_peer.id}
|
||||
|
|
|
@ -5,9 +5,5 @@ terraform {
|
|||
source = "hashicorp/azurerm"
|
||||
version = ">=3.33.0"
|
||||
}
|
||||
null = {
|
||||
source = "hashicorp/null"
|
||||
version = ">=3.2.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,19 +2,15 @@ terraform {
|
|||
required_providers {
|
||||
azurerm = {
|
||||
source = "hashicorp/azurerm"
|
||||
version = "=3.41.0"
|
||||
version = "=3.51.0"
|
||||
}
|
||||
azuread = {
|
||||
source = "hashicorp/azuread"
|
||||
version = "=2.20.0"
|
||||
}
|
||||
null = {
|
||||
source = "hashicorp/null"
|
||||
version = "=3.2.1"
|
||||
}
|
||||
azapi = {
|
||||
source = "Azure/azapi"
|
||||
version = "=1.3.0"
|
||||
version = "=1.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ module "aad" {
|
|||
depends_on = [
|
||||
azurerm_key_vault_access_policy.deployer,
|
||||
azurerm_key_vault_access_policy.resource_processor,
|
||||
null_resource.wait_for_dns_vault
|
||||
terraform_data.wait_for_dns_vault
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче