Skip to content

Commit 192cc8f

Browse files
committed
feat: use user-pool-client-regex in example
1 parent 58a8970 commit 192cc8f

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

examples/complete/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Note that this example may create resources which cost money. Run `terraform des
4444
| Name | Type |
4545
|------|------|
4646
| [aws_cognito_user_pool.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cognito_user_pool) | resource |
47+
| [aws_cognito_user_pool_client.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cognito_user_pool_client) | resource |
4748
| [aws_route53_record.api](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
4849
| [aws_route53_zone.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone) | resource |
4950
| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource |

examples/complete/main.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ module "appsync" {
135135
authentication_type = "AMAZON_COGNITO_USER_POOLS"
136136

137137
user_pool_config = {
138-
user_pool_id = aws_cognito_user_pool.this.id
138+
user_pool_id = aws_cognito_user_pool.this.id
139+
app_id_client_regex = aws_cognito_user_pool_client.this.id
139140
}
140141
}
141142
}
@@ -264,6 +265,11 @@ resource "aws_cognito_user_pool" "this" {
264265
name = "user-pool-${random_pet.this.id}"
265266
}
266267

268+
resource "aws_cognito_user_pool_client" "this" {
269+
name = "user-pool-client-${random_pet.this.id}"
270+
user_pool_id = aws_cognito_user_pool.this.id
271+
}
272+
267273
#module "aws_lambda_function1" {
268274
# source = "terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_lambda_function"
269275
#}

examples/complete/outputs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ output "appsync_api_key_id" {
3939
output "appsync_api_key_key" {
4040
description = "Map of API Keys"
4141
value = module.appsync.appsync_api_key_key
42+
sensitive = true
4243
}
4344

4445
# Datasources

0 commit comments

Comments
 (0)