diff --git a/.terraform.lock.hcl b/.terraform.lock.hcl new file mode 100644 index 0000000..c7aef29 --- /dev/null +++ b/.terraform.lock.hcl @@ -0,0 +1,68 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/aws" { + version = "5.53.0" + constraints = ">= 2.0.0" + hashes = [ + "h1:yIDopRNeRAXg1UZpPlO6GNofDyzqSPkl/+Eoc3pKW4Q=", + "zh:2adad39412111d19a5195474d6b95577fc25ccf06d88a90019bee0efba33a1e3", + "zh:51226453a14f95b0d1163cfecafc9cf1a92ce5f66e42e6b4065d83a813836a2c", + "zh:62450fadb56db9c18d50bb8b7728a3d009be608d7ee0d4fe95c85ccb521dff83", + "zh:6f3ad977a9cc4800847c136690b1c0a0fd8437705062163d29dc4e9429598950", + "zh:71ca0a16b735b8d34b7127dd7d1e1e5d1eaac9c9f792e08abde291b5beb947d5", + "zh:7ae9cf4838eea80288305be0a3e69b39ffff86ede7b4319be421f06d32d04fb6", + "zh:93abc2db5ad995cfee014eb7446abc7caedc427e141d375a11993e6e199076b5", + "zh:9560b3424d97da804e98ee86b474b7370afefa09baf350cae7f33afb3f1aa209", + "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", + "zh:9eb57a9b649c217ac4eeb27af2a1935c18bd9bc8fb1be07434e7de74729eff46", + "zh:b5f32dcbe71ea22c2090eeeaec9af3e098d7b8c3e4491f34ffdfdc6f1c1abf81", + "zh:c9fbd5417f266c773055178e87bb4091df7f0542b72bf5ad0a4ae27045a2b7ca", + "zh:d518b3c52c8a9f79769dbe1b3683d25b4cdc8bfc77a3b3cd9c85f74e6c7383e1", + "zh:db741be21f32404bb87d73d25b1b7fd9b813b00aeb20a130ed8806d44dc26680", + "zh:ed1a8bb4d08653d87265ae534d6fc33bbdabae1608692a1ee364fce03548d36c", + ] +} + +provider "registry.terraform.io/hashicorp/github" { + version = "6.2.1" + hashes = [ + "h1:ip7024qn1ewDqlNucxh07DHvuhSLZSqtTGewxNLeYYU=", + "zh:172aa5141c525174f38504a0d2e69d0d16c0a0b941191b7170fe6ae4d7282e30", + "zh:1a098b731fa658c808b591d030cc17cc7dfca1bf001c3c32e596f8c1bf980e9f", + "zh:245d6a1c7e632d8ae4bdd2da2516610c50051e81505cf420a140aa5fa076ea90", + "zh:43c61c230fb4ed26ff1b04b857778e65be3d8f80292759abbe2a9eb3c95f6d97", + "zh:59bb7dd509004921e4322a196be476a2f70471b462802f09d03d6ce96f959860", + "zh:5cb2ab8035d015c0732107c109210243650b6eb115e872091b0f7b98c2763777", + "zh:69d2a6acfcd686f7e859673d1c8a07fc1fc1598a881493f19d0401eb74c0f325", + "zh:77f36d3f46911ace5c50dee892076fddfd64a289999a5099f8d524c0143456d1", + "zh:87df41097dfcde72a1fbe89caca882af257a4763c2e1af669c74dcb8530f9932", + "zh:899dbe621f32d58cb7c6674073a6db8328a9db66eecfb0cc3fc13299fd4e62e7", + "zh:ad2eb7987f02f7dd002076f65a685730705d04435313b5cf44d3a6923629fb29", + "zh:b2145ae7134dba893c7f74ad7dfdc65fdddf6c7b1d0ce7e2f3baa96212322fd8", + "zh:bd6bae3ac5c3f96ad9219d3404aa006ef1480e9041d4c95df1808737e37d911b", + "zh:e89758b20ae59f1b9a6d32c107b17846ddca9634b868cf8f5c927cbb894b1b1f", + ] +} + +provider "registry.terraform.io/integrations/github" { + version = "6.2.0" + constraints = "6.2.0" + hashes = [ + "h1:FdWqFyRBP1NkVVE2ZTbk2HdQ9FCuQ7Iiw+517sZUjOc=", + "zh:1206dd543cbfb82510f3de8cebc60b3b53803ed2e58b155beae60ad47375da92", + "zh:1b37f423227697a8dfedd12552826f22153c0125233caf2ab3426a968db63cfc", + "zh:273f57855ded264c6e08260e536f495b5db836c369a567c54d3852c3f24f9256", + "zh:569bc57a5bbb5ae09871a080fd17fef266da22bd4e29b5db74f10607343ba3ed", + "zh:58f3bc7becc4124ca8c9996137b286673262fd3eb9f30ae32401bd18cf87378a", + "zh:72fd37a1f0629293102ea9daa8ab300dec8465f2fb47223597946c374a445b82", + "zh:78bc062964a4bdc7b11d506ecc593731b2f9570f6d1a91bd0da5d2c9af92e964", + "zh:9c1dd21173e1814496defe7e8d0bfbbb3f34f5ec73bf38fad87aca5ad3f728ba", + "zh:a80948ebfe0c803ccb37fd94cbb4a1cb09c8e89fa85cf4468060aa35ff227916", + "zh:a8fb4fdc3f4326ea7a456a64b346bb187046832ea1819134bb0ea8e53447ee8e", + "zh:aaff85ec7753f368ffefe8fd022961fe7c8c67fef9963d60a4a17df9d0cb1c5d", + "zh:bd9efdd9dcc11067b48b269587ba34cb22aa7d559e26843e25c4faad7453b81c", + "zh:c123572fb43f3a7cd5fcb19c29063342ebd9a9e40effaab3adfd0c404441efd7", + "zh:d55b2fed99d988015b0269c1ec2fbd969ec0cf144cf1cb1ce0543df36f233061", + ] +} diff --git a/main.tf b/main.tf index 7c584f8..57b5f0f 100644 --- a/main.tf +++ b/main.tf @@ -1,14 +1,176 @@ +locals { + collaborators = { + naray007 = "write", + morga471 = "write", + lolli001 = "write", + gomez385 = "write" + } +} + module "elastic_beanstalk" { source = "HappyPathway/repo/github" - github_codeowners_team = "CSVD" - github_repo_description = "Terraform Module for creating Elastic Beanstalk Apps and Environments" + #github_codeowners_team = "CSVD" + github_repo_description = "Terraform Workspace for creating Elastic Beanstalk Apps and Environments" repo_org = "arnol377" - name = "terraform-aws-beanstalk" + name = "aws-beanstalk" github_repo_topics = [ "terraform" ] + is_template = true + force_name = true + create_codeowners = false + enforce_prs = false + 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 "elastic_beanstalk_java" { + source = "HappyPathway/repo/github" + #github_codeowners_team = "CSVD" + github_repo_description = "Terraform Workspace for creating Elastic Beanstalk Apps and Environments" + repo_org = "arnol377" + name = "aws-beanstalk-java" + github_repo_topics = [ + "terraform" + ] + is_template = true + force_name = true + create_codeowners = false + enforce_prs = false + collaborators = local.collaborators + template_repo = "aws-beanstalk" + template_repo_org = "CSVD" +} + +module "elastic_beanstalk_nodejs" { + source = "HappyPathway/repo/github" + #github_codeowners_team = "CSVD" + github_repo_description = "Terraform Workspace for creating Elastic Beanstalk Apps and Environments" + repo_org = "arnol377" + name = "aws-beanstalk-nodejs" + github_repo_topics = [ + "terraform" + ] + is_template = true + force_name = true + create_codeowners = false + enforce_prs = false + collaborators = local.collaborators + template_repo = "aws-beanstalk" + template_repo_org = "CSVD" +} + + + +module "elastic_beanstalk_docker" { + source = "HappyPathway/repo/github" + #github_codeowners_team = "CSVD" + github_repo_description = "Terraform Workspace for creating Elastic Beanstalk Apps and Environments" + repo_org = "arnol377" + name = "aws-beanstalk-docker" + github_repo_topics = [ + "terraform" + ] + is_template = true + force_name = true + create_codeowners = false + enforce_prs = false + collaborators = local.collaborators + template_repo = "aws-beanstalk" + template_repo_org = "CSVD" +} + + +# image-pipeline +module "image_pipeline" { + source = "HappyPathway/repo/github" + #github_codeowners_team = "CSVD" + github_repo_description = "Terraform Workspace for creating and managing AWS Image Pipelines" + repo_org = "arnol377" + name = "aws-image-pipeline" + github_repo_topics = [ + "terraform" + ] + force_name = true + create_codeowners = false + enforce_prs = false + collaborators = local.collaborators +} + + +module "dev_network" { + source = "HappyPathway/repo/github" + #github_codeowners_team = "CSVD" + github_repo_description = "Terraform Workspace for creating and managing AWS Dev Network" + repo_org = "arnol377" + name = "aws-dev-network" + github_repo_topics = [ + "terraform" + ] + force_name = true + create_codeowners = false + enforce_prs = false admin_teams = [ - "CSVD" + "csvd_users" + ] +} + +module "beanstalk-demo" { + source = "HappyPathway/repo/github" + #github_codeowners_team = "CSVD" + github_repo_description = "Terraform Workspace for creating and managing AWS Dev Network" + repo_org = "arnol377" + name = "beanstalk-flask-demo" + github_repo_topics = [ + "terraform" ] force_name = true -} \ No newline at end of file + create_codeowners = false + enforce_prs = false + admin_teams = [ + "csvd_users" + ] + is_template = true + collaborators = { + naray007 = "write", + morga471 = "write", + lolli001 = "write" + } + +} + + + + +resource "aws_codecommit_repository" "ansible" { + repository_name = "image-pipeline-ansible-roles" + description = "This is the Sample App Repository" +} + +# image-pipeline-goss-testing +resource "aws_codecommit_repository" "goss-testing" { + repository_name = "image-pipeline-goss-testing" + description = "Goss testing suite for ec2 images" +} + diff --git a/providers.tf b/providers.tf new file mode 100644 index 0000000..9d1e34a --- /dev/null +++ b/providers.tf @@ -0,0 +1,4 @@ +provider "github" { + owner = "CSVD" + base_url = "https://github.e.it.census.gov" +} diff --git a/versions.tf b/versions.tf new file mode 100644 index 0000000..8623443 --- /dev/null +++ b/versions.tf @@ -0,0 +1,13 @@ +terraform { + required_providers { + random = { + source = "integrations/github" + version = "6.2.0" + } + aws = { + source = "hashicorp/aws" + version = ">= 2.0.0" + } + } + required_version = ">= 1.1" +}