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(ci.jenkins.io) add a custom controller RG in the new subscription to store agent NSG #520

Merged
merged 1 commit into from
Nov 22, 2023
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
8 changes: 7 additions & 1 deletion ci.jenkins.io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ module "ci_jenkins_io_azurevm_agents" {
}
}

resource "azurerm_resource_group" "controller_jenkins_sponsorship" {
name = module.ci_jenkins_io.controller_resourcegroup_name # Same name on both subscriptions
location = var.location
tags = local.default_tags
}

module "ci_jenkins_io_azurevm_agents_jenkins_sponsorship" {
providers = {
azurerm = azurerm.jenkins-sponsorship
Expand All @@ -79,7 +85,7 @@ module "ci_jenkins_io_azurevm_agents_jenkins_sponsorship" {
ephemeral_agents_network_rg_name = data.azurerm_subnet.ci_jenkins_io_ephemeral_agents_jenkins_sponsorship.resource_group_name
ephemeral_agents_network_name = data.azurerm_subnet.ci_jenkins_io_ephemeral_agents_jenkins_sponsorship.virtual_network_name
ephemeral_agents_subnet_name = data.azurerm_subnet.ci_jenkins_io_ephemeral_agents_jenkins_sponsorship.name
controller_rg_name = module.ci_jenkins_io.controller_resourcegroup_name
controller_rg_name = azurerm_resource_group.controller_jenkins_sponsorship.name
controller_ips = compact([module.ci_jenkins_io.controller_private_ipv4, module.ci_jenkins_io.controller_public_ipv4])
controller_service_principal_id = module.ci_jenkins_io.controler_service_principal_id
default_tags = local.default_tags
Expand Down