Problem with aws_cognito_user_pool

Hi, Everyone!

We are having trouble with the “aws_cognito_user_pool”. What we need to
do is set the “user_attribute_update_settings” we use the Terraform
Resource: aws_cognito_user_pool
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cognito_user_pool reference but we dont have success.

The error message is:
│ Error: Unsupported argument

│ on cognito.tf line 69, in resource “aws_cognito_user_pool”
“loggione-pool”:
│ 69: user_attribute_update_settings = {

│ An argument named “user_attribute_update_settings” is not expected here.

We did not find any reference with some exemples with this use. Already
try to Update the Terraform Version and AWS Provider and got the same error.

Part of the code:
resource “aws_cognito_user_pool” “loggione-pool” {
name = “${terraform.workspace}-loggione”
auto_verified_attributes = [“email”, “phone_number”]
alias_attributes = [“email”, “phone_number”, “preferred_username”]
sms_authentication_message = "Seu código de autenticação é {####}. "

user_attribute_update_settings = {
attributes_require_verification_before_update = [“email”, “phone_number”]
}

Hi,

Actually we fix this updating the aws provider to 4.35+ and fix the code…

    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.35"
    }
resource "aws_cognito_user_pool" "loggione-pool" {
  name                       = "${terraform.workspace}-loggione"
  auto_verified_attributes   = ["email", "phone_number"]
  alias_attributes           = ["email", "phone_number", "preferred_username"]
  sms_authentication_message = "Seu código de autenticação é {####}. "
  user_attribute_update_settings {
    attributes_require_verification_before_update = ["email", "phone_number"]
  }...