Skip to content

Commit

Permalink
Rhel AMI Pipleine | Terraform plan working
Browse files Browse the repository at this point in the history
  • Loading branch information
lolli001 committed Jul 16, 2024
1 parent 304e7f8 commit ca639b9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 43 deletions.
58 changes: 15 additions & 43 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
provider "aws" {
region = "us-gov-west-1"
profile = "229685449397-csvd-dev-gov.inf-admin-t2"
}


locals {
proxy_env_vars = {
Expand Down Expand Up @@ -112,36 +117,6 @@ module "main" {
}


module "rhel" {
source = "HappyPathway/image-pipeline/aws"
project_name = "rhel-image-pipeline-demo"
source_repo_name = local.source_repo
source_repo_branch = "main"
builder_image = "aws/codebuild/standard:7.0"
create_new_repo = false
create_new_role = true
create_vpc_endpoint = false # we already created one for this vpc
ssh_user = "ec2-user"
playbook = "rhel-baseline.yaml"
terraform_version = "1.8.5"
build_permissions_iam_doc = data.aws_iam_policy_document.s3_access
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"
}
]
ansible_repo = data.aws_codecommit_repository.ansible
goss_repo = data.aws_codecommit_repository.goss
goss_profile = "rhel-base-test"
state = local.state_config
vpc_config = local.vpc_config
source_ami = "ami-0ce8fc041db68907c"
instance_type = "t2.micro"
}

module "rhel-arm" {
source = "HappyPathway/image-pipeline/aws"
project_name = "rhel-arm-image-pipeline-demo"
Expand All @@ -150,30 +125,27 @@ module "rhel-arm" {
builder_image = "aws/codebuild/standard:7.0"
create_new_repo = false
create_new_role = true
create_vpc_endpoint = false
create_vpc_endpoint = false
ssh_user = "ec2-user"
playbook = "rhel-arm-baseline.yaml"
terraform_version = "1.8.5"
build_permissions_iam_doc = data.aws_iam_policy_document.s3_access
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"
}
for proxy_var in keys(local.proxy_env_vars) : {
name = proxy_var,
value = lookup(local.proxy_env_vars, proxy_var),
type = "PLAINTEXT"
}
]
ansible_repo = data.aws_codecommit_repository.ansible
goss_repo = data.aws_codecommit_repository.goss
goss_profile = "rhel-arm-base-test"
state = local.state_config
vpc_config = local.vpc_config
source_ami = "ami-0ce8fc041db68907c"
instance_type = "t4g.micro"
state = local.state_config
vpc_config = local.vpc_config
source_ami = "ami-0ce8fc041db68907c"
instance_type = "t4g.micro"
}



resource random_password winrm {
length = 24
override_special = "$*!"
Expand Down
Binary file added tfplan
Binary file not shown.

0 comments on commit ca639b9

Please sign in to comment.