-
Notifications
You must be signed in to change notification settings - Fork 393
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
[synthetics_private_location] Migrate synthetics resource to framework #2881
base: master
Are you sure you want to change the base?
[synthetics_private_location] Migrate synthetics resource to framework #2881
Conversation
synthetics_private_location
to frameworksynthetics_private_location
to framework
synthetics_private_location
to frameworkb69defb
to
d542d75
Compare
transfer_encoding: [] | ||
trailer: {} | ||
host: api.datadoghq.com | ||
remote_addr: "" | ||
request_uri: "" | ||
body: | | ||
{"description":"a private location","name":"tf-TestAccDatadogSyntheticsPrivateLocation_Basic-local-1714765065","tags":["foo:bar","baz"]} | ||
{"description":"a private location","metadata":{},"name":"tf-TestAccDatadogSyntheticsPrivateLocation_Basic-local-1741182374","tags":["foo:bar","baz"]} |
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.
Since there's a bug fix here, I suggest you either:
- Split the PR so the bug fix is done in isolation (better)
- Mark this PR as a bugfix (slightly worse because it makes it harder to read what the bug fix exactly is)
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.
Ok, I see! As I don't want to fix it in the older sdkv2 resource and again in the new one, I will just undo the fix in this one, and create a fix pr afterwards!
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.
Thanks, this will help maintaining a clean commit history and changelog.
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.
I still don't fully understand the new syntax, but Antoine sat with me to explain things so the changes make sense 👍
datadog/fwprovider/resource_datadog_synthetics_private_location.go
Outdated
Show resolved
Hide resolved
|
||
if _, httpresp, err := apiInstances.GetSyntheticsApiV1().GetPrivateLocation(auth, r.Primary.ID); err != nil { | ||
func SyntheticsPrivateLocationDestroyerHelper(auth context.Context, s *terraform.State, apiInstances *utils.ApiInstances) error { |
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.
For reviewers: added this retry feature, as every migrated resources (see example) seem to be using it.
This PR migrates the
synthetics_private_location
resource to the new terraform framework.It also fixes a bug wheremetadata
was not removable.