Skip to content

Commit

Permalink
updating files
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Dec 16, 2024
1 parent 0f73283 commit 6f1eb47
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 23 deletions.
33 changes: 21 additions & 12 deletions docker.tf → docker.tf.tmp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

locals {
# public.ecr.aws/ubuntu/nginx:1.18-20.04_beta
# public.ecr.aws/ubuntu/ubuntu:22.04_edge
Expand All @@ -15,18 +16,26 @@ locals {
source_tag = image
tag = image
}
],
[
{
enabled = true
dest_path = null
name = "python"
source_image = "ubuntu/python"
source_registry = "public.ecr.aws"
source_tag = "3.12-24.04_stable"
tag = "3.12-24.04_stable"
}

],
[
{
enabled = true
dest_path = null
name = "python"
source_image = "ubuntu/python"
source_registry = "public.ecr.aws"
source_tag = "3.12-24.04_stable"
tag = "3.12-24.04_stable"
},
{
enabled = true
dest_path = null
name = "github-runner"
source_image = "h1g9x7n8/github-runner"
source_registry = "public.ecr.aws"
source_tag = "3.12-24.04_stable"
tag = "3.12-24.04_stable"
},
])
}

Expand Down
2 changes: 1 addition & 1 deletion github-runner.tf → github-runner.tf.tmp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module "github-runner" {
image = {
# source image metadata
source_image = "ubuntu"
source_tag = "24.04"
source_tag = "24.10"
source_docker_repo = "docker-image-pipeline"
# destination image metadata
dest_image = "github-runner"
Expand Down
File renamed without changes.
6 changes: 5 additions & 1 deletion locals.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
data "aws_security_group" "it_linux_base" {
name = "it-linux-base"
}

locals {
proxy_env_vars = {
HTTP_PROXY = "http://proxy.tco.census.gov:3128"
Expand All @@ -10,7 +14,7 @@ locals {
vpc_id = "vpc-00576a396ec570b94"
region = "us-gov-west-1"
security_group_ids = [
"sg-0d828d223df9834a6"
data.aws_security_group.it_linux_base.id
]
subnets = [
# "subnet-0b1992a84536c581b"
Expand Down
11 changes: 6 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ data "aws_iam_policy_document" "assets_bucket_policy_document" {
principals {
type = "AWS"
identifiers = [
module.amazon_linux.iam_arn,
module.rhel.iam_arn,
module.docker.iam_arn,
module.windows.iam_arn,
module.github-runner.iam_arn
# module.amazon_linux.iam_arn,
# module.rhel.iam_arn,
# module.docker.iam_arn,
# module.windows.iam_arn,
# module.github-runner.iam_arn
module.morpheus.iam_arn
]
}

Expand Down
41 changes: 41 additions & 0 deletions morpheus.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

module "morpheus" {
source = "HappyPathway/image-pipeline/aws"
project_name = "morpheus"
builder_image = "aws/codebuild/standard:7.0"
create_new_role = true
ssh_user = "ec2-user"
playbook = "morpheus-arm-baseline.yaml"
terraform_version = "1.8.5"
troubleshoot = false
build_environment_variables = [
for proxy_var in keys(local.proxy_env_vars) : {
name = proxy_var
value = lookup(local.proxy_env_vars, proxy_var)
type = "PLAINTEXT"
}
]
packer_source_type = "S3"
packer_bucket = {
name = aws_s3_bucket.assets_bucket.bucket
key = "linux-image-pipeline.zip"
}
ansible_source_type = "S3"
ansible_bucket = {
name = aws_s3_bucket.assets_bucket.bucket
key = "image-pipeline-ansible-playbooks.zip"
}
goss_source_type = "S3"
goss_bucket = {
name = aws_s3_bucket.assets_bucket.bucket
key = "image-pipeline-goss-testing.zip"
}
goss_profile = "morpheus-base-test"
# goss_profile = "base-test"
state = local.state_config
vpc_config = local.vpc_config
ami = {
source_ami = "ami-0e6191a82a929381a" # x86_64 compatible AMI - RHEL9 quick start image
instance_type = "t3.micro" # x86_64 compatible instance type
}
}
File renamed without changes.
5 changes: 1 addition & 4 deletions vpc_endpoint.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ resource "aws_vpc_endpoint" "endpoint" {
service_name = "com.amazonaws.${local.vpc_config.region}.${each.value}"
vpc_endpoint_type = "Interface"

security_group_ids = concat(
local.vpc_config.security_group_ids,
["sg-0ba8072164c29e11f"]
)
security_group_ids = local.vpc_config.security_group_ids
subnet_ids = local.vpc_config.subnets
}
File renamed without changes.

0 comments on commit 6f1eb47

Please sign in to comment.