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 4 tasks
nyarly opened this issue Aug 27, 2023 · 6 comments
Open
2 of 4 tasks

Add Cognito to Terraform #17

nyarly opened this issue Aug 27, 2023 · 6 comments
Assignees
Labels
feature: Cognito role: Dev Ops Engineer Engineer who maintains and deploys software size: missing

Comments

@nyarly
Copy link
Member

nyarly commented Aug 27, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: Cognito role: Dev Ops Engineer Engineer who maintains and deploys software size: missing
Projects
Status: In progress (actively working)
Development

No branches or pull requests

4 participants