-
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 network profile resource and data source
- Loading branch information
Showing
15 changed files
with
920 additions
and
30 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,40 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "catalystcenter_network_profile Data Source - terraform-provider-catalystcenter" | ||
subcategory: "Network Settings" | ||
description: |- | ||
This data source can read the Network Profile. | ||
--- | ||
|
||
# catalystcenter_network_profile (Data Source) | ||
|
||
This data source can read the Network Profile. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "catalystcenter_network_profile" "example" { | ||
id = "Profile1" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The id of the object | ||
|
||
### Read-Only | ||
|
||
- `name` (String) The name of the network profile | ||
- `templates` (Attributes List) (see [below for nested schema](#nestedatt--templates)) | ||
- `type` (String) Profile type | ||
|
||
<a id="nestedatt--templates"></a> | ||
### Nested Schema for `templates` | ||
|
||
Read-Only: | ||
|
||
- `template_id` (String) Template ID | ||
- `type` (String) Template type |
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,60 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "catalystcenter_network_profile Resource - terraform-provider-catalystcenter" | ||
subcategory: "Network Settings" | ||
description: |- | ||
This resource can manage a Network Profile. | ||
--- | ||
|
||
# catalystcenter_network_profile (Resource) | ||
|
||
This resource can manage a Network Profile. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "catalystcenter_network_profile" "example" { | ||
name = "Profile1" | ||
type = "switching" | ||
templates = [ | ||
{ | ||
type = "cli.templates" | ||
template_id = "f8297e86-35b0-486c-8752-6169aa5eb43c" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the network profile | ||
- `type` (String) Profile type | ||
- Choices: `switching` | ||
|
||
### Optional | ||
|
||
- `templates` (Attributes List) (see [below for nested schema](#nestedatt--templates)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The id of the object | ||
|
||
<a id="nestedatt--templates"></a> | ||
### Nested Schema for `templates` | ||
|
||
Required: | ||
|
||
- `template_id` (String) Template ID | ||
- `type` (String) Template type | ||
- Choices: `cli.templates`, `day0.templates` | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import catalystcenter_network_profile.example "Profile1" | ||
``` |
3 changes: 3 additions & 0 deletions
3
examples/data-sources/catalystcenter_network_profile/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_network_profile" "example" { | ||
id = "Profile1" | ||
} |
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_network_profile.example "Profile1" |
10 changes: 10 additions & 0 deletions
10
examples/resources/catalystcenter_network_profile/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,10 @@ | ||
resource "catalystcenter_network_profile" "example" { | ||
name = "Profile1" | ||
type = "switching" | ||
templates = [ | ||
{ | ||
type = "cli.templates" | ||
template_id = "f8297e86-35b0-486c-8752-6169aa5eb43c" | ||
} | ||
] | ||
} |
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,45 @@ | ||
--- | ||
name: Network Profile | ||
rest_endpoint: /api/v1/siteprofile | ||
get_extra_query_params: "?populated=true" | ||
id_from_query_path: response | ||
id_from_query_path_attribute: siteProfileUuid | ||
doc_category: Network Settings | ||
attributes: | ||
- model_name: name | ||
response_data_path: response.name | ||
type: String | ||
id: true | ||
description: The name of the network profile | ||
example: Profile1 | ||
- model_name: namespace | ||
tf_name: type | ||
response_data_path: response.namespace | ||
type: String | ||
enum_values: [switching] | ||
mandatory: true | ||
description: Profile type | ||
example: switching | ||
- model_name: profileAttributes | ||
tf_name: templates | ||
response_data_path: response.profileAttributes | ||
type: List | ||
attributes: | ||
- model_name: key | ||
tf_name: type | ||
id: true | ||
type: String | ||
enum_values: [cli.templates, day0.templates] | ||
description: Template type | ||
example: cli.templates | ||
- model_name: key | ||
data_path: attribs.0 | ||
type: String | ||
value: template.id | ||
- model_name: value | ||
tf_name: template_id | ||
data_path: attribs.0 | ||
type: String | ||
id: true | ||
description: Template ID | ||
example: f8297e86-35b0-486c-8752-6169aa5eb43c |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
132 changes: 132 additions & 0 deletions
132
internal/provider/data_source_catalystcenter_network_profile.go
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.