Skip to content

Commit df75cbb

Browse files
jmaproShr3ps
authored andcommitted
feat(GH-1): add support of data_plane_proxy_authentication_mode and data_plane_proxy_private_link_delegation_enabled
Closes #1
1 parent 1a868e7 commit df75cbb

5 files changed

+27
-3
lines changed

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
variables:
33
TF_MIN_VERSION: "1.8"
4-
AZURERM_PROVIDER_MIN_VERSION: "4.0"
4+
AZURERM_PROVIDER_MIN_VERSION: "4.19"
55

66
include:
77
- project: 'claranet/projects/cloud/azure/terraform/ci'

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ module "app_configuration" {
7272
| Name | Version |
7373
|------|---------|
7474
| azurecaf | ~> 1.2.28 |
75-
| azurerm | ~> 4.0 |
75+
| azurerm | ~> 4.19 |
7676

7777
## Modules
7878

@@ -95,6 +95,8 @@ module "app_configuration" {
9595
| client\_name | Client name/account used in naming. | `string` | n/a | yes |
9696
| custom\_name | Custom App Configuration, generated if not set. | `string` | `""` | no |
9797
| custom\_replica | Create one or multiple custom AppConfig replica. | <pre>list(object({<br/> location = string<br/> name = string<br/> }))</pre> | `[]` | no |
98+
| data\_plane\_proxy\_authentication\_mode | The data plane proxy authentication mode. | `string` | `"Local"` | no |
99+
| data\_plane\_proxy\_private\_link\_delegation\_enabled | Whether data plane proxy private link delegation is enabled. | `bool` | `false` | no |
98100
| default\_tags\_enabled | Option to enable or disable default tags. | `bool` | `true` | no |
99101
| diagnostic\_settings\_custom\_name | Custom name of the diagnostics settings, name will be `default` if not set. | `string` | `"default"` | no |
100102
| environment | Project environment. | `string` | n/a | yes |

providers.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
azurerm = {
44
source = "hashicorp/azurerm"
5-
version = "~> 4.0"
5+
version = "~> 4.19"
66
}
77
azurecaf = {
88
source = "claranet/azurecaf"

r-app-configuration.tf

+10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ resource "azurerm_app_configuration" "main" {
1111
soft_delete_retention_days = var.soft_delete_retention_days
1212
local_auth_enabled = var.local_auth_enabled
1313

14+
data_plane_proxy_authentication_mode = var.data_plane_proxy_authentication_mode
15+
data_plane_proxy_private_link_delegation_enabled = var.data_plane_proxy_private_link_delegation_enabled
16+
1417
dynamic "identity" {
1518
for_each = var.identity[*]
1619
content {
@@ -36,6 +39,13 @@ resource "azurerm_app_configuration" "main" {
3639
}
3740

3841
tags = merge(local.default_tags, var.extra_tags)
42+
43+
lifecycle {
44+
precondition {
45+
condition = (var.data_plane_proxy_authentication_mode == "Local" && !var.data_plane_proxy_private_link_delegation_enabled) || (var.data_plane_proxy_authentication_mode == "Pass-through")
46+
error_message = "`data_plane_proxy_private_link_delegation_enabled` cannot be set to `true` when `data_plane_proxy_authentication_mode` is set to `Local`"
47+
}
48+
}
3949
}
4050

4151
moved {

variables-app-configuration.tf

+12
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,15 @@ variable "custom_replica" {
6363
default = []
6464
nullable = false
6565
}
66+
67+
variable "data_plane_proxy_authentication_mode" {
68+
description = "The data plane proxy authentication mode."
69+
type = string
70+
default = "Local"
71+
}
72+
73+
variable "data_plane_proxy_private_link_delegation_enabled" {
74+
description = "Whether data plane proxy private link delegation is enabled."
75+
type = bool
76+
default = false
77+
}

0 commit comments

Comments
 (0)