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

feat(vnets) allow infracijio-agents1 to reach private AKS clusters #259

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .shared-tools
8 changes: 7 additions & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ resource "local_file" "jenkins_infra_data_report" {
"outbound_ips" = concat(split(",", module.infra_ci_outbound_sponsorship.public_ip_list), split(",", module.privatek8s_outbound.public_ip_list)),
},
"privatek8s.jenkins.io" = {
"outbound_ips" = split(",", module.publick8s_outbound.public_ip_list),
"outbound_ips" = split(",", module.privatek8s_outbound.public_ip_list),
},
"publick8s.jenkins.io" = {
"outbound_ips" = split(",", module.publick8s_outbound.public_ip_list),
},
"cijenkinsioagents1.jenkins.io" = {
"outbound_ips" = split(",", module.ci_jenkins_io_outbound_sponsorship.public_ip_list),
}
"infracijenkinsioagents1.jenkins.io" = {
"outbound_ips" = split(",", module.infra_ci_outbound_sponsorship.public_ip_list),
}
"vnets" = {
"cert-ci-jenkins-io-sponsorship-vnet" = azurerm_virtual_network.cert_ci_jenkins_io_sponsorship.address_space,
"cert-ci-jenkins-io-vnet" = azurerm_virtual_network.cert_ci_jenkins_io.address_space,
Expand Down
22 changes: 22 additions & 0 deletions vnets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,28 @@ resource "azurerm_virtual_network_peering" "public_sponsorship_to_private" {
use_remote_gateways = false
}

resource "azurerm_virtual_network_peering" "infraci_jenkins_sponsorship_to_public_sponsorship" {
name = "${azurerm_virtual_network.infra_ci_jenkins_io_sponsorship.name}-to-${azurerm_virtual_network.public_jenkins_sponsorship.name}"
resource_group_name = azurerm_virtual_network.infra_ci_jenkins_io_sponsorship.resource_group_name
virtual_network_name = azurerm_virtual_network.infra_ci_jenkins_io_sponsorship.name
remote_virtual_network_id = azurerm_virtual_network.public_jenkins_sponsorship.id
allow_virtual_network_access = true
allow_forwarded_traffic = false
allow_gateway_transit = false
use_remote_gateways = false
}
resource "azurerm_virtual_network_peering" "public_sponsorship_to_infraci_jenkins_sponsorship" {
provider = azurerm.jenkins-sponsorship
name = "${azurerm_virtual_network.public_jenkins_sponsorship.name}-to-${azurerm_virtual_network.infra_ci_jenkins_io_sponsorship.name}"
resource_group_name = azurerm_virtual_network.public_jenkins_sponsorship.resource_group_name
virtual_network_name = azurerm_virtual_network.public_jenkins_sponsorship.name
remote_virtual_network_id = azurerm_virtual_network.infra_ci_jenkins_io_sponsorship.id
allow_virtual_network_access = true
allow_forwarded_traffic = false
allow_gateway_transit = false
use_remote_gateways = false
}

resource "azurerm_virtual_network_peering" "public_to_public_db" {
name = "${azurerm_virtual_network.public.name}-to-${azurerm_virtual_network.public_db.name}"
resource_group_name = azurerm_virtual_network.public.resource_group_name
Expand Down