Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_cognito_user_pool.schema.# change should not force new resource #8826

Closed
tonyxiao opened this issue May 31, 2019 · 3 comments
Closed

aws_cognito_user_pool.schema.# change should not force new resource #8826

tonyxiao opened this issue May 31, 2019 · 3 comments

Comments

@tonyxiao
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.11

Affected Resource(s)

aws_cognito_user_pool

Terraform Configuration Files

resource "aws_cognito_user_pool" "pool_v2" {
  schema {
    attribute_data_type = "String"
    name                = "phone_number"
    mutable             = true
    required            = true

    string_attribute_constraints = {
      min_length = 0
      max_length = 2048
    }
  }

  schema {
    attribute_data_type = "String"
    name                = "user_id"
    mutable             = true
    required            = false

    string_attribute_constraints = {
      min_length = 0
      max_length = 2048
    }
  }

Debug Output

-/+ module.alka.aws_cognito_user_pool.pool_v2 (new resource required)
      id:                                                                 "us-east-1_9StTLQJs7" => <computed> (forces new resource)
      schema.#:                                                           "1" => "2" (forces new resource)
      schema.2576433360.attribute_data_type:                              "String" => "String"
      schema.2576433360.developer_only_attribute:                         "false" => ""
      schema.2576433360.mutable:                                          "true" => "true"
      schema.2576433360.name:                                             "phone_number" => "phone_number"
      schema.2576433360.number_attribute_constraints.#:                   "0" => "0"
      schema.2576433360.required:                                         "true" => "true"
      schema.2576433360.string_attribute_constraints.#:                   "1" => "1"
      schema.2576433360.string_attribute_constraints.0.max_length:        "2048" => "2048"
      schema.2576433360.string_attribute_constraints.0.min_length:        "0" => "0"
      schema.97745089.attribute_data_type:                                "" => "String" (forces new resource)
      schema.97745089.developer_only_attribute:                           "" => ""
      schema.97745089.mutable:                                            "" => "true" (forces new resource)
      schema.97745089.name:                                               "" => "user_id" (forces new resource)
      schema.97745089.number_attribute_constraints.#:                     "" => "0"
      schema.97745089.required:                                           "" => "false" (forces new resource)
      schema.97745089.string_attribute_constraints.#:                     "" => "1" (forces new resource)
      schema.97745089.string_attribute_constraints.0.max_length:          "" => "2048" (forces new resource)
      schema.97745089.string_attribute_constraints.0.min_length:          "" => "0" (forces new resource)

I added an additional custom attribute, it should not require creating of a new user pool as AWS allows adding custom schema attributes without live pool.

  schema {
    attribute_data_type = "String"
    name                = "user_id"
    mutable             = true
    required            = false

    string_attribute_constraints = {
      min_length = 0
      max_length = 2048
    }
  }
@ringods
Copy link
Contributor

ringods commented Jun 19, 2019

Seems this is a duplicate of #3891
@tonyxiao Can you close this one?

@aeschright
Copy link
Contributor

Duplicate of #3891.

@ghost
Copy link

ghost commented Nov 3, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants