Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition Dev environment Infrastructure to ECS #222

Merged
merged 72 commits into from
Jan 7, 2025

Conversation

shanice-skylight
Copy link
Collaborator

@shanice-skylight shanice-skylight commented Dec 17, 2024

PULL REQUEST

Summary

  1. Add workflows to complete the following actions:
  • Run terraform plan and terraform apply
  • Run trivy which will check for critical and high vulnerabilities in the terraform code
  • Run tflint to ensure formatting is kept to standard
  1. Using the terraform modules and resources below to create the 3 main elements necessary to run query connector:
  • Using dibbs-ecr-viewer to create ecs resources to include all dependents
  • Using vpc to create vpc resources to include all dependencies
  • Using aws_db_instance resource to create the postgres database
  1. Resources created manually:
  • S3 bucket named query-connector-tfstate-dev, used to store the terraform tfstate

  • IAM role named qc-github-role-skylight used by Github actions to complete actions in AWS account

    • Currently I am not using the OIDC provided in the dibbs-ecr-viewer module, this may be the solution to avoid manually creating this role in the future.
  • Dynamodb table named query-connector-tfstate-lock-dev used to lock the tfstate file

  • Related Issue

  • Moved the infrastructure from EKS to ECS to expedite deployments and to match applications needs.

Fixes #

  • Leveraged modules mentioned above to make the transition from EKS to ECS

Additional Information

Anything else the review team should know?

Checklist

  • Descriptive Pull Request title
  • Link to relevant issues
  • Provide necessary context for design reviewers
  • Update documentation

@shanice-skylight shanice-skylight mentioned this pull request Dec 17, 2024
3 tasks
@shanice-skylight shanice-skylight self-assigned this Jan 2, 2025
@shanice-skylight shanice-skylight changed the title Shanice/transition ecs infra Transition Dev environment Infrastructure to ECS Jan 6, 2025
@shanice-skylight shanice-skylight mentioned this pull request Jan 6, 2025
2 tasks
.gitignore Outdated Show resolved Hide resolved
@CDCgov CDCgov deleted a comment from shanice-dp Jan 6, 2025
Copy link
Member

@nickclyde nickclyde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great, just a few comments:

.github/workflows/ecs_terraform.yaml Outdated Show resolved Hide resolved
.github/workflows/ecs_terraform.yaml Outdated Show resolved Hide resolved
terraform/.terraform/environment Outdated Show resolved Hide resolved
@shanice-skylight
Copy link
Collaborator Author

All comments addressed and review changes made, ready for last review.

Copy link
Member

@nickclyde nickclyde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work! 🚀

@shanice-skylight shanice-skylight merged commit 10e1475 into main Jan 7, 2025
11 checks passed
@shanice-skylight shanice-skylight deleted the shanice/transition_ecs_infra branch January 7, 2025 00:32
Copy link
Collaborator

@alismx alismx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks pretty ready! My comments are just about extra comments that have been left. While I'd love to see these cleaned up, I won't block it on that. Feel free to clean them up now or do a follow-up PR if that's easier. Approved!

default = "skylight"
}

# Manually update to set the version you want to run
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment could be removed.

}


# If intent is to pull from the phdi GHCR, set disable_ecr to true (default is false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is used internally by the qc team and not a template used by others, the comments in this section could be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants