Skip to content

Commit

Permalink
chore: Refactor image pipeline module names and update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Arnold committed Aug 14, 2024
1 parent 7a10638 commit 32924ea
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions image-pipeline.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,30 @@ locals {

moved {
from = module.linux_image_pipeline
to = module.image_pipeline["linux-image-pipeline"]
to = module.image_pipeline_repos["linux-image-pipeline"]
}

moved {
from = module.win_image_pipeline
to = module.image_pipeline["windows-image-pipeline"]
to = module.image_pipeline_repos["windows-image-pipeline"]
}

moved {
from = module.goss-testing
to = module.image_pipeline["image-pipeline-goss-testing"]
to = module.image_pipeline_repos["image-pipeline-goss-testing"]
}

moved {
from = module.image_pipeline_ansible_playbooks
to = module.image_pipeline["image-pipeline-ansible-playbooks"]
to = module.image_pipeline_repos["image-pipeline-ansible-playbooks"]
}

module "image_pipeline" {
moved {
from = module.image_pipeline
to = module.aws_image_pipeline
}

module "image_pipeline_repos" {
for_each = toset(local.pipeline_repos)
source = "git@github.e.it.census.gov:CSVD/terraform-github-repo"
#github_codeowners_team = "CSVD"
Expand All @@ -45,9 +50,9 @@ module "image_pipeline" {
pull_request_bypassers = local.pull_request_bypassers
extra_files = [
{
path = ".github/workflows/s3_upload.yml"
path = ".github/workflows/s3_upload.yaml"
content = templatefile(
"${path.module}/workflow.yaml.tpl",
"${path.module}/workflows/s3_upload.yaml.tpl",
{
repo_name = each.value
}
Expand Down Expand Up @@ -75,7 +80,7 @@ module "asset_releases" {
}

# image-pipeline
module "image_pipeline" {
module "aws_image_pipeline" {
source = "git@github.e.it.census.gov:CSVD/terraform-github-repo"
#github_codeowners_team = "CSVD"
github_repo_description = "Terraform Workspace for creating and managing AWS Image Pipelines"
Expand All @@ -90,4 +95,15 @@ module "image_pipeline" {
collaborators = local.collaborators
admin_teams = [github_team.team.name]
pull_request_bypassers = local.pull_request_bypassers
extra_files = [
{
path = ".github/workflows/terraform-plan.yaml"
content = templatefile(
"${path.module}/workflows/terraform-plan.yaml.tpl",
{
repo_name = "aws-image-pipeline"
}
)
}
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 32924ea

Please sign in to comment.