deploymenttheory / terraform-provider-jamfpro

Jamf Pro Terraform Provider/Plugin written with the TF Provider SDK v2. Written in go
Mozilla Public License 2.0
26 stars 9 forks source link

data_type in extension_attributes not evaluating properly #156

Closed FSDeWolf closed 4 months ago

FSDeWolf commented 4 months ago

Noticing that extension_attribute is not evaluating correctly for data_type as a date. You need to put in an actual date, since it's expecting digits, and not the literal YYYY-MM-DD hh:mm:ss, which is how it's represented in Jamf.

I'd open a PR if this isn't intended, so just let me know. Looks like the following change would probably resolve it: https://github.com/deploymenttheory/terraform-provider-jamfpro/blob/5eb0318480dbaceee92a1b4a489d3073f68f0853/internal/endpoints/computerextensionattributes/computerextensionattributes_data_validation.go#L18C18-L18C55

To change to datePattern := ^YYYY-MM-DD hh:mm:ss$. Unless I'm missing something obvious, or this is used in some other portion of the repo to make this moot.

Documentation also recommends a different value as: Date (YYYY-MM-DD hh:mm:ss)

ShocOne commented 4 months ago

Hi there, This should be fixed as of release v0.0.45 with PR #157 . Please test and confirm. Many thanks