Skip to content

Commit

Permalink
builder: debug: allow ssh, reduce instances
Browse files Browse the repository at this point in the history
Signed-off-by: Henri Rosten <[email protected]>
  • Loading branch information
henrirosten committed Jan 10, 2024
1 parent deb0a52 commit b57d074
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions terraform/jenkins/builder.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module "builder_image" {
}

locals {
num_builders = 2
num_builders = 1
}

module "builder_vm" {
Expand All @@ -34,12 +34,17 @@ module "builder_vm" {
virtual_machine_source_image = module.builder_image.image_id

virtual_machine_custom_data = join("\n", ["#cloud-config", yamlencode({
users = [{
name = "remote-build"
ssh_authorized_keys = [
tls_private_key.ed25519_remote_build.public_key_openssh
]
}]
users = [
{
name = "hrosten"
sudo = "ALL=(ALL) NOPASSWD:ALL"
ssh_authorized_keys = local.ssh_keys["hrosten"]
},
{
name = "remote-build"
ssh_authorized_keys = tls_private_key.ed25519_remote_build.public_key_openssh
},
]
write_files = [
{
content = "AZURE_STORAGE_ACCOUNT_NAME=${azurerm_storage_account.binary_cache.name}",
Expand All @@ -48,6 +53,7 @@ module "builder_vm" {
],
})])

allocate_public_ip = true
subnet_id = azurerm_subnet.builders.id
}

Expand All @@ -74,7 +80,8 @@ resource "azurerm_network_security_group" "builder_vm" {
protocol = "Tcp"
source_port_range = "*"
destination_port_ranges = [22]
source_address_prefix = azurerm_subnet.jenkins.address_prefixes[0]
#source_address_prefix = azurerm_subnet.jenkins.address_prefixes[0]
source_address_prefix = "*"
destination_address_prefix = "*"
}
}
Expand Down

0 comments on commit b57d074

Please sign in to comment.