Skip to content

Commit

Permalink
migrating to internal module
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Jul 3, 2024
1 parent c0731ad commit 6402830
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 71 deletions.
52 changes: 19 additions & 33 deletions .terraform.lock.hcl

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

179 changes: 141 additions & 38 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ locals {
naray007 = "write",
morga471 = "write",
lolli001 = "write",
# gomez385 = "write"
gomez385 = "write"
}
}

module "elastic_beanstalk" {
source = "HappyPathway/repo/github"
source = "git@github.e.it.census.gov:CSVD/terraform-github-repo"
#github_codeowners_team = "CSVD"
github_repo_description = "Terraform Workspace for creating Elastic Beanstalk Apps and Environments"
repo_org = "arnol377"
Expand All @@ -23,30 +23,78 @@ module "elastic_beanstalk" {
collaborators = local.collaborators
}

#module "goss-testing" {
# source = "HappyPathway/repo/github"
# #github_codeowners_team = "CSVD"
# github_repo_description = "Goss testing suite for ec2 instances"
# repo_org = "CSVD"
# name = "image-pipeline-goss-testing"
# github_repo_topics = [
# "terraform"
# ]
# is_template = true
# force_name = true
# create_codeowners = false
# enforce_prs = false
# collaborators = {
# naray007 = "write",
# morga471 = "write",
# # gomez385 = "write"
# }
#}

module "win_image_pipeline" {
source = "git@github.e.it.census.gov:CSVD/terraform-github-repo"
#github_codeowners_team = "CSVD"
github_repo_description = "Template repo for windows image pipelines"
repo_org = "arnol377"
name = "windows-image-pipeline"
github_repo_topics = [
"terraform"
]
is_template = true
force_name = true
create_codeowners = false
enforce_prs = false
collaborators = merge(local.collaborators, { garri325 = "write" })
}

module "goss-testing" {
source = "git@github.e.it.census.gov:CSVD/terraform-github-repo"
#github_codeowners_team = "CSVD"
github_repo_description = "Goss testing suite for ec2 instances"
repo_org = "CSVD"
name = "image-pipeline-goss-testing"
github_repo_topics = [
"terraform"
]
is_template = true
force_name = true
create_codeowners = false
enforce_prs = false
collaborators = {
naray007 = "write",
morga471 = "write",
# gomez385 = "write"
}
}

# terraform-repos
module "automation-repos" {
source = "git@github.e.it.census.gov:CSVD/terraform-github-repo"
#github_codeowners_team = "CSVD"
github_repo_description = "Automation Repos for Morpheus POC"
repo_org = "CSVD"
name = "automation-repos"
github_repo_topics = [
"terraform"
]
force_name = true
create_codeowners = false
enforce_prs = false
collaborators = local.collaborators
}

# terraform-github-repo
module "terraform-github-repo" {
source = "git@github.e.it.census.gov:CSVD/terraform-github-repo"
#github_codeowners_team = "CSVD"
github_repo_description = "Terraform Module for managing github repos"
repo_org = "CSVD"
name = "terraform-github-repo"
github_repo_topics = [
"terraform"
]
force_name = true
enforce_prs = false
create_codeowners = false
collaborators = local.collaborators
}


module "elastic_beanstalk_java" {
source = "HappyPathway/repo/github"
source = "git@github.e.it.census.gov:CSVD/terraform-github-repo"
#github_codeowners_team = "CSVD"
github_repo_description = "Terraform Workspace for creating Elastic Beanstalk Apps and Environments"
repo_org = "arnol377"
Expand All @@ -64,7 +112,7 @@ module "elastic_beanstalk_java" {
}

module "elastic_beanstalk_nodejs" {
source = "HappyPathway/repo/github"
source = "git@github.e.it.census.gov:CSVD/terraform-github-repo"
#github_codeowners_team = "CSVD"
github_repo_description = "Terraform Workspace for creating Elastic Beanstalk Apps and Environments"
repo_org = "arnol377"
Expand All @@ -84,7 +132,7 @@ module "elastic_beanstalk_nodejs" {


module "elastic_beanstalk_docker" {
source = "HappyPathway/repo/github"
source = "git@github.e.it.census.gov:CSVD/terraform-github-repo"
#github_codeowners_team = "CSVD"
github_repo_description = "Terraform Workspace for creating Elastic Beanstalk Apps and Environments"
repo_org = "arnol377"
Expand All @@ -104,7 +152,7 @@ module "elastic_beanstalk_docker" {

# image-pipeline
module "image_pipeline" {
source = "HappyPathway/repo/github"
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"
repo_org = "arnol377"
Expand All @@ -119,12 +167,12 @@ module "image_pipeline" {
}


module "dev_network" {
source = "HappyPathway/repo/github"
module "beanstalk-demo" {
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 Dev Network"
repo_org = "arnol377"
name = "aws-dev-network"
name = "beanstalk-flask-demo"
github_repo_topics = [
"terraform"
]
Expand All @@ -134,14 +182,16 @@ module "dev_network" {
admin_teams = [
"csvd_users"
]
is_template = true
collaborators = local.collaborators
}

module "beanstalk-demo" {
source = "HappyPathway/repo/github"
module "image-pipeline-ansible-roles" {
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 Dev Network"
repo_org = "arnol377"
name = "beanstalk-flask-demo"
name = "image-pipeline-ansible-roles"
github_repo_topics = [
"terraform"
]
Expand All @@ -152,16 +202,43 @@ module "beanstalk-demo" {
"csvd_users"
]
is_template = true
collaborators = {
naray007 = "write",
morga471 = "write",
lolli001 = "write"
}

collaborators = local.collaborators
}

module "image-pipeline-playbook" {
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 Dev Network"
repo_org = "arnol377"
name = "image-pipeline-playbook"
github_repo_topics = [
"terraform"
]
force_name = true
create_codeowners = false
enforce_prs = false
admin_teams = [
"csvd_users"
]
is_template = true
collaborators = local.collaborators
}



module "windows-ami-build" {
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 Dev Network"
repo_org = "arnol377"
name = "windows-ami-build"
github_is_private = true
github_repo_topics = [
"terraform"
]
force_name = true
create_codeowners = false
enforce_prs = false
}

resource "aws_codecommit_repository" "ansible" {
repository_name = "image-pipeline-ansible-roles"
Expand All @@ -174,3 +251,29 @@ resource "aws_codecommit_repository" "goss-testing" {
description = "Goss testing suite for ec2 images"
}


data terraform_remote_state pipeline {
backend = "s3"
config = {
bucket = "inf-tfstate-229685449397"
key = "csvd-dev-gov/common/apps/aws-image-pipeline-demo"
region = "us-gov-east-1"
dynamodb_table = "tf_remote_state"
}
}

resource "aws_iam_service_specific_credential" "codecommit" {
service_name = "codecommit.amazonaws.com"
user_name = data.terraform_remote_state.pipeline.outputs.codebuild_user
}


output codecommit_credentials_username {
value = aws_iam_service_specific_credential.codecommit.service_user_name
}

output codecommit_credentials_password {
value =nonsensitive(aws_iam_service_specific_credential.codecommit.service_password)
}


0 comments on commit 6402830

Please sign in to comment.