Skip to content
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

Merged
merged 4 commits into from
Feb 19, 2020

Conversation

ctrombley
Copy link
Contributor

Resolves #404 .

This PR introduces a resource and data source for Synthetics secure credentials, following existing patterns.

@ctrombley ctrombley self-assigned this Feb 19, 2020
@ghost ghost added the size/XL label Feb 19, 2020
@ctrombley ctrombley force-pushed the feat/synthetics-secure-credentials branch from 641213a to 9300e3b Compare February 19, 2020 22:05
@ghost ghost added the documentation Improvements or additions to documentation label Feb 19, 2020
@ctrombley ctrombley force-pushed the feat/synthetics-secure-credentials branch from a41ccfd to 2ec90e8 Compare February 19, 2020 22:15
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func dataSourceNewRelicSyntheticsSecureCredential() *schema.Resource {
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@jthurman42 jthurman42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Contributor

@sanderblue sanderblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚚

@ctrombley ctrombley merged commit 256a712 into master Feb 19, 2020
@ctrombley ctrombley deleted the feat/synthetics-secure-credentials branch February 19, 2020 23:20
kidk pushed a commit to aminoz007/terraform-provider-newrelic that referenced this pull request Oct 12, 2021
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Synthetics Secure Credentials
4 participants