我有一个问题,我的地形在某种程度上和部署的不一样,但我不知道为什么。根据我的git历史,管理认知用户池的文件自部署以来没有改变过,但是terraform认为它已经更改并抱怨更改需要强制使用新的资源。
terraform版本:0.11.7
AWS提供程序版本:1.14.1
我的地形code:
resource "aws_cognito_user_pool" "my_app" {
name = "My App Pool"
/* Fields that can work as aliases */
alias_attributes = [
"email"
]
/* Auto-verify these fields */
auto_verified_attributes = [
"email"
]
/* This is the template used to verify addresses / accounts */
verification_message_template {
default_email_option = "CONFIRM_WITH_CODE"
}
admin_create_user_config {
allow_admin_create_user_only = false
invite_message_template {
email_message = <<EOF
{####}
EOF
email_subject = "MyApp"
sms_message = "Welcome to MyApp. Your username: {username} and password: {####} Thank you!"
}
}
email_verification_subject = "MyApp's Confirmation Code"
email_verification_message = "Your confirmation code: {####} Thank you."
password_policy {
minimum_length = 8
require_lowercase = true
require_numbers = true
require_symbols = true
require_uppercase = true
}
schema {
attribute_data_type = "String"
developer_only_attribute = false
mutable = true
name = "email"
required = true
}
schema {
attribute_data_type = "String"
developer_only_attribute = false
mutable = true
name = "custom1"
required = false
}
schema {
attribute_data_type = "String"
developer_only_attribute = false
mutable = true
name = "custom2"
required = false
}
tags {
"name" = "MyApp"
"Project" = "Terraform"
}
}我得到以下结果:
schema.3021841581.attribute_data_type: "String" => "" (forces new resource)
schema.3021841581.developer_only_attribute: "false" => "false"
schema.3021841581.mutable: "true" => "false" (forces new resource)
schema.3021841581.name: "custom1" => "" (forces new resource)
schema.3021841581.number_attribute_constraints.#: "0" => "0"
schema.3021841581.required: "false" => "false"
schema.3021841581.string_attribute_constraints.#: "1" => "0" (forces new resource)
schema.3021841581.string_attribute_constraints.0.max_length: "" => ""
schema.3021841581.string_attribute_constraints.0.min_length: "" => ""我尝试了terraform refresh,但是它没有工作。
通过执行terraform状态来显示状态,给出了
schema.3021841581.attribute_data_type = String
schema.3021841581.developer_only_attribute = false
schema.3021841581.mutable = true
schema.3021841581.name = custom1
schema.3021841581.number_attribute_constraints.# = 0
schema.3021841581.required = false
schema.3021841581.string_attribute_constraints.# = 1所以,我的问题是:
发布于 2018-05-16 13:14:54
https://stackoverflow.com/questions/50353006
复制相似问题