-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add date validator to data_source_storage_account_sas #4064
Add date validator to data_source_storage_account_sas #4064
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @lawrencegripper
Thanks for this PR - apologies for the delayed review here!
Taking a look through this looks good, if we can fix up the log message this otherwise LGTM 👍
Thanks!
@@ -6,6 +6,7 @@ import ( | |||
"time" | |||
|
|||
"github.com/Azure/go-autorest/autorest/date" | |||
iso8601 "github.com/btubbs/datetime" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
internal heads up: licence is MIT ✅
Co-Authored-By: Tom Harvey <tombuildsstuff@users.noreply.github.com>
@tombuildsstuff no problem, sorry for the slow fix my side. Log message updated. Ready to go! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for this @lawrencegripper
This has been released in version 1.34.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 1.34.0"
}
# ... other configuration ... |
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. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
This PR adds an
ISO8601
validator for use with thedata_source_storage_account_sas
data source.There isn't currently a validator for the field so any string can be used and invalid
sas
token are generated (for example a"2000-06-31"
but there is no 31st of 6th).I use github.com/btubbs/datetime to parse the date.
I've added some tests and run the existing integration tests, all seems good :)
Why not use existing
RFC3339
validator?The
ISO8601
standard is more relaxed thanRFC3339
so it would fail on a number of valid inputs. For exampleISO8601
allows2000-01-01
without a time where asRGC3339
doesn't.Issue reference
#4062