-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(workloads): add website documentation
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
layout: "newrelic" | ||
page_title: "New Relic: newrelic_workload" | ||
sidebar_current: "docs-newrelic-resource-workload" | ||
description: |- | ||
Create and manage a New Relic One workload. | ||
--- | ||
|
||
# Resource: newrelic\_workload | ||
|
||
Use this resource to create, update, and delete a New Relic One workload. | ||
|
||
A New Relic Personal API key is required to provision this resource. Set the `provider_api_key` | ||
attribute in the `provider` block or the `NEWRELIC_PERSONAL_API_KEY` environment | ||
variable with your Personal API key, | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
resource "newrelic_workload" "foo" { | ||
name = "Example workload" | ||
account_id = 12345678 | ||
entity_guids = ["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"] | ||
entity_search_query { | ||
name = "Example query" | ||
query = "name like 'Example application'" | ||
} | ||
scope_account_ids = [12345678] | ||
} | ||
``` | ||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `name` - (Required) The workload's name. | ||
* `account_id` - (Required) The New Relic account ID where you want to create the workload. | ||
* `entity_guids` - (Optional) A list of entity GUIDs manually assigned to this workload. | ||
* `entity_search_query` - (Optional) A list of search queries that define a dynamic workload. See [Nested entity_search_query blocks](#nested-entity_search_query-blocks) below for details. | ||
* `scope_account_ids` - (Optional) A list of account IDs that will be used to get entities from. | ||
|
||
### Nested `entity_search_query` blocks | ||
|
||
All nested `entity_search_query` blocks support the following common arguments: | ||
|
||
* `title` - (Required) The name of the query. | ||
* `query` - (Required) The query. | ||
|
||
## Attributes Reference | ||
|
||
The following attributes are exported: | ||
|
||
* `guid` - The unique entity identifier of the workload in New Relic. | ||
* `workload_id` - The unique entity identifier of the workload. | ||
* `permalink` - The URL of the workload. | ||
* `composite_entity_search_query` - The composite query used to compose a dynamic workload. | ||
|
||
## Import | ||
|
||
New Relic One workloads can be imported using a concatenated string of the format | ||
`<account_id>:<workload_id>:<guid>`, e.g. | ||
|
||
```bash | ||
$ terraform import newrelic_workload.foo 12345678:1456:MjUyMDUyOHxBUE18QVBRTElDQVRJT058MjE1MDM3Nzk1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters