-
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.
Minor fixes and added deploy template definition (#37)
- Loading branch information
1 parent
3bc677e
commit db091e5
Showing
21 changed files
with
1,502 additions
and
21 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
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,102 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "catalystcenter_deploy_template Resource - terraform-provider-catalystcenter" | ||
subcategory: "Templates" | ||
description: |- | ||
This resource can manage a Deploy Template. | ||
--- | ||
|
||
# catalystcenter_deploy_template (Resource) | ||
|
||
This resource can manage a Deploy Template. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "catalystcenter_deploy_template" "example" { | ||
template_id = "12345678-1234-1234-1234-123456789012" | ||
force_push_template = false | ||
is_composite = false | ||
target_info = [ | ||
{ | ||
host_name = "SW01" | ||
type = "MANAGED_DEVICE_HOSTNAME" | ||
versioned_template_id = "12345678-1234-1234-1234-123456789012" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `target_info` (Attributes List) Target info to deploy template (see [below for nested schema](#nestedatt--target_info)) | ||
- `template_id` (String) UUID of template to be provisioned | ||
|
||
### Optional | ||
|
||
- `force_push_template` (Boolean) Force Push Template | ||
- `is_composite` (Boolean) Composite template flag | ||
- `main_template_id` (String) Composite Template ID | ||
- `member_template_deployment_info` (Attributes List) Member Template Deployment Info (see [below for nested schema](#nestedatt--member_template_deployment_info)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The id of the object | ||
|
||
<a id="nestedatt--target_info"></a> | ||
### Nested Schema for `target_info` | ||
|
||
Required: | ||
|
||
- `type` (String) Target type of device | ||
- Choices: `MANAGED_DEVICE_IP`, `MANAGED_DEVICE_UUID`, `PRE_PROVISIONED_SERIAL`, `PRE_PROVISIONED_MAC`, `DEFAULT`, `MANAGED_DEVICE_HOSTNAME` | ||
- `versioned_template_id` (String) Versioned templateUUID to be provisioned | ||
|
||
Optional: | ||
|
||
- `host_name` (String) Hostname of device is required if targetType is MANAGED_DEVICE_HOSTNAME | ||
- `id` (String) UUID of target is required if targetType is MANAGED_DEVICE_UUID | ||
- `params` (Map of String) Template params/values to be provisioned | ||
- `resource_params` (Map of String) Resource params to be provisioned | ||
|
||
|
||
<a id="nestedatt--member_template_deployment_info"></a> | ||
### Nested Schema for `member_template_deployment_info` | ||
|
||
Required: | ||
|
||
- `target_info` (Attributes List) Target info to deploy template (see [below for nested schema](#nestedatt--member_template_deployment_info--target_info)) | ||
- `template_id` (String) UUID of template to be provisioned | ||
|
||
Optional: | ||
|
||
- `force_push_template` (Boolean) Force Push Template | ||
- `is_composite` (Boolean) Composite template flag | ||
- `main_template_id` (String) Composite Template ID | ||
|
||
<a id="nestedatt--member_template_deployment_info--target_info"></a> | ||
### Nested Schema for `member_template_deployment_info.target_info` | ||
|
||
Required: | ||
|
||
- `type` (String) Target type of device | ||
- Choices: `MANAGED_DEVICE_IP`, `MANAGED_DEVICE_UUID`, `PRE_PROVISIONED_SERIAL`, `PRE_PROVISIONED_MAC`, `DEFAULT`, `MANAGED_DEVICE_HOSTNAME` | ||
- `versioned_template_id` (String) Versioned templateUUID to be provisioned | ||
|
||
Optional: | ||
|
||
- `host_name` (String) Hostname of device is required if targetType is MANAGED_DEVICE_HOSTNAME | ||
- `id` (String) UUID of target is required if targetType is MANAGED_DEVICE_UUID | ||
- `params` (Map of String) Template params/values to be provisioned | ||
- `resource_params` (Map of String) Resource params to be provisioned | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import catalystcenter_deploy_template.example "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
3 changes: 3 additions & 0 deletions
3
examples/data-sources/catalystcenter_deploy_template/data-source.tf
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,3 @@ | ||
data "catalystcenter_deploy_template" "example" { | ||
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_deploy_template.example "12345678-1234-1234-1234-123456789012" |
12 changes: 12 additions & 0 deletions
12
examples/resources/catalystcenter_deploy_template/resource.tf
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,12 @@ | ||
resource "catalystcenter_deploy_template" "example" { | ||
template_id = "12345678-1234-1234-1234-123456789012" | ||
force_push_template = false | ||
is_composite = false | ||
target_info = [ | ||
{ | ||
host_name = "SW01" | ||
type = "MANAGED_DEVICE_HOSTNAME" | ||
versioned_template_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
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,146 @@ | ||
--- | ||
name: Deploy Template | ||
rest_endpoint: /dna/intent/api/v2/template-programmer/template/deploy | ||
no_delete: true | ||
no_update: true | ||
no_read: true | ||
no_import: true | ||
no_data_source: true | ||
skip_minimum_test: true | ||
doc_category: Templates | ||
test_tags: [TEMPLATES] | ||
attributes: | ||
- model_name: templateId | ||
type: String | ||
id: true | ||
description: ID of template to be provisioned | ||
test_value: catalystcenter_template_version.example.id | ||
example: 12345678-1234-1234-1234-123456789012 | ||
- model_name: forcePushTemplate | ||
type: Bool | ||
description: Force Push Template | ||
example: false | ||
- model_name: isComposite | ||
type: Bool | ||
description: Composite template flag | ||
example: false | ||
- model_name: mainTemplateId | ||
type: String | ||
description: Composite Template ID | ||
exclude_test: true | ||
- model_name: memberTemplateDeploymentInfo | ||
type: List | ||
description: Member Template Deployment Info | ||
exclude_test: true | ||
attributes: | ||
- model_name: templateId | ||
type: String | ||
id: true | ||
description: ID of template to be provisioned | ||
- model_name: forcePushTemplate | ||
type: Bool | ||
description: Force Push Template | ||
- model_name: isComposite | ||
type: Bool | ||
description: Composite template flag | ||
- model_name: mainTemplateId | ||
type: String | ||
description: Composite Template ID | ||
- model_name: targetInfo | ||
type: List | ||
mandatory: true | ||
description: Target info to deploy template | ||
attributes: | ||
- model_name: hostName | ||
type: String | ||
description: Hostname of device is required if targetType is MANAGED_DEVICE_HOSTNAME | ||
- model_name: id | ||
type: String | ||
description: UUID of target is required if targetType is MANAGED_DEVICE_UUID | ||
- model_name: params | ||
type: Map | ||
description: Template params/values to be provisioned | ||
- model_name: resourceParams | ||
type: Map | ||
description: Resource params to be provisioned | ||
- model_name: type | ||
type: String | ||
enum_values: | ||
- MANAGED_DEVICE_IP | ||
- MANAGED_DEVICE_UUID | ||
- PRE_PROVISIONED_SERIAL | ||
- PRE_PROVISIONED_MAC | ||
- DEFAULT | ||
- MANAGED_DEVICE_HOSTNAME | ||
mandatory: true | ||
description: Target type of device | ||
- model_name: versionedTemplateId | ||
type: String | ||
mandatory: true | ||
description: Versioned template ID to be provisioned | ||
- model_name: targetInfo | ||
type: List | ||
mandatory: true | ||
description: Target info to deploy template | ||
attributes: | ||
- model_name: hostName | ||
type: String | ||
description: Hostname of device is required if targetType is MANAGED_DEVICE_HOSTNAME | ||
example: SW01 | ||
- model_name: id | ||
type: String | ||
description: ID of device is required if `type` is MANAGED_DEVICE_UUID | ||
exclude_test: true | ||
- model_name: params | ||
type: Map | ||
description: Template params/values to be provisioned | ||
exclude_test: true | ||
- model_name: resourceParams | ||
type: Map | ||
description: Resource params to be provisioned | ||
exclude_test: true | ||
- model_name: type | ||
type: String | ||
enum_values: | ||
- MANAGED_DEVICE_IP | ||
- MANAGED_DEVICE_UUID | ||
- PRE_PROVISIONED_SERIAL | ||
- PRE_PROVISIONED_MAC | ||
- DEFAULT | ||
- MANAGED_DEVICE_HOSTNAME | ||
mandatory: true | ||
description: Target type of device | ||
example: MANAGED_DEVICE_HOSTNAME | ||
- model_name: versionedTemplateId | ||
type: String | ||
mandatory: true | ||
description: Versioned template ID to be provisioned | ||
example: 12345678-1234-1234-1234-123456789012 | ||
test_value: catalystcenter_template_version.example.id | ||
test_prerequisites: | | ||
resource "catalystcenter_project" "test" { | ||
name = "Project1" | ||
} | ||
resource "catalystcenter_template" "test" { | ||
project_id = catalystcenter_project.test.id | ||
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 SW1" | ||
} | ||
resource "catalystcenter_template_version" "example" { | ||
template_id = catalystcenter_template.test.id | ||
comments = "New Version" | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.