-
Notifications
You must be signed in to change notification settings - Fork 708
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Private Endpoint feature for SQL MI module (#1963)
* Added block for sqlmi private endpoint deployment and updated examples * added sqlmi example in longrunners file
- Loading branch information
1 parent
a0d4ba1
commit 51be075
Showing
9 changed files
with
111 additions
and
3 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
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
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 |
---|---|---|
|
@@ -83,4 +83,7 @@ network_security_group_definition = { | |
} | ||
] | ||
} | ||
subnet02 = { | ||
nsg= [] | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
modules/databases/mssql_managed_instance/private_endpoints.tf
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,23 @@ | ||
|
||
|
||
# | ||
# Private endpoint | ||
# | ||
|
||
module "private_endpoint" { | ||
source = "../../networking/private_endpoint" | ||
for_each = var.private_endpoints | ||
|
||
resource_id = local.output.id | ||
name = each.value.name | ||
location = var.resource_groups[try(each.value.resource_group.lz_key, var.client_config.landingzone_key)][try(each.value.resource_group.key, each.value.resource_group_key)].location | ||
resource_group_name = var.resource_groups[try(each.value.resource_group.lz_key, var.client_config.landingzone_key)][try(each.value.resource_group.key, each.value.resource_group_key)].name | ||
subnet_id = can(each.value.subnet_id) ? each.value.subnet_id : var.vnets[try(each.value.lz_key, var.client_config.landingzone_key)][each.value.vnet_key].subnets[each.value.subnet_key].id | ||
|
||
settings = each.value | ||
global_settings = var.global_settings | ||
base_tags = var.inherit_tags | ||
tags = local.tags | ||
private_dns = var.private_dns | ||
client_config = var.client_config | ||
} |
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
23 changes: 23 additions & 0 deletions
23
modules/databases/mssql_managed_instance_v1/private_endpoints.tf
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,23 @@ | ||
|
||
|
||
# | ||
# Private endpoint | ||
# | ||
|
||
module "private_endpoint" { | ||
source = "../../networking/private_endpoint" | ||
for_each = var.private_endpoints | ||
|
||
resource_id = azurerm_mssql_managed_instance.mssqlmi.id | ||
name = each.value.name | ||
location = var.resource_groups[try(each.value.resource_group.lz_key, var.client_config.landingzone_key)][try(each.value.resource_group.key, each.value.resource_group_key)].location | ||
resource_group_name = var.resource_groups[try(each.value.resource_group.lz_key, var.client_config.landingzone_key)][try(each.value.resource_group.key, each.value.resource_group_key)].name | ||
subnet_id = can(each.value.subnet_id) ? each.value.subnet_id : var.vnets[try(each.value.lz_key, var.client_config.landingzone_key)][each.value.vnet_key].subnets[each.value.subnet_key].id | ||
|
||
settings = each.value | ||
global_settings = var.global_settings | ||
base_tags = var.inherit_tags | ||
tags = local.tags | ||
private_dns = var.private_dns | ||
client_config = var.client_config | ||
} |
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
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
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