Search code examples
terraformamazon-cognitoterraform-provider-aws

How to disable Self-Registration for AWS Cognito User Pool from Terraform?


I'm trying to terraform my AWS Cognito User Pool configuration. I'm using federated authentication and would like to disable user self-registration / sign-up. How can I do this via terraform?


Solution

  • answer is resolved in the comment, this is related doc for future if anyone requires information:

    solution:

    set the allow_admin_create_user_only setting in the aws_cognito_user_pool resource to true

    https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cognito_user_pool