Skip to content

Commit

Permalink
Merge pull request #83 from dduportal/feat/ci.jenkins.io/allow-winrm-…
Browse files Browse the repository at this point in the history
…ec2-agents

feat(ci.jenkins.io) allow WinRM and CIFs over TCP from controller to private agent subnets + disable Network ACLs
  • Loading branch information
dduportal authored Jan 15, 2025
2 parents eee1a74 + 7d54563 commit 7b92221
Show file tree
Hide file tree
Showing 5 changed files with 328 additions and 284 deletions.
5 changes: 0 additions & 5 deletions ci.jenkins.io-ec2-agents.tf

This file was deleted.

7 changes: 7 additions & 0 deletions ci.jenkins.io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ resource "aws_instance" "ci_jenkins_io" {
)
}

## SSH Key used to access EC2 Agents (private key stored encrypted in SOPS)
resource "aws_key_pair" "deployer" {
key_name = "deployer-key"
public_key = trimspace(element(split("#", compact(split("\n", file("./ec2_agents_authorized_keys")))[0]), 0))
tags = local.common_tags
}

### DNS Zone delegated from Azure DNS (jenkins-infra/azure-net)
# `updatecli` maintains sync between the 2 repositories using the infra reports (see outputs.tf)
resource "aws_route53_zone" "aws_ci_jenkins_io" {
Expand Down
4 changes: 2 additions & 2 deletions eks-cijenkinsio-agents-2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ module "cijenkinsio_agents_2" {
}

module "cijenkinsio_agents_2_autoscaler_irsa_role" {
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
version = "5.52.2"

role_name = "${module.cijenkinsio_agents_2.cluster_name}-cluster-autoscaler"
Expand All @@ -194,7 +194,7 @@ module "cijenkinsio_agents_2_autoscaler_irsa_role" {
}

module "cijenkinsio_agents_2_ebscsi_irsa_role" {
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
version = "5.52.2"

role_name = "${module.cijenkinsio_agents_2.cluster_name}-ebs-csi"
Expand Down
Loading

0 comments on commit 7b92221

Please sign in to comment.