Skip to content

Commit

Permalink
EN-949: public_cert_data should be base64 encoded and without the lea…
Browse files Browse the repository at this point in the history
…ding and trailing markers
  • Loading branch information
chrisjaimon2012 committed Aug 2, 2022
1 parent 4f46b6e commit b527344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/azure-virtual-network-gateway/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ resource "azurerm_virtual_network_gateway" "gateway" {
for_each = lookup(vpn_client_configuration.value, "root_certificate", null) != null ? vpn_client_configuration.value["root_certificate"] : []
content {
name = root_certificate.value["name"]
public_cert_data = root_certificate.value["public_cert_data"]
public_cert_data = try(base64encode(trimspace(replace(root_certificate.value["public_cert_data"], "/[-]+(BEGIN|END) CERTIFICATE[-]+/", ""))), null)
}
}

Expand Down

0 comments on commit b527344

Please sign in to comment.