Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(jenkins-infra-azure-vm-agents) filters out ipv6 ips for github git end points #162

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion terraform/modules/azure-jenkinsinfra-azurevm-agents/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ resource "azurerm_network_security_rule" "allow_outbound_ssh_from_ephemeral_agen
source_port_range = "*"
source_address_prefixes = data.azurerm_subnet.ephemeral_agents.address_prefixes
destination_port_range = "22"
destination_address_prefixes = split(" ", local.github_destination_address_prefixes)
#Filter only for ipv4 ips
destination_address_prefixes = [
jayfranco999 marked this conversation as resolved.
Show resolved Hide resolved
for ip in split(" ", local.github_destination_address_prefixes) : ip
if can(cidrnetmask(ip))
]
resource_group_name = var.controller_rg_name
network_security_group_name = azurerm_network_security_group.ephemeral_agents.name
}
Expand Down