-
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.
Merge branch 'add-ip-configuration-to-private-endpoints' of https://g…
…ithub.com/fschirinzi/terraform-azurerm-caf into fschirinzi-add-ip-configuration-to-private-endpoints
- Loading branch information
Showing
4 changed files
with
132 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
You can test this module outside of a landingzone using | ||
|
||
```bash | ||
sudo terraform init | ||
|
||
terraform [plan|apply|destroy] \ | ||
-var-file ../configuration.tfvars \ | ||
-var-file ../keyvaults.tfvars \ | ||
-var-file ../nsg_definitions.tfvars \ | ||
-var-file ../virtual_networks.tfvars \ | ||
-var-file ../public_ip_addresses.tfvars \ | ||
-var-file ../virtual_machines.tfvars | ||
|
||
|
||
``` | ||
|
||
sudo terraform plan -var-file examples/networking/private_endpoint/configuration.tfvars | ||
|
||
sudo terraform plan -var-file configuration.tfvars |
100 changes: 100 additions & 0 deletions
100
examples/networking/private_endpoint/configuration.tfvars
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,100 @@ | ||
global_settings = { | ||
default_region = "region1" | ||
regions = { | ||
region1 = "australiaeast" | ||
} | ||
} | ||
|
||
resource_groups = { | ||
kv_region1 = { | ||
name = "keyvault-rg1" | ||
region = "region1" | ||
} | ||
} | ||
|
||
keyvaults = { | ||
|
||
# | ||
# Keyvault with private endpoint enabled and configured with two static ips | ||
# | ||
kv01_rg1 = { | ||
name = "certificates" | ||
resource_group_key = "kv_region1" | ||
sku_name = "premium" | ||
|
||
creation_policies = { | ||
logged_in_user = { | ||
secret_permissions = ["Set", "Get", "List", "Delete", "Purge"] | ||
certificate_permissions = ["ManageContacts", "ManageIssuers"] | ||
} | ||
} | ||
|
||
network = { | ||
bypass = "AzureServices" | ||
default_action = "Deny" | ||
} | ||
|
||
private_endpoints = { | ||
# Require enforce_private_link_endpoint_network_policies set to true on the subnet | ||
private-link1 = { | ||
name = "keyvault-certificates" | ||
vnet_key = "vnet_security" | ||
subnet_key = "private_link" | ||
resource_group_key = "kv_region1" | ||
# if the private_endpoint must be deployed in a remote resource group | ||
# resource_group = { | ||
# lz_key = "" | ||
# key = "" | ||
# } | ||
|
||
private_service_connection = { | ||
name = "keyvault-certificates" | ||
is_manual_connection = false | ||
subresource_names = ["vault"] | ||
} | ||
|
||
ip_configurations = { | ||
static1= { | ||
name = "kv01_rg1-name1" | ||
private_ip_address = "10.150.100.140" | ||
subresource_name = "vault" | ||
member_name = "default" | ||
} | ||
static2 = { | ||
name = "kv01_rg1-name2" | ||
private_ip_address = "10.150.100.150" | ||
subresource_name = "vault" | ||
member_name = "default2" | ||
} | ||
} | ||
|
||
# private_dns = { | ||
# lz_key = "" | ||
# keys = ["vaultcore"] | ||
# } | ||
} | ||
} | ||
} | ||
} | ||
|
||
vnets = { | ||
vnet_security = { | ||
resource_group_key = "kv_region1" | ||
vnet = { | ||
name = "keyvaults" | ||
address_space = ["10.150.100.0/24"] | ||
} | ||
subnets = { | ||
keyvault_endpoints = { | ||
name = "keyvault" | ||
cidr = ["10.150.100.64/26"] | ||
service_endpoints = ["Microsoft.KeyVault"] | ||
} | ||
private_link = { | ||
name = "private-links" | ||
cidr = ["10.150.100.128/26"] | ||
enforce_private_link_endpoint_network_policies = true | ||
} | ||
} | ||
} | ||
} |
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