|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "elasticstack_kibana_synthetics_private_location Resource - terraform-provider-elasticstack" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Synthetics private location config, see https://www.elastic.co/guide/en/kibana/current/create-private-location-api.html for more details |
| 7 | +--- |
| 8 | + |
| 9 | +# elasticstack_kibana_synthetics_private_location (Resource) |
| 10 | + |
| 11 | +Synthetics private location config, see https://www.elastic.co/guide/en/kibana/current/create-private-location-api.html for more details |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +provider "elasticstack" { |
| 17 | + fleet {} |
| 18 | + kibana {} |
| 19 | +} |
| 20 | +
|
| 21 | +resource "elasticstack_fleet_agent_policy" "sample" { |
| 22 | + name = "Sample Agent Policy" |
| 23 | + namespace = "default" |
| 24 | + description = "A sample agent policy" |
| 25 | + monitor_logs = true |
| 26 | + monitor_metrics = true |
| 27 | + skip_destroy = false |
| 28 | +} |
| 29 | +
|
| 30 | +resource "elasticstack_kibana_synthetics_private_location" "example" { |
| 31 | + label = "example label" |
| 32 | + space_id = "default" |
| 33 | + agent_policy_id = elasticstack_fleet_agent_policy.sample.policy_id |
| 34 | + tags = ["tag-a", "tag-b"] |
| 35 | + geo = { |
| 36 | + lat = 40.7128 |
| 37 | + lon = 74.0060 |
| 38 | + } |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +<!-- schema generated by tfplugindocs --> |
| 43 | +## Schema |
| 44 | + |
| 45 | +### Required |
| 46 | + |
| 47 | +- `agent_policy_id` (String) The ID of the agent policy associated with the private location. To create a private location for synthetics monitor you need to create an agent policy in fleet and use its agentPolicyId |
| 48 | +- `label` (String) A label for the private location, used as unique identifier |
| 49 | + |
| 50 | +### Optional |
| 51 | + |
| 52 | +- `geo` (Attributes) Geographic coordinates (WGS84) for the location (see [below for nested schema](#nestedatt--geo)) |
| 53 | +- `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used. |
| 54 | +- `tags` (List of String) An array of tags to categorize the private location. |
| 55 | + |
| 56 | +### Read-Only |
| 57 | + |
| 58 | +- `id` (String) Generated id for the private location. For monitor setup please use private location label. |
| 59 | + |
| 60 | +<a id="nestedatt--geo"></a> |
| 61 | +### Nested Schema for `geo` |
| 62 | + |
| 63 | +Required: |
| 64 | + |
| 65 | +- `lat` (Number) The latitude of the location. |
| 66 | +- `lon` (Number) The longitude of the location. |
| 67 | + |
| 68 | +## Import |
| 69 | + |
| 70 | +Import is supported using the following syntax: |
| 71 | + |
| 72 | +```shell |
| 73 | +terraform import elasticstack_kibana_synthetics_private_location.my_location <private_location_id> |
| 74 | +``` |
0 commit comments