Skip to content

Commit

Permalink
updating
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Sep 3, 2024
1 parent 54c7214 commit 7102e87
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 38 deletions.
15 changes: 6 additions & 9 deletions docker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,12 @@ module "ecr-clone" {
}

module "docker" {
source = "HappyPathway/image-pipeline/aws"
project_name = "pipeline-test"
builder_image = "aws/codebuild/standard:7.0"
create_new_repo = false
create_new_role = true
create_vpc_endpoint = false
ssh_user = "ec2-user"
terraform_version = "1.8.5"
build_permissions_iam_doc = data.aws_iam_policy_document.s3_access
source = "HappyPathway/image-pipeline/aws"
project_name = "pipeline-test"
builder_image = "aws/codebuild/standard:7.0"
create_new_role = true
ssh_user = "ec2-user"
terraform_version = "1.8.5"
build_environment_variables = [
for proxy_var in keys(local.proxy_env_vars) :
{
Expand Down
16 changes: 6 additions & 10 deletions linux.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ moved {
}

module "amazon_linux" {
source = "HappyPathway/image-pipeline/aws"
project_name = "linux-image-pipeline"
builder_image = "aws/codebuild/standard:7.0"
create_new_repo = false
create_new_role = true
create_vpc_endpoint = true
ssh_user = "ec2-user"
terraform_version = "1.8.5"
build_permissions_iam_doc = data.aws_iam_policy_document.s3_access
build_user_iam_policy = data.aws_iam_policy_document.build_user_policy_document.json
source = "HappyPathway/image-pipeline/aws"
project_name = "linux-image-pipeline"
builder_image = "aws/codebuild/standard:7.0"
create_new_role = true
ssh_user = "ec2-user"
terraform_version = "1.8.5"
build_environment_variables = [
for proxy_var in keys(local.proxy_env_vars) :
{
Expand Down
19 changes: 8 additions & 11 deletions rhel.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@

module "rhel" {
source = "HappyPathway/image-pipeline/aws"
project_name = "rhel-image-pipeline-demo"
builder_image = "aws/codebuild/standard:7.0"
create_new_repo = false
create_new_role = true
create_vpc_endpoint = false
ssh_user = "ec2-user"
playbook = "rhel-arm-baseline.yaml"
terraform_version = "1.8.5"
troubleshoot = false
build_permissions_iam_doc = data.aws_iam_policy_document.s3_access
source = "HappyPathway/image-pipeline/aws"
project_name = "rhel-image-pipeline-demo"
builder_image = "aws/codebuild/standard:7.0"
create_new_role = true
ssh_user = "ec2-user"
playbook = "rhel-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
Expand Down
22 changes: 22 additions & 0 deletions vpc_endpoint.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
locals {
endpoints = toset([
"codecommit",
"ecr.api",
"ecr.dkr",
"git-codecommit",
"s3"
])
}

resource "aws_vpc_endpoint" "endpoint" {
for_each = local.endpoints
vpc_id = local.vpc_config.vpc_id
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"]
)
subnet_ids = local.vpc_config.subnets
}
14 changes: 6 additions & 8 deletions windows.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ resource "random_password" "winrm" {
}

module "windows" {
source = "HappyPathway/image-pipeline/aws"
project_name = "windows-image-pipeline-demo"
builder_image = "aws/codebuild/standard:7.0"
create_new_repo = false
create_new_role = true
playbook = "windows-baseline.yaml"
terraform_version = "1.8.5"
build_permissions_iam_doc = data.aws_iam_policy_document.s3_access
source = "HappyPathway/image-pipeline/aws"
project_name = "windows-image-pipeline-demo"
builder_image = "aws/codebuild/standard:7.0"
create_new_role = true
playbook = "windows-baseline.yaml"
terraform_version = "1.8.5"
winrm_credentials = {
username = "Administrator"
password = random_password.winrm.result
Expand Down

0 comments on commit 7102e87

Please sign in to comment.