diff --git a/CHANGELOG.md b/CHANGELOG.md index 06ddc186..01b2c642 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.14 (unreleased) + +- Add `sdwan_transport_tracker_profile_parcel` resource and data source + ## 0.3.13 - Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated diff --git a/docs/data-sources/transport_tracker_profile_parcel.md b/docs/data-sources/transport_tracker_profile_parcel.md new file mode 100644 index 00000000..9115427d --- /dev/null +++ b/docs/data-sources/transport_tracker_profile_parcel.md @@ -0,0 +1,52 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "sdwan_transport_tracker_profile_parcel Data Source - terraform-provider-sdwan" +subcategory: "Profile Parcels" +description: |- + This data source can read the Transport Tracker profile parcel. +--- + +# sdwan_transport_tracker_profile_parcel (Data Source) + +This data source can read the Transport Tracker profile parcel. + +## Example Usage + +```terraform +data "sdwan_transport_tracker_profile_parcel" "example" { + id = "f6b2c44c-693c-4763-b010-895aa3d236bd" + feature_profile_id = "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac" +} +``` + + +## Schema + +### Required + +- `feature_profile_id` (String) Feature Profile ID +- `id` (String) The id of the profile parcel + +### Read-Only + +- `description` (String) The description of the profile parcel +- `endpoint_api_url` (String) API url of endpoint +- `endpoint_api_url_variable` (String) Variable name +- `endpoint_dns_name` (String) Endpoint DNS Name +- `endpoint_dns_name_variable` (String) Variable name +- `endpoint_ip` (String) Endpoint IP +- `endpoint_ip_variable` (String) Variable name +- `endpoint_tracker_type` (String) Endpoint Tracker Type +- `endpoint_tracker_type_variable` (String) Variable name +- `interval` (Number) Interval +- `interval_variable` (String) Variable name +- `multiplier` (Number) Multiplier +- `multiplier_variable` (String) Variable name +- `name` (String) The name of the profile parcel +- `threshold` (Number) Threshold +- `threshold_variable` (String) Variable name +- `tracker_name` (String) Tracker Name +- `tracker_name_variable` (String) Variable name +- `tracker_type` (String) Tracker Type +- `tracker_type_variable` (String) Variable name +- `version` (Number) The version of the profile parcel diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index 776fbd5a..b427ee30 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.3.14 (unreleased) + +- Add `sdwan_transport_tracker_profile_parcel` resource and data source + ## 0.3.13 - Add workaround for issue when concurrently deleting security policy objects where the reference count is not updated diff --git a/docs/resources/transport_tracker_profile_parcel.md b/docs/resources/transport_tracker_profile_parcel.md new file mode 100644 index 00000000..cac28b7a --- /dev/null +++ b/docs/resources/transport_tracker_profile_parcel.md @@ -0,0 +1,85 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "sdwan_transport_tracker_profile_parcel Resource - terraform-provider-sdwan" +subcategory: "Profile Parcels" +description: |- + This resource can manage a Transport Tracker profile parcel. + Minimum SD-WAN Manager version: 20.12.0 +--- + +# sdwan_transport_tracker_profile_parcel (Resource) + +This resource can manage a Transport Tracker profile parcel. + - Minimum SD-WAN Manager version: `20.12.0` + +## Example Usage + +```terraform +resource "sdwan_transport_tracker_profile_parcel" "example" { + name = "Example" + description = "My Example" + feature_profile_id = "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac" + tracker_name = "TRACKER_1" + endpoint_api_url = "google.com" + endpoint_dns_name = "google.com" + endpoint_ip = "1.2.3.4" + interval = 30 + multiplier = 3 + threshold = 300 + endpoint_tracker_type = "interface" + tracker_type = "endpoint" +} +``` + + +## Schema + +### Required + +- `feature_profile_id` (String) Feature Profile ID +- `name` (String) The name of the profile parcel + +### Optional + +- `description` (String) The description of the profile parcel +- `endpoint_api_url` (String) API url of endpoint +- `endpoint_api_url_variable` (String) Variable name +- `endpoint_dns_name` (String) Endpoint DNS Name +- `endpoint_dns_name_variable` (String) Variable name +- `endpoint_ip` (String) Endpoint IP +- `endpoint_ip_variable` (String) Variable name +- `endpoint_tracker_type` (String) Endpoint Tracker Type + - Choices: `interface` + - Default value: `interface` +- `endpoint_tracker_type_variable` (String) Variable name +- `interval` (Number) Interval + - Range: `20`-`600` + - Default value: `60` +- `interval_variable` (String) Variable name +- `multiplier` (Number) Multiplier + - Range: `1`-`10` + - Default value: `3` +- `multiplier_variable` (String) Variable name +- `threshold` (Number) Threshold + - Range: `100`-`1000` + - Default value: `300` +- `threshold_variable` (String) Variable name +- `tracker_name` (String) Tracker Name +- `tracker_name_variable` (String) Variable name +- `tracker_type` (String) Tracker Type + - Choices: `endpoint`, `object` + - Default value: `endpoint` +- `tracker_type_variable` (String) Variable name + +### Read-Only + +- `id` (String) The id of the profile parcel +- `version` (Number) The version of the profile parcel + +## Import + +Import is supported using the following syntax: + +```shell +terraform import sdwan_transport_tracker_profile_parcel.example "f6b2c44c-693c-4763-b010-895aa3d236bd" +``` diff --git a/examples/data-sources/sdwan_transport_tracker_profile_parcel/data-source.tf b/examples/data-sources/sdwan_transport_tracker_profile_parcel/data-source.tf new file mode 100644 index 00000000..fc31d4f7 --- /dev/null +++ b/examples/data-sources/sdwan_transport_tracker_profile_parcel/data-source.tf @@ -0,0 +1,4 @@ +data "sdwan_transport_tracker_profile_parcel" "example" { + id = "f6b2c44c-693c-4763-b010-895aa3d236bd" + feature_profile_id = "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac" +} diff --git a/examples/resources/sdwan_transport_tracker_profile_parcel/import.sh b/examples/resources/sdwan_transport_tracker_profile_parcel/import.sh new file mode 100644 index 00000000..bdac8a05 --- /dev/null +++ b/examples/resources/sdwan_transport_tracker_profile_parcel/import.sh @@ -0,0 +1 @@ +terraform import sdwan_transport_tracker_profile_parcel.example "f6b2c44c-693c-4763-b010-895aa3d236bd" diff --git a/examples/resources/sdwan_transport_tracker_profile_parcel/resource.tf b/examples/resources/sdwan_transport_tracker_profile_parcel/resource.tf new file mode 100644 index 00000000..ccd04e4c --- /dev/null +++ b/examples/resources/sdwan_transport_tracker_profile_parcel/resource.tf @@ -0,0 +1,14 @@ +resource "sdwan_transport_tracker_profile_parcel" "example" { + name = "Example" + description = "My Example" + feature_profile_id = "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac" + tracker_name = "TRACKER_1" + endpoint_api_url = "google.com" + endpoint_dns_name = "google.com" + endpoint_ip = "1.2.3.4" + interval = 30 + multiplier = 3 + threshold = 300 + endpoint_tracker_type = "interface" + tracker_type = "endpoint" +} diff --git a/gen/definitions/profile_parcels/transport_tracker.yaml b/gen/definitions/profile_parcels/transport_tracker.yaml new file mode 100644 index 00000000..83287594 --- /dev/null +++ b/gen/definitions/profile_parcels/transport_tracker.yaml @@ -0,0 +1,38 @@ +--- +name: Transport Tracker +rest_endpoint: /v1/feature-profile/sdwan/transport/%v/tracker +minimum_version: 20.12.0 +test_tags: [SDWAN_2012] +attributes: + - tf_name: feature_profile_id + reference: true + type: String + mandatory: true + description: Feature Profile ID + example: f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac + test_value: sdwan_transport_feature_profile.test.id + - model_name: trackerName + example: TRACKER_1 + minimum_test_value: '"TRACKER_1"' + - model_name: endpointApiUrl + example: google.com + - model_name: endpointDnsName + example: google.com + - model_name: endpointIp + example: 1.2.3.4 + - model_name: interval + example: 30 + - model_name: multiplier + example: 3 + - model_name: threshold + example: 300 + - model_name: endpointTrackerType + example: interface + - model_name: trackerType + example: endpoint + +test_prerequisites: | + resource "sdwan_transport_feature_profile" "test" { + name = "TF_TEST" + description = "Terraform test" + } \ No newline at end of file diff --git a/gen/models/profile_parcels/transport_tracker.json b/gen/models/profile_parcels/transport_tracker.json new file mode 100644 index 00000000..fbbe7f2f --- /dev/null +++ b/gen/models/profile_parcels/transport_tracker.json @@ -0,0 +1,608 @@ +{ + "request": { + "$schema": "http://json-schema.org/draft/2019-09/schema", + "$id": "https://cisco.com/schema/profileparcel/sdwan/transport/tracker/common/request_schema.json", + "title": "WAN tracker Schema", + "description": "Tracker profile parcel schema for common request", + "type": "object", + "properties": { + "name": { + "description": "Set the parcel name", + "type": "string", + "pattern": "^[^&<>! \"]+$", + "minLength": 1, + "maxLength": 128 + }, + "description": { + "description": "Set the parcel description", + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "trackerName": { + "description": "Tracker Name", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "minLength": 1, + "maxLength": 128, + "pattern": "^[^