generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from hackforla/add-cognito-17
Adding Cognito module to Terraform
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = "" | ||
} |