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 labels resource #407

Merged
merged 3 commits into from
Feb 19, 2020
Merged

Conversation

ctrombley
Copy link
Contributor

@ctrombley ctrombley commented Feb 19, 2020

Resolves #164.

This PR adds a new synthetics labels resource, following existing patterns.

@ghost ghost added the size/L label Feb 19, 2020
@ctrombley ctrombley force-pushed the feat/synthetics-labels branch from 851cee2 to 726f850 Compare February 19, 2020 16:27
@ghost ghost added documentation Improvements or additions to documentation size/XL and removed size/L labels Feb 19, 2020
@ctrombley ctrombley force-pushed the feat/synthetics-labels branch from 726f850 to 8929243 Compare February 19, 2020 18:06
@ghost ghost added the dependencies Changes to dependencies label Feb 19, 2020
@ctrombley ctrombley assigned ctrombley and unassigned sanderblue and zlesnr Feb 19, 2020
return nil
}

func expandSyntheticsLabel(d *schema.ResourceData) *synthetics.MonitorLabel {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker, but could potentially put these into the structures_{resource}.go pattern and add some a couple unit tests for expand and flatten.

Copy link
Contributor

Choose a reason for hiding this comment

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

however, I see that they are the top-level scenario that we talked about before, so maybe no big deal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left them here since there was no data source that needed to share them.

Copy link
Contributor Author

@ctrombley ctrombley Feb 19, 2020

Choose a reason for hiding this comment

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

This makes sense though, I'll make it so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sanderblue that's right, seems like there is no good way to unit test at the top level since the expand and flatten functions depend on an instace of schema.ResourceData. I will leave this as-is after all.

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 9bfa58f into master Feb 19, 2020
@ctrombley ctrombley deleted the feat/synthetics-labels branch February 19, 2020 22:14
kidk pushed a commit to aminoz007/terraform-provider-newrelic that referenced this pull request Oct 12, 2021
* feat(synthetics): add labels resource

* docs(synthetics) add website docs for synthetics labels resource

* chore: vendor modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Changes to dependencies documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Synthetic Test labels
3 participants