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

Adding Cognito module to Terraform #71

Merged
merged 46 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c606907
adding cognito module
chelseybeck May 17, 2024
c07c141
updating plan to include changes to modules
chelseybeck May 17, 2024
1740218
updating action to test
chelseybeck May 17, 2024
289b1b5
editing module file to test
chelseybeck May 17, 2024
add0df7
updating plan
chelseybeck May 17, 2024
07b4dbf
making change to test
chelseybeck May 17, 2024
f9c2e55
making change to test
chelseybeck May 17, 2024
4b1d524
making change to test
chelseybeck May 17, 2024
8daa786
making change to test
chelseybeck May 17, 2024
a2834f5
making change to test
chelseybeck May 17, 2024
e568eab
making change to test
chelseybeck May 17, 2024
d0f574c
making change to test
chelseybeck May 17, 2024
c8e4350
changing plan logic
chelseybeck May 18, 2024
ba1580b
fixing extraction of path
chelseybeck May 18, 2024
7db13c7
testing new structure
chelseybeck May 18, 2024
f4938e9
changing output values
chelseybeck May 18, 2024
0dded84
use explicit conditions
chelseybeck May 18, 2024
3c140c3
setting defaults to variables
chelseybeck May 18, 2024
5b68c9e
updating logic for where plan is run
chelseybeck May 18, 2024
29f4e1c
updating logic for where plan is run
chelseybeck May 18, 2024
4c92e9e
updating location of plan for module changes
chelseybeck May 18, 2024
331d9f0
adding cognito config to pd
chelseybeck May 18, 2024
553686d
prioritizing project dir if changes in both
chelseybeck May 18, 2024
0551620
removing module plan
chelseybeck May 18, 2024
23ccd4c
moving cognito creation to dev for testing
chelseybeck May 18, 2024
31d7f21
testing plan
chelseybeck May 18, 2024
f290aae
adding debug job for testing
chelseybeck May 18, 2024
1ac50da
more debugging
chelseybeck May 18, 2024
0d13438
changing how changes are set
chelseybeck May 18, 2024
efe0481
more debugging
chelseybeck May 18, 2024
26aca8b
reverting back to last working init
chelseybeck May 18, 2024
903c67d
moving env plan job and removing module plan job
chelseybeck May 18, 2024
08390ac
commenting out for testing
chelseybeck May 18, 2024
e3c14e8
uncommenting to test and adding arbitrary default values
chelseybeck May 18, 2024
691b6f0
reverting back to original to test
chelseybeck May 18, 2024
cd230ff
refactoring workflow for testing
chelseybeck May 18, 2024
472f894
changing project file to see what happens
chelseybeck May 18, 2024
0a2f7cd
adding failure for multiple plans
chelseybeck May 18, 2024
9613e7a
removing change to project
chelseybeck May 18, 2024
dfef3a0
testing change on non tf file
chelseybeck May 18, 2024
b66a203
removing environment change
chelseybeck May 18, 2024
f6afbce
removing changes to dev
chelseybeck May 18, 2024
da69e91
removing changes to dev
chelseybeck May 18, 2024
37d89a5
reverting readme changes
chelseybeck May 18, 2024
1d666f0
adding validation check on module changes
chelseybeck May 18, 2024
93963ae
reverting changes to plan
chelseybeck May 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions terraform-modules/cognito/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
resource "aws_cognito_user_pool" "main" {
name = var.user_pool_name

// Add additional configurations here according to project needs
}

resource "aws_cognito_user_pool_client" "main" {
name = var.client_name
user_pool_id = aws_cognito_user_pool.main.id

// Configure client here
// For example:
generate_secret = false
allowed_oauth_flows = ["code", "implicit"]
allowed_oauth_scopes = ["email", "openid"]
allowed_oauth_flows_user_pool_client = true

// Other configurations like callback URLs, logout URLs, etc.
}
9 changes: 9 additions & 0 deletions terraform-modules/cognito/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
output "user_pool_id" {
description = "The ID of the Cognito User Pool"
value = aws_cognito_user_pool.main.id
}

output "user_pool_client_id" {
description = "The ID of the Cognito User Pool Client"
value = aws_cognito_user_pool_client.main.id
}
17 changes: 17 additions & 0 deletions terraform-modules/cognito/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
variable "region" {
description = "AWS region"
type = string
default = "us-west-2"
}

variable "user_pool_name" {
description = "Name of the Cognito User Pool"
type = string
default = ""
}

variable "client_name" {
description = "Name of the Cognito User Pool Client"
type = string
default = ""
}
Loading