Skip to content

Commit

Permalink
Merge pull request #261 from terraform-providers/sp-password/end-date…
Browse files Browse the repository at this point in the history
…-validation

End date validation for azuread_application_password / azuread_service_principal_password
  • Loading branch information
manicminer authored Jun 2, 2020
2 parents 0ead815 + 32b7a4a commit 911d7a5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions azuread/helpers/graph/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ func PasswordResourceSchema(object_type string) map[string]*schema.Schema {
},

"end_date": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ConflictsWith: []string{"end_date_relative"},
ValidateFunc: validation.IsRFC3339Time,
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ExactlyOneOf: []string{"end_date_relative"},
ValidateFunc: validation.IsRFC3339Time,
},

"end_date_relative": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ConflictsWith: []string{"end_date"},
ValidateFunc: validate.NoEmptyStrings,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ExactlyOneOf: []string{"end_date"},
ValidateFunc: validate.NoEmptyStrings,
},
}
}
Expand Down
8 changes: 4 additions & 4 deletions website/docs/r/application_password.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ resource "azuread_application" "example" {
}
resource "azuread_application_password" "example" {
application_id = "${azuread_application.example.id}"
description = "My managed password"
value = "VT=uSgbTanZhyz@%nL9Hpd+Tfay_MRV#"
end_date = "2099-01-01T01:02:03Z"
application_object_id = "${azuread_application.example.id}"
description = "My managed password"
value = "VT=uSgbTanZhyz@%nL9Hpd+Tfay_MRV#"
end_date = "2099-01-01T01:02:03Z"
}
```

Expand Down

0 comments on commit 911d7a5

Please sign in to comment.