-
Notifications
You must be signed in to change notification settings - Fork 247
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
feat(synthetics): add secure credentials resource #409
Conversation
641213a
to
9300e3b
Compare
a41ccfd
to
2ec90e8
Compare
"github.com/hashicorp/terraform-plugin-sdk/helper/schema" | ||
) | ||
|
||
func dataSourceNewRelicSyntheticsSecureCredential() *schema.Resource { |
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 my own education, is there anything here that marks this a data source other than the file name? This looks pretty similar to the resources below.
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.
A data source only has a Read function, and the Schema excludes fields that are not returned (in this case value
is not returned by the API, so it's not included in the schema). I agree that there is a bit of duplication here, but not sure how to remove it without adding complexity to reading the code.
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.
@zlesnr It's wired up in newrelic/provider.go
in the collection of data sources, rather than in the collection of resources.
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.
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.
🚚
* feat(synthetics): add secure credentials resource * feat(synthetics) add secure credential data source * docs(synthetics): document synthetics secure credentials resource and data source * chore(synthetics): linting and refactoring
Resolves #404 .
This PR introduces a resource and data source for Synthetics secure credentials, following existing patterns.