-
Notifications
You must be signed in to change notification settings - Fork 89
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
issue#511: Add custom domain data source #526
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #526 +/- ##
==========================================
+ Coverage 85.36% 85.38% +0.02%
==========================================
Files 75 76 +1
Lines 9923 9958 +35
==========================================
+ Hits 8471 8503 +32
- Misses 1147 1149 +2
- Partials 305 306 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
85c4966
to
141129a
Compare
return internalSchema.TransformResourceToDataSource(NewResource().Schema) | ||
} | ||
|
||
func readCustomDomainForDataSource(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { |
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.
Just asking, do we use this context anywhere? To configure the API client? or is the instance meta
already configured?
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.
The meta property has access to the already configured api client, essentially it is the api client at the moment, however in the future we could create a struct that holds both the api client and the key/value mutex used throughout other resources. In this way we wouldn't use the mutex as a global property any more.
The context isn't used anywhere sadly 😢 but needs to be present within the function signature. Hopefully the Go SDK v1 introduces context passing as a first param in function calls.
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 for the context (put not intended). Maybe mark it as unused with _
then?
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.
Nevermind, too late 😬, my bad.
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.
Argh, sorry already merged 😢 I can follow up on this, maybe tweaking our linter to check and fix such occurences.
🔧 Changes
This PR adds a new data source to retrieve the custom domain configuration.
📚 References
🔬 Testing
📝 Checklist