Skip to content

Commit

Permalink
updating
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Aug 27, 2024
1 parent af1da21 commit 9f40323
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 54 deletions.
34 changes: 17 additions & 17 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docker-loging

This file was deleted.

68 changes: 32 additions & 36 deletions docker.tf
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
resource "aws_ecr_repository" "repo" {
name = "csvd-census-docker-repo"
image_tag_mutability = "MUTABLE"

image_scanning_configuration {
scan_on_push = true
}
}

locals {
# public.ecr.aws/ubuntu/nginx:1.18-20.04_beta
# public.ecr.aws/ubuntu/ubuntu:22.04_edge
# public.ecr.aws/ubuntu/ubuntu:24.10
ubuntu_images = [
"22.04_edge", "23.10", "24.10", "22.04_stable"
]
image_config = [
{
for image in local.ubuntu_images : {
enabled = true
dest_path = null
name = "ubuntu/ubuntu"
name = "ubuntu"
source_image = "ubuntu/ubuntu"
source_registry = "public.ecr.aws"
source_tag = "edge"
tag = "edge"
},
source_tag = image
tag = image
}
]
}

module "images" {
source = "git@github.e.it.census.gov:terraform-modules/aws-ecr-copy-images.git/?ref=tf-upgrade"

profile = "docker-image-pipeline"
module "ecr-clone" {
source = "HappyPathway/ecr-clone/aws"
application_name = "docker-image-pipeline"
image_config = local.image_config
tags = {}

enable_lifecycle_policy = true
lifecycle_policy_all = true
force_delete = true
application_list = [
"pipeline-test"
]
image_config = local.image_config
tags = {}
}

module "docker" {
source = "HappyPathway/image-pipeline/aws"
project_name = "docker-image-pipeline"
project_name = "pipeline-test"
builder_image = "aws/codebuild/standard:7.0"
create_new_repo = false
create_new_role = true
Expand All @@ -62,22 +56,24 @@ module "docker" {
name = aws_s3_bucket.assets_bucket.bucket
key = "image-pipeline-ansible-playbooks.zip"
}
playbook = "hello-world.yaml"
playbook = "ubuntu-base.yaml"
goss_source_type = "S3"
goss_bucket = {
name = aws_s3_bucket.assets_bucket.bucket
key = "image-pipeline-goss-testing.zip"
}
goss_profile = "base-test"
state = local.state_config
vpc_config = local.vpc_config
docker_test_enabled = true
goss_profile = "base-test"
state = local.state_config
vpc_config = local.vpc_config
image = {
repo = aws_ecr_repository.repo.name
tag = "latest"
source_image = "public.ecr.aws/ubuntu/ubuntu:edge"
# source image metadata
source_image = "ubuntu"
source_tag = "24.10"
source_docker_repo = "docker-image-pipeline"
# destination image metadata
dest_image = "pipeline-test"
dest_tag = "latest"
dest_docker_repo = "docker-image-pipeline"
}
}

output docker_repo {
value = aws_ecr_repository.repo
}

0 comments on commit 9f40323

Please sign in to comment.