diff --git a/main.tf b/main.tf index 8411e57..9652181 100644 --- a/main.tf +++ b/main.tf @@ -88,6 +88,37 @@ data "aws_codecommit_repository" "goss" { repository_name = "image-pipeline-goss-testing" } + +module "main" { + source = "HappyPathway/image-pipeline/aws" + project_name = local.project_name + 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 = true + ssh_user = "ec2-user" + playbook = "hello-world.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 = "base-test" + state = local.state_config + vpc_config = local.vpc_config + source_ami = "ami-03fadeeea589a106b" + instance_type = "t2.micro" +} + module "rhel" { source = "HappyPathway/image-pipeline/aws" project_name = "rhel-image-pipeline-demo" @@ -158,4 +189,19 @@ module "windows" { vpc_config = local.vpc_config source_ami = "ami-012fffaddacaa52ff" # x86_64 compatible AMI instance_type = "t2.xlarge" # x86_64 compatible instance type -} \ No newline at end of file +} + + + +output iam_arn { + value = module.main.iam_arn +} + +output codebuild_user { + value = module.main.build_user.nam +} + +output parameters { + value = keys(module.main.parameters) + sensitive = true +}