Skip to content

Commit

Permalink
Add ConflictsWith to email_message and etc
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushi-ishibashi committed Dec 4, 2017
1 parent 133c319 commit f5dc889
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
36 changes: 20 additions & 16 deletions aws/resource_aws_cognito_user_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,19 @@ func resourceAwsCognitoUserPool() *schema.Resource {
},

"email_verification_subject": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validateCognitoUserPoolEmailVerificationSubject,
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validateCognitoUserPoolEmailVerificationSubject,
ConflictsWith: []string{"verification_message_template.0.email_subject"},
},

"email_verification_message": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validateCognitoUserPoolEmailVerificationMessage,
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validateCognitoUserPoolEmailVerificationMessage,
ConflictsWith: []string{"verification_message_template.0.email_message"},
},

"lambda_config": {
Expand Down Expand Up @@ -385,10 +387,11 @@ func resourceAwsCognitoUserPool() *schema.Resource {
ValidateFunc: validateCognitoUserPoolTemplateDefaultEmailOption,
},
"email_message": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validateCognitoUserPoolTemplateEmailMessage,
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validateCognitoUserPoolTemplateEmailMessage,
ConflictsWith: []string{"email_verification_message"},
},
"email_message_by_link": {
Type: schema.TypeString,
Expand All @@ -397,10 +400,11 @@ func resourceAwsCognitoUserPool() *schema.Resource {
ValidateFunc: validateCognitoUserPoolTemplateEmailMessageByLink,
},
"email_subject": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validateCognitoUserPoolTemplateEmailSubject,
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validateCognitoUserPoolTemplateEmailSubject,
ConflictsWith: []string{"email_verification_subject"},
},
"email_subject_by_link": {
Type: schema.TypeString,
Expand Down
2 changes: 0 additions & 2 deletions aws/resource_aws_cognito_user_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -923,9 +923,7 @@ resource "aws_cognito_user_pool" "pool" {
# attributes.
verification_message_template {
default_email_option = "CONFIRM_WITH_LINK"
email_message = "Foo {####} Bar"
email_message_by_link = "{##foobar##}"
email_subject = "FooBar {####}"
email_subject_by_link = "foobar"
sms_message = "{####} Baz"
}
Expand Down

0 comments on commit f5dc889

Please sign in to comment.