Skip to content

Commit 5bb110d

Browse files
author
ADYA NAND JHA
authored
Metrics router and atracker: Updated platform-services-go-sdk to fetch Madrid endpoint (IBM-Cloud#4830)
* fix(Metrics router) Updated platform-services-go-sdk to fetch Madrid endpoint Signed-off-by: ADYA NAND JHA <[email protected]> * fix(atracker) Help Message changes Signed-off-by: ADYA NAND JHA <[email protected]> --------- Signed-off-by: ADYA NAND JHA <[email protected]>
1 parent 0966383 commit 5bb110d

File tree

13 files changed

+40
-19
lines changed

13 files changed

+40
-19
lines changed

examples/ibm-atracker/README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
This example illustrates how to use the AtrackerV2
44

5-
These types of resources are supported:
5+
The following types of resources are supported:
66

77
* Activity Tracker Target
88
* Activity Tracker Route
99
* Activity Tracker Settings
1010

1111
## Usage
1212

13-
To run this example you need to execute:
13+
To run this example, execute the following commands:
1414

1515
```bash
1616
$ terraform init
@@ -29,15 +29,17 @@ atracker_target resource:
2929
resource "atracker_target" "atracker_target_instance" {
3030
name = var.atracker_target_name
3131
target_type = var.atracker_target_target_type
32+
region = var.atracker_target_region
3233
cos_endpoint = var.atracker_target_cos_endpoint
34+
logdna_endpoint = var.atracker_target_logdna_endpoint
35+
eventstreams_endpoint = var.atracker_target_eventstreams_endpoint
3336
}
3437
```
3538
atracker_route resource:
3639

3740
```hcl
3841
resource "atracker_route" "atracker_route_instance" {
3942
name = var.atracker_route_name
40-
receive_global_events = var.atracker_route_receive_global_events
4143
rules = var.atracker_route_rules
4244
}
4345
```
@@ -98,9 +100,15 @@ data "atracker_routes" "atracker_routes_instance" {
98100
| name | The name of the target. The name must be 1000 characters or less, and cannot include any special characters other than `(space) - . _ :`. | `string` | true |
99101
| target_type | The type of the target. | `string` | true |
100102
| cos_endpoint | Property values for a Cloud Object Storage Endpoint. | `` | true |
103+
| eventstreams_endpoint | Property values for the Event Streams Endpoint in responses. | `` | false |
101104
| name | The name of the route. The name must be 1000 characters or less and cannot include any special characters other than `(space) - . _ :`. | `string` | true |
102-
| receive_global_events | Indicates whether or not all global events should be forwarded to this region. | `bool` | true |
103-
| rules | Routing rules that will be evaluated in their order of the array. | `list()` | true |
105+
| 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 |
106+
| default_targets | The target ID List. In the event that no routing rule causes the event to be sent to a target, these targets will receive the event. | `list(string)` | false |
107+
| permitted_target_regions | If present then only these regions may be used to define a target. | `list(string)` | false |
108+
| metadata_region_primary | To store all your meta data in a single region. | `string` | true |
109+
| metadata_region_backup | To store all your meta data in a backup region. | `string` | false |
110+
| private_api_endpoint_only | If you set this true then you cannot access api through public network. | `bool` | true |
111+
| region | Limit the query to the specified region. | `string` | false |
104112
| name | The name of the target resource. | `string` | false |
105113
| name | The name of the route. | `string` | false |
106114

examples/ibm-atracker/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ resource "ibm_atracker_target" atracker_target_eventstreams_instance {
4141
// Provision atracker_route resource instance
4242
resource "ibm_atracker_route" "atracker_route_instance" {
4343
name = var.atracker_route_name
44-
receive_global_events = var.atracker_route_receive_global_events
45-
rules = var.atracker_route_rules
44+
rules {
45+
target_ids = [ ibm_atracker_target.atracker_target_instance.id ]
46+
locations = [ "us-south" ]
47+
}
4648
}
4749

4850
// Provision atracker_settings resource instance

examples/ibm-atracker/variables.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ variable "atracker_target_target_type" {
1515
default = "cloud_object_storage"
1616
}
1717

18+
variable "atracker_target_region" {
19+
description = "Included this optional field if you used it to create a target in a different region other than the one you are connected."
20+
type = string
21+
default = "us-south"
22+
}
23+
1824
// Resource arguments for atracker_route
1925
variable "atracker_route_name" {
2026
description = "The name of the route. The name must be 1000 characters or less and cannot include any special characters other than `(space) - . _ :`."
@@ -66,5 +72,4 @@ variable "atracker_settings_permitted_target_regions" {
6672
type = list(string)
6773
default = [ "us-south" ]
6874
}
69-
7075
// Data source arguments for atracker_endpoints

examples/ibm-atracker/versions.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
terraform {
2-
required_version = ">= 0.12"
2+
required_version = ">= 1.0"
3+
required_providers {
4+
ibm = {
5+
source = "IBM-Cloud/ibm"
6+
version = "1.52.0-beta0"
7+
}
8+
}
39
}

examples/ibm-metrics-router/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example for IBM Cloud Metrics Routing V3 Example
1+
# Example for IBM Cloud Metrics Routing
22

33
This example illustrates how to use the MetricsRouterV3
44

examples/ibm-metrics-router/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ variable "metrics_router_target_name" {
1010
default = "my-mr-target"
1111
}
1212
variable "metrics_router_target_destination_crn" {
13-
description = "The CRN of a destination service instance or resource."
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."
1414
type = string
1515
default = "crn:v1:bluemix:public:sysdig-monitor:us-south:a/0be5ad401ae913d8ff665d92680664ed:22222222-2222-2222-2222-222222222222::"
1616
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/IBM/ibm-hpcs-uko-sdk v0.0.20-beta
2525
github.com/IBM/keyprotect-go-client v0.12.2
2626
github.com/IBM/networking-go-sdk v0.42.2
27-
github.com/IBM/platform-services-go-sdk v0.48.1
27+
github.com/IBM/platform-services-go-sdk v0.50.4
2828
github.com/IBM/project-go-sdk v0.0.10
2929
github.com/IBM/push-notifications-go-sdk v0.0.0-20210310100607-5790b96c47f5
3030
github.com/IBM/scc-go-sdk/v5 v5.1.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ github.com/IBM/keyprotect-go-client v0.12.2 h1:Cjxcqin9Pl0xz3MnxdiVd4v/eIa79xL3h
156156
github.com/IBM/keyprotect-go-client v0.12.2/go.mod h1:yr8h2noNgU8vcbs+vhqoXp3Lmv73PI0zAc6VMgFvWwM=
157157
github.com/IBM/networking-go-sdk v0.42.2 h1:caqjx4jyFHi10Vlf3skHvlL6K3YJRVstsmCBmvdyqkA=
158158
github.com/IBM/networking-go-sdk v0.42.2/go.mod h1:lTUZwtUkMANMnrLHFIgRhHrkBfwASY/Iho1fabaPHxo=
159-
github.com/IBM/platform-services-go-sdk v0.48.1 h1:TT+v28xaaFDolswhFLc+2ut6KXukoNyJGhlhuJupV7g=
160-
github.com/IBM/platform-services-go-sdk v0.48.1/go.mod h1:6LxcUhIaSLP4SuQJXF9oLXBamSQogs5D9BcVwr4hmfU=
159+
github.com/IBM/platform-services-go-sdk v0.50.4 h1:YQcdFv5+WW+rH1lideBX4fJbPoS3NauUNqtJdxnnKyI=
160+
github.com/IBM/platform-services-go-sdk v0.50.4/go.mod h1:6LxcUhIaSLP4SuQJXF9oLXBamSQogs5D9BcVwr4hmfU=
161161
github.com/IBM/project-go-sdk v0.0.10 h1:vHSuemwZ4S4c6BEb22tzsEcPTs/5LnZ0yKpP3GG/GL8=
162162
github.com/IBM/project-go-sdk v0.0.10/go.mod h1:lqe0M4cKvABI1iHR1b+KfasVcxQL6nl2VJ8eOyQs8Ig=
163163
github.com/IBM/push-notifications-go-sdk v0.0.0-20210310100607-5790b96c47f5 h1:NPUhkoOCRuv3OFWt19PmwjXGGTKlvmbuPg9fUrBUNe4=

ibm/service/metricsrouter/data_source_ibm_metrics_router_targets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func DataSourceIBMMetricsRouterTargets() *schema.Resource {
5050
"destination_crn": &schema.Schema{
5151
Type: schema.TypeString,
5252
Computed: true,
53-
Description: "The CRN of the destination service instance or resource.",
53+
Description: "The CRN of the 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.",
5454
},
5555
"target_type": &schema.Schema{
5656
Type: schema.TypeString,

ibm/service/metricsrouter/resource_ibm_metrics_router_target.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func ResourceIBMMetricsRouterTarget() *schema.Resource {
3636
Type: schema.TypeString,
3737
Required: true,
3838
ValidateFunc: validate.InvokeValidator("ibm_metrics_router_target", "destination_crn"),
39-
Description: "The CRN of a destination service instance or resource.",
39+
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.",
4040
},
4141
"region": &schema.Schema{
4242
Type: schema.TypeString,

0 commit comments

Comments
 (0)