deploy opensearch with cognito auth without manual intervention (terraform)

0

Hi,

ive created a terraform module to deploy aws opensearch with cognito auth.

Then problem is that when creating the aws opensearch it needs the cognito user pool and identity pool. To create the idenity pool, i need to create a dummy client app. and when opensearch is created it creates a new client app. That is not added to identity pool mappings.

Is there any way around this? Is it a terraform problem or a cognito / opensearch problem / or finishes crossed a me problem!

2 Answers
1

Hi,

Yes I ended up with a external data call to the aws cli to to link the opensearch created app client to idenitty pool!

thanks for the reply

answered 2 years ago
0
Accepted Answer

I believe there is a known issue with Terraform provider for this. There is a workaround you might want to give a try. Use local-exec provisioner in your opensearch.tf and run an AWS CLI command to update the Cognito IdP user pool client with the one you created in your cognito.tf. "aws cognito-idp update-user-pool-client......."

Please refer to https://github.com/aws-samples/opensearch-in-vpc/blob/main/opensearch-in-vpc-module/opensearch.tf

AWS
PrasDuv
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions