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

Metrics router and atracker: Updated platform-services-go-sdk to fetch Madrid endpoint #4830

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions examples/ibm-atracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

This example illustrates how to use the AtrackerV2

These types of resources are supported:
The following types of resources are supported:

* Activity Tracker Target
* Activity Tracker Route
* Activity Tracker Settings

## Usage

To run this example you need to execute:
To run this example, execute the following commands:

```bash
$ terraform init
Expand All @@ -29,15 +29,17 @@ atracker_target resource:
resource "atracker_target" "atracker_target_instance" {
name = var.atracker_target_name
target_type = var.atracker_target_target_type
region = var.atracker_target_region
cos_endpoint = var.atracker_target_cos_endpoint
logdna_endpoint = var.atracker_target_logdna_endpoint
eventstreams_endpoint = var.atracker_target_eventstreams_endpoint
}
```
atracker_route resource:

```hcl
resource "atracker_route" "atracker_route_instance" {
name = var.atracker_route_name
receive_global_events = var.atracker_route_receive_global_events
rules = var.atracker_route_rules
}
```
Expand Down Expand Up @@ -98,9 +100,15 @@ data "atracker_routes" "atracker_routes_instance" {
| 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 |
| target_type | The type of the target. | `string` | true |
| cos_endpoint | Property values for a Cloud Object Storage Endpoint. | `` | true |
| eventstreams_endpoint | Property values for the Event Streams Endpoint in responses. | `` | false |
| 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 |
| receive_global_events | Indicates whether or not all global events should be forwarded to this region. | `bool` | true |
| rules | Routing rules that will be evaluated in their order of the array. | `list()` | true |
| 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 |
| 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 |
| permitted_target_regions | If present then only these regions may be used to define a target. | `list(string)` | false |
| metadata_region_primary | To store all your meta data in a single region. | `string` | true |
| metadata_region_backup | To store all your meta data in a backup region. | `string` | false |
| private_api_endpoint_only | If you set this true then you cannot access api through public network. | `bool` | true |
| region | Limit the query to the specified region. | `string` | false |
| name | The name of the target resource. | `string` | false |
| name | The name of the route. | `string` | false |

Expand Down
6 changes: 4 additions & 2 deletions examples/ibm-atracker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ resource "ibm_atracker_target" atracker_target_eventstreams_instance {
// Provision atracker_route resource instance
resource "ibm_atracker_route" "atracker_route_instance" {
name = var.atracker_route_name
receive_global_events = var.atracker_route_receive_global_events
rules = var.atracker_route_rules
rules {
target_ids = [ ibm_atracker_target.atracker_target_instance.id ]
locations = [ "us-south" ]
}
}

// Provision atracker_settings resource instance
Expand Down
7 changes: 6 additions & 1 deletion examples/ibm-atracker/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ variable "atracker_target_target_type" {
default = "cloud_object_storage"
}

variable "atracker_target_region" {
description = "Included this optional field if you used it to create a target in a different region other than the one you are connected."
type = string
default = "us-south"
}

// Resource arguments for atracker_route
variable "atracker_route_name" {
description = "The name of the route. The name must be 1000 characters or less and cannot include any special characters other than `(space) - . _ :`."
Expand Down Expand Up @@ -66,5 +72,4 @@ variable "atracker_settings_permitted_target_regions" {
type = list(string)
default = [ "us-south" ]
}

// Data source arguments for atracker_endpoints
8 changes: 7 additions & 1 deletion examples/ibm-atracker/versions.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
terraform {
required_version = ">= 0.12"
required_version = ">= 1.0"
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
version = "1.52.0-beta0"
}
}
}
2 changes: 1 addition & 1 deletion examples/ibm-metrics-router/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Example for IBM Cloud Metrics Routing V3 Example
# Example for IBM Cloud Metrics Routing

This example illustrates how to use the MetricsRouterV3

Expand Down
2 changes: 1 addition & 1 deletion examples/ibm-metrics-router/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ variable "metrics_router_target_name" {
default = "my-mr-target"
}
variable "metrics_router_target_destination_crn" {
description = "The CRN of a destination service instance or resource."
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."
type = string
default = "crn:v1:bluemix:public:sysdig-monitor:us-south:a/0be5ad401ae913d8ff665d92680664ed:22222222-2222-2222-2222-222222222222::"
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/IBM/ibm-hpcs-uko-sdk v0.0.20-beta
github.com/IBM/keyprotect-go-client v0.12.2
github.com/IBM/networking-go-sdk v0.42.2
github.com/IBM/platform-services-go-sdk v0.48.1
github.com/IBM/platform-services-go-sdk v0.50.4
github.com/IBM/project-go-sdk v0.0.10
github.com/IBM/push-notifications-go-sdk v0.0.0-20210310100607-5790b96c47f5
github.com/IBM/scc-go-sdk/v5 v5.0.2
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ github.com/IBM/code-engine-go-sdk v0.0.0-20230606173928-4863db061918 h1:RfHezAVs
github.com/IBM/code-engine-go-sdk v0.0.0-20230606173928-4863db061918/go.mod h1:IP6U/1NxgxzPeYdyiEwMaZyzelTw82JGHWl7bY78eQM=
github.com/IBM/container-registry-go-sdk v1.1.0 h1:sYyknIod8R4RJZQqAheiduP6wbSTphE9Ag8ho28yXjc=
github.com/IBM/container-registry-go-sdk v1.1.0/go.mod h1:4TwsCnQtVfZ4Vkapy/KPvQBKFc3VOyUZYkwRU4FTPrs=
github.com/IBM/continuous-delivery-go-sdk v1.1.2 h1:UHwwak2RVTSZGtIV+SjH0vALqSvA+Vwkd1PHAbGgGrc=
github.com/IBM/continuous-delivery-go-sdk v1.1.2/go.mod h1:A9rI1HPbccBBFgwJxXB999yXXpj1l+MnlE+rsxKtxw0=
github.com/IBM/continuous-delivery-go-sdk v1.2.0 h1:FcgB5EvVrZLUnyR4S/mBocHHo9gJ5IQkSlCa6nqmr2A=
github.com/IBM/continuous-delivery-go-sdk v1.2.0/go.mod h1:oW51tS5/MDCcEM7lUvjK1H9GFC/oKsRbyYfmvGyMGmw=
github.com/IBM/event-notifications-go-admin-sdk v0.2.4 h1:WWUxwrKQxvExEK+xaAQOs6gP54LvJDPi3KatDTMfwh0=
Expand Down Expand Up @@ -158,8 +156,8 @@ github.com/IBM/keyprotect-go-client v0.12.2 h1:Cjxcqin9Pl0xz3MnxdiVd4v/eIa79xL3h
github.com/IBM/keyprotect-go-client v0.12.2/go.mod h1:yr8h2noNgU8vcbs+vhqoXp3Lmv73PI0zAc6VMgFvWwM=
github.com/IBM/networking-go-sdk v0.42.2 h1:caqjx4jyFHi10Vlf3skHvlL6K3YJRVstsmCBmvdyqkA=
github.com/IBM/networking-go-sdk v0.42.2/go.mod h1:lTUZwtUkMANMnrLHFIgRhHrkBfwASY/Iho1fabaPHxo=
github.com/IBM/platform-services-go-sdk v0.48.1 h1:TT+v28xaaFDolswhFLc+2ut6KXukoNyJGhlhuJupV7g=
github.com/IBM/platform-services-go-sdk v0.48.1/go.mod h1:6LxcUhIaSLP4SuQJXF9oLXBamSQogs5D9BcVwr4hmfU=
github.com/IBM/platform-services-go-sdk v0.50.4 h1:YQcdFv5+WW+rH1lideBX4fJbPoS3NauUNqtJdxnnKyI=
github.com/IBM/platform-services-go-sdk v0.50.4/go.mod h1:6LxcUhIaSLP4SuQJXF9oLXBamSQogs5D9BcVwr4hmfU=
github.com/IBM/project-go-sdk v0.0.10 h1:vHSuemwZ4S4c6BEb22tzsEcPTs/5LnZ0yKpP3GG/GL8=
github.com/IBM/project-go-sdk v0.0.10/go.mod h1:lqe0M4cKvABI1iHR1b+KfasVcxQL6nl2VJ8eOyQs8Ig=
github.com/IBM/push-notifications-go-sdk v0.0.0-20210310100607-5790b96c47f5 h1:NPUhkoOCRuv3OFWt19PmwjXGGTKlvmbuPg9fUrBUNe4=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func DataSourceIBMMetricsRouterTargets() *schema.Resource {
"destination_crn": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: "The CRN of the destination service instance or resource.",
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.",
},
"target_type": &schema.Schema{
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func ResourceIBMMetricsRouterTarget() *schema.Resource {
Type: schema.TypeString,
Required: true,
ValidateFunc: validate.InvokeValidator("ibm_metrics_router_target", "destination_crn"),
Description: "The CRN of a destination service instance or resource.",
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.",
},
"region": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/atracker_routes.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ subcategory: "Activity Tracker"

# ibm_atracker_routes

Provides a read-only data source for atracker_routes. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.
Provides a read-only data source to retrieve information about atracker_routes. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

## Example Usage

Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/atracker_targets.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ subcategory: "Activity Tracker"

# ibm_atracker_targets

Provides a read-only data source for atracker_targets. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.
Provides a read-only data source to retrieve information about atracker_targets. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

## Example usage

Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/metrics_router_targets.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ In addition to all argument references listed, you can access the following attr
Nested scheme for **targets**:
* `created_at` - (String) The timestamp of the target creation time.
* `crn` - (String) The crn of the target resource.
* `destination_crn` - (String) The CRN of the destination service instance or resource.
* `destination_crn` - (String) 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.
* Constraints: The maximum length is `1000` characters. The minimum length is `3` characters. The value must match regular expression `/^[a-zA-Z0-9 \\-._:\/]+$/`.
* `id` - (String) The UUID of the target resource.
* `name` - (String) The name of the target resource.
Expand Down
Loading