You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ibmcloud\_api\_key | IBM Cloud API key |`string`| true |
44
+
| name | The name of the target resource. |`string`| true |
45
+
| destination_crn | Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. See [service-to-service authorization](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-target-monitoring&interface=ui#target-monitoring-ui) for details. |`string`| true |
46
+
| region | Include this optional field if you used it to create a target in a different region other than the one you are connected. |`string`| false |
47
+
| managed_by | Present when the target is enterprise-managed (`managed_by: enterprise`). For account-managed targets this field is omitted. |`string`| false |
48
+
49
+
#### Outputs
50
+
51
+
| Name | Description |
52
+
|------|-------------|
53
+
| crn | The crn of the target resource. |
54
+
| target_type | The type of the target. |
55
+
| created_at | The timestamp of the target creation time. |
56
+
| updated_at | The timestamp of the target last updated time. |
| ibmcloud\_api\_key | IBM Cloud API key |`string`| true |
73
+
| name | The name of the route. |`string`| true |
74
+
| rules | The routing rules that will be evaluated in their order of the array. Once a rule is matched, the remaining rules in the route definition will be skipped. |`list()`| true |
75
+
| managed_by | Present when the route is enterprise-managed (`managed_by: enterprise`). |`string`| false |
76
+
77
+
#### Outputs
78
+
79
+
| Name | Description |
80
+
|------|-------------|
81
+
| crn | The crn of the route resource. |
82
+
| created_at | The timestamp of the route creation time. |
83
+
| updated_at | The timestamp of the route last updated time. |
| ibmcloud\_api\_key | IBM Cloud API key |`string`| true |
102
+
| default_targets | A list of default target references. Enterprise-managed targets are not supported. |`list()`| false |
103
+
| permitted_target_regions | If present then only these regions may be used to define a target. |`list(string)`| false |
104
+
| primary_metadata_region | To store all your meta data in a single region. |`string`| false |
105
+
| backup_metadata_region | To backup all your meta data in a different region. |`string`| false |
106
+
| private_api_endpoint_only | If you set this true then you cannot access api through public network. |`bool`| false |
107
+
108
+
## Metrics Routing API Version 3 data sources
56
109
57
-
metrics_router_targets data source:
110
+
### Data source: ibm_metrics_router_targets
58
111
59
112
```hcl
60
-
data "metrics_router_targets" "metrics_router_targets_instance" {
113
+
data "ibm_metrics_router_targets" "metrics_router_targets_instance" {
61
114
name = var.metrics_router_targets_name
62
115
}
63
116
```
64
-
metrics_router_routes data source:
117
+
118
+
#### Inputs
119
+
120
+
| Name | Description | Type | Required |
121
+
|------|-------------|------|---------|
122
+
| name | The name of the target resource. |`string`| false |
123
+
124
+
#### Outputs
125
+
126
+
| Name | Description |
127
+
|------|-------------|
128
+
| targets | A list of target resources. |
129
+
130
+
### Data source: ibm_metrics_router_routes
65
131
66
132
```hcl
67
-
data "metrics_router_routes" "metrics_router_routes_instance" {
133
+
data "ibm_metrics_router_routes" "metrics_router_routes_instance" {
68
134
name = var.metrics_router_routes_name
69
135
}
70
136
```
71
137
138
+
#### Inputs
139
+
140
+
| Name | Description | Type | Required |
141
+
|------|-------------|------|---------|
142
+
| name | The name of the route. |`string`| false |
143
+
144
+
#### Outputs
145
+
146
+
| Name | Description |
147
+
|------|-------------|
148
+
| routes | A list of route resources. |
149
+
72
150
## Assumptions
73
151
74
152
1. TODO
@@ -88,54 +166,3 @@ data "metrics_router_routes" "metrics_router_routes_instance" {
88
166
| Name | Version |
89
167
|------|---------|
90
168
| ibm | 1.13.1 |
91
-
92
-
## Inputs
93
-
94
-
### Target
95
-
96
-
| Name | Description | Type | Required |
97
-
|------|-------------|------|---------|
98
-
| ibmcloud\_api\_key | IBM Cloud API key |`string`| true |
99
-
| name | The name of the target. The name must be 1000 characters or less, and cannot include any special characters other than `(space) - . _ :`. Do not include any personal identifying information (PII) in any resource names. |`string`| true |
100
-
| destination_crn | The CRN of the destination resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. Read [S2S authorization](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-target-monitoring&interface=ui#target-monitoring-ui) for details.|`string`| true |
101
-
| region | Include this optional field if you want to create a target in a different region other than the one you are connected. |`string`| false |
102
-
103
-
### Route
104
-
105
-
| Name | Description | Type | Required |
106
-
|------|-------------|------|---------|
107
-
| name | The name of the route. The name must be 1000 characters or less and cannot include any special characters other than `(space) - . _ :`. Do not include any personal identifying information (PII) in any resource names. |`string`| true |
108
-
| rules | Routing rules that will be evaluated in their order of the array. |`list()`| true |
109
-
110
-
### Settings
111
-
112
-
| Name | Description | Type | Required |
113
-
|------|-------------|------|---------|
114
-
| default_targets | A list of default target references. |`list()`| false |
115
-
| permitted_target_regions | If present then only these regions may be used to define a target. |`list(string)`| false |
116
-
| primary_metadata_region | To store all your meta data in a single region. For new accounts, all target / route creation will fail until primary_metadata_region is set. |`string`| false |
117
-
| backup_metadata_region | To backup all your meta data in a different region. |`string`| false |
118
-
| private_api_endpoint_only | If you set this true then you cannot access api through public network. |`bool`| false |
119
-
120
-
### Data Source For Target
121
-
122
-
| Name | Description | Type | Required |
123
-
|------|-------------|------|---------|
124
-
| name | The name of the target resource. |`string`| false |
125
-
126
-
### Data Source For Route
127
-
128
-
| Name | Description | Type | Required |
129
-
|------|-------------|------|---------|
130
-
| name | The name of the route. |`string`| false |
Copy file name to clipboardExpand all lines: examples/ibm-metrics-router/variables.tf
+14-4Lines changed: 14 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,27 +5,37 @@ variable "ibmcloud_api_key" {
5
5
6
6
// Resource arguments for metrics_router_target
7
7
variable"metrics_router_target_name" {
8
-
description="The name of the target. The name must be 1000 characters or less, and cannot include any special characters other than `(space) - . _ :`. Do not include any personal identifying information (PII) in any resource names."
8
+
description="The name of the targetresource."
9
9
type=string
10
10
default="my-mr-target"
11
11
}
12
12
variable"metrics_router_target_destination_crn" {
13
-
description="The CRN of a destination service instance or resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. Read [S2S authorization](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-target-monitoring&interface=ui#target-monitoring-ui) for details."
13
+
description="Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. See [service-to-service authorization](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-target-monitoring&interface=ui#target-monitoring-ui) for details."
description="Include this optional field if you want to create a target in a different region other than the one you are connected."
18
+
description="Include this optional field if you used it to create a target in a different region other than the one you are connected."
19
19
type=string
20
20
default="us-south"
21
21
}
22
+
variable"metrics_router_target_managed_by" {
23
+
description="Present when the target is enterprise-managed (`managed_by: enterprise`). For account-managed targets this field is omitted."
24
+
type=string
25
+
default="enterprise"
26
+
}
22
27
23
28
// Resource arguments for metrics_router_route
24
29
variable"metrics_router_route_name" {
25
-
description="The name of the route. The name must be 1000 characters or less and cannot include any special characters other than `(space) - . _ :`. Do not include any personal identifying information (PII) in any resource names."
30
+
description="The name of the route."
26
31
type=string
27
32
default="my-route"
28
33
}
34
+
variable"metrics_router_route_managed_by" {
35
+
description="Present when the route is enterprise-managed (`managed_by: enterprise`)."
0 commit comments