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

Add Cognito to Terraform #17

Open
2 of 5 tasks
nyarly opened this issue Aug 27, 2023 · 8 comments
Open
2 of 5 tasks

Add Cognito to Terraform #17

nyarly opened this issue Aug 27, 2023 · 8 comments
Labels
dependency draft feature: Cognito role: Dev Ops Engineer Engineer who maintains and deploys software size: 1pt Can be done in 4-6 hours

Comments

@nyarly
Copy link
Member

nyarly commented Aug 27, 2023

Dependency

Overview

At least in PeopleDepot, there's a hardcoded Cognito user pool which has a machine-generated identifier. This is generally a sign that something should be pulled into Terraform, since there's an agreement between the value in Terraform and where ever it's defined. If Terraform knows about the resource, it can simply use the random machine value, instead of it having to be supplied.

Action Items

  • Determine whether the Cognito pool is specific to PeopleDepot, or is shared by incubator projects
  • Determine what kind of configuration in terraform-incubator/ source represent it - is it a resource, because Terraform ought to manage it? Or a data because it should know where to get values for it, but it should be properly managed by a human. Assume a resource, unless a good reason is found why it should be managed manually.
  • Implement the appropriate configuration either for people-depot or shared-resources, as appropriate.
  • Plan and apply the resulting configuration, noting that if a resource is created, it will need to be brought into the Terraform state with terraform state import commands.

Resources/Instructions

https://developer.hashicorp.com/terraform/language/state/import
https://registry.terraform.io/providers/-/aws/latest/docs/resources/cognito_user_pool

@robinglov
Copy link
Member

What if any responsibility will ops have for this issue?

@robinglov
Copy link
Member

@chelseybeck this is the first issue I referred to at the ops meeting that looks like infrastructure--possibly an ops issue. After taking a closer look, what are your thoughts?

@chelseybeck chelseybeck self-assigned this Mar 2, 2024
@chelseybeck
Copy link
Member

@robinglov this should stay on incubator. anything related to projects that are in incubator should stay here. but, I self-assigned this issue b/c I can work on it.

@chelseybeck
Copy link
Member

I discussed this briefly with @fyliu in Slack and it sounds like we can recreate the Cognito resources as People Depot is in testing phase.

This doesn't apply as a shared resource because each project will have its own Cognito resources

@chelseybeck
Copy link
Member

This PR adds a module for creating Cognito resources and then creates example resources for People Depot (which can be customized as needed)

#61

@chelseybeck
Copy link
Member

The above PR should be good to go, but there is a state conflict when writing the plan. Discuss w/ Judson/Tyler or both

@ExperimentsInHonesty

This comment was marked as resolved.

@ExperimentsInHonesty ExperimentsInHonesty moved this from In progress (actively working) to New Issue Review in CoP: DevOps: Project Board Oct 7, 2024
@ExperimentsInHonesty ExperimentsInHonesty moved this from New Issue Review to Ice Box in CoP: DevOps: Project Board Oct 17, 2024
@ExperimentsInHonesty ExperimentsInHonesty added size: 1pt Can be done in 4-6 hours and removed size: missing labels Oct 17, 2024
@ExperimentsInHonesty
Copy link
Member

ExperimentsInHonesty commented Oct 17, 2024

We added a dependency. When that is satisfied. This issue will need a rewrite.

Cognito for shared user pool (hfla users)

If PD wants to share their user pool with VRMS, CTJ, and KB that is fine. Once this Cognito module is running and deployed and available for project use, then we can terraform additional app clients that can be used by those PD's stakeholder customers. There is an open pr for this, that cant be merged until the pr for 90 is merged and then we merge 76 into it.

Cognito for unique user pools (external users for each app are different)

We will also need a module for projects that need a unique user pool (e.g., homeuniteus, techworkexperience, youthjusticenav)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency draft feature: Cognito role: Dev Ops Engineer Engineer who maintains and deploys software size: 1pt Can be done in 4-6 hours
Projects
Development

No branches or pull requests

5 participants