-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add template resource and data source
- Loading branch information
Showing
21 changed files
with
1,912 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "catalystcenter_template Data Source - terraform-provider-catalystcenter" | ||
subcategory: "Templates" | ||
description: |- | ||
This data source can read the Template. | ||
--- | ||
|
||
# catalystcenter_template (Data Source) | ||
|
||
This data source can read the Template. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "catalystcenter_template" "example" { | ||
id = "76d24097-41c4-4558-a4d0-a8c07ac08470" | ||
project_id = "12345678-1234-1234-1234-123456789012" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The id of the object | ||
- `project_id` (String) The ID of the project | ||
|
||
### Read-Only | ||
|
||
- `description` (String) Description | ||
- `device_types` (Attributes List) List of device types (see [below for nested schema](#nestedatt--device_types)) | ||
- `language` (String) Language of the template | ||
- `name` (String) Name of the template | ||
- `software_type` (String) Software type | ||
- `software_variant` (String) Software variant | ||
- `software_version` (String) Software version | ||
- `template_content` (String) Template content | ||
- `template_params` (Attributes List) List of template parameters (see [below for nested schema](#nestedatt--template_params)) | ||
|
||
<a id="nestedatt--device_types"></a> | ||
### Nested Schema for `device_types` | ||
|
||
Read-Only: | ||
|
||
- `product_family` (String) Product family | ||
- `product_series` (String) Product series | ||
- `product_type` (String) Product type | ||
|
||
|
||
<a id="nestedatt--template_params"></a> | ||
### Nested Schema for `template_params` | ||
|
||
Read-Only: | ||
|
||
- `binding` (String) Bind to source | ||
- `data_type` (String) Datatype of template parameter | ||
- `default_selected_values` (List of String) Default selection values | ||
- `default_value` (String) Default value of template parameter | ||
- `description` (String) Description of template parameter | ||
- `display_name` (String) Display name of template parameter | ||
- `instruction_text` (String) Instruction text | ||
- `not_param` (Boolean) Is it not a variable | ||
- `param_array` (Boolean) Is it an array | ||
- `parameter_name` (String) Name of the template parameter | ||
- `ranges` (Attributes List) List of ranges (see [below for nested schema](#nestedatt--template_params--ranges)) | ||
- `required` (Boolean) Is parameter required | ||
- `selection_type` (String) Type of selection | ||
- `selection_values` (Map of String) Selection values | ||
|
||
<a id="nestedatt--template_params--ranges"></a> | ||
### Nested Schema for `template_params.ranges` | ||
|
||
Read-Only: | ||
|
||
- `max_value` (Number) Max value of range | ||
- `min_value` (Number) Min value of range |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "catalystcenter_template Resource - terraform-provider-catalystcenter" | ||
subcategory: "Templates" | ||
description: |- | ||
This resource can manage a Template. | ||
--- | ||
|
||
# catalystcenter_template (Resource) | ||
|
||
This resource can manage a Template. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "catalystcenter_template" "example" { | ||
project_id = "12345678-1234-1234-1234-123456789012" | ||
name = "Template1" | ||
description = "My description" | ||
device_types = [ | ||
{ | ||
product_family = "Switches and Hubs" | ||
product_series = "Cisco Catalyst 9300 Series Switches" | ||
product_type = "Cisco Catalyst 9300 Switch" | ||
} | ||
] | ||
language = "JINJA" | ||
software_type = "IOS-XE" | ||
software_variant = "XE" | ||
software_version = "16.12.1a" | ||
template_content = "hostname {{hostname}}" | ||
template_params = [ | ||
{ | ||
data_type = "STRING" | ||
default_value = "ABC" | ||
description = "My parameter" | ||
display_name = "Custom hostname" | ||
instruction_text = "My instructions" | ||
not_param = false | ||
param_array = false | ||
parameter_name = "hostname" | ||
required = false | ||
selection_type = "SINGLE_SELECT" | ||
selection_values = { host1 = "host1" } | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `device_types` (Attributes List) List of device types (see [below for nested schema](#nestedatt--device_types)) | ||
- `language` (String) Language of the template | ||
- Choices: `JINJA`, `VELOCITY` | ||
- `name` (String) Name of the template | ||
- `project_id` (String) The ID of the project | ||
- `software_type` (String) Software type | ||
|
||
### Optional | ||
|
||
- `description` (String) Description | ||
- `software_variant` (String) Software variant | ||
- `software_version` (String) Software version | ||
- `template_content` (String) Template content | ||
- `template_params` (Attributes List) List of template parameters (see [below for nested schema](#nestedatt--template_params)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The id of the object | ||
|
||
<a id="nestedatt--device_types"></a> | ||
### Nested Schema for `device_types` | ||
|
||
Required: | ||
|
||
- `product_family` (String) Product family | ||
|
||
Optional: | ||
|
||
- `product_series` (String) Product series | ||
- `product_type` (String) Product type | ||
|
||
|
||
<a id="nestedatt--template_params"></a> | ||
### Nested Schema for `template_params` | ||
|
||
Required: | ||
|
||
- `data_type` (String) Datatype of template parameter | ||
- Choices: `STRING`, `INTEGER`, `IPADDRESS`, `MACADDRESS`, `SECTIONDIVIDER` | ||
- `selection_type` (String) Type of selection | ||
- Choices: `SINGLE_SELECT`, `MULTI_SELECT` | ||
|
||
Optional: | ||
|
||
- `binding` (String) Bind to source | ||
- `default_selected_values` (List of String) Default selection values | ||
- `default_value` (String) Default value of template parameter | ||
- `description` (String) Description of template parameter | ||
- `display_name` (String) Display name of template parameter | ||
- `instruction_text` (String) Instruction text | ||
- `not_param` (Boolean) Is it not a variable | ||
- `param_array` (Boolean) Is it an array | ||
- `parameter_name` (String) Name of the template parameter | ||
- `ranges` (Attributes List) List of ranges (see [below for nested schema](#nestedatt--template_params--ranges)) | ||
- `required` (Boolean) Is parameter required | ||
- `selection_values` (Map of String) Selection values | ||
|
||
<a id="nestedatt--template_params--ranges"></a> | ||
### Nested Schema for `template_params.ranges` | ||
|
||
Optional: | ||
|
||
- `max_value` (Number) Max value of range | ||
- `min_value` (Number) Min value of range | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import catalystcenter_template.example "4b0b7a80-44c0-4bf2-bab5-fc24b4e0a17e" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
data "catalystcenter_template" "example" { | ||
id = "76d24097-41c4-4558-a4d0-a8c07ac08470" | ||
project_id = "12345678-1234-1234-1234-123456789012" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import catalystcenter_template.example "4b0b7a80-44c0-4bf2-bab5-fc24b4e0a17e" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
resource "catalystcenter_template" "example" { | ||
project_id = "12345678-1234-1234-1234-123456789012" | ||
name = "Template1" | ||
description = "My description" | ||
device_types = [ | ||
{ | ||
product_family = "Switches and Hubs" | ||
product_series = "Cisco Catalyst 9300 Series Switches" | ||
product_type = "Cisco Catalyst 9300 Switch" | ||
} | ||
] | ||
language = "JINJA" | ||
software_type = "IOS-XE" | ||
software_variant = "XE" | ||
software_version = "16.12.1a" | ||
template_content = "hostname {{hostname}}" | ||
template_params = [ | ||
{ | ||
data_type = "STRING" | ||
default_value = "ABC" | ||
description = "My parameter" | ||
display_name = "Custom hostname" | ||
instruction_text = "My instructions" | ||
not_param = false | ||
param_array = false | ||
parameter_name = "hostname" | ||
required = false | ||
selection_type = "SINGLE_SELECT" | ||
selection_values = { host1 = "host1" } | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.