-
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.
- Loading branch information
Showing
16 changed files
with
912 additions
and
3 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,36 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "catalystcenter_assign_credentials Data Source - terraform-provider-catalystcenter" | ||
subcategory: "Network Settings" | ||
description: |- | ||
This data source can read the assigned credentials of a site. | ||
--- | ||
|
||
# catalystcenter_assign_credentials (Data Source) | ||
|
||
This data source can read the assigned credentials of a site. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "catalystcenter_assign_credentials" "example" { | ||
id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The id of the object | ||
- `site_id` (String) The site ID | ||
|
||
### Read-Only | ||
|
||
- `cli_id` (String) The ID of the CLI credentials | ||
- `https_read` (String) The ID of the HTTPS read credentials | ||
- `https_write` (String) The ID of the HTTPS write credentials | ||
- `snmp_v2_read_id` (String) The ID of the SNMPv2 read credentials | ||
- `snmp_v2_write_id` (String) The ID of the SNMPv2 write credentials | ||
- `snmp_v3_id` (String) The ID of the SNMPv3 credentials |
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,49 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "catalystcenter_assign_credentials Resource - terraform-provider-catalystcenter" | ||
subcategory: "Network Settings" | ||
description: |- | ||
This resource can manage the assigned credentials of a site. | ||
--- | ||
|
||
# catalystcenter_assign_credentials (Resource) | ||
|
||
This resource can manage the assigned credentials of a site. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "catalystcenter_assign_credentials" "example" { | ||
site_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" | ||
cli_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" | ||
https_read = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `site_id` (String) The site ID | ||
|
||
### Optional | ||
|
||
- `cli_id` (String) The ID of the CLI credentials | ||
- `https_read` (String) The ID of the HTTPS read credentials | ||
- `https_write` (String) The ID of the HTTPS write credentials | ||
- `snmp_v2_read_id` (String) The ID of the SNMPv2 read credentials | ||
- `snmp_v2_write_id` (String) The ID of the SNMPv2 write credentials | ||
- `snmp_v3_id` (String) The ID of the SNMPv3 credentials | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The id of the object | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import catalystcenter_assign_credentials.example "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" | ||
``` |
3 changes: 3 additions & 0 deletions
3
examples/data-sources/catalystcenter_assign_credentials/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_assign_credentials" "example" { | ||
id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" | ||
} |
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_assign_credentials.example "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" |
5 changes: 5 additions & 0 deletions
5
examples/resources/catalystcenter_assign_credentials/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,5 @@ | ||
resource "catalystcenter_assign_credentials" "example" { | ||
site_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" | ||
cli_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" | ||
https_read = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" | ||
} |
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,80 @@ | ||
--- | ||
name: Assign Credentials | ||
rest_endpoint: /dna/intent/api/v2/credential-to-site | ||
get_rest_endpoint: /api/v1/commonsetting/global | ||
get_requires_id: true | ||
post_update: true | ||
no_delete: true | ||
ds_description: This data source can read the assigned credentials of a site. | ||
res_description: This resource can manage the assigned credentials of a site. | ||
doc_category: Network Settings | ||
attributes: | ||
- model_name: siteId | ||
type: String | ||
query_param: true | ||
id: true | ||
description: The site ID | ||
example: 5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1 | ||
test_value: catalystcenter_area.test.id | ||
- model_name: cliId | ||
response_data_path: 'response.#(key=\"credential.cli\").value.0.objReferences.0' | ||
type: String | ||
description: The ID of the CLI credentials | ||
example: 5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1 | ||
test_value: catalystcenter_credentials_cli.test.id | ||
minimum_test_value: catalystcenter_credentials_cli.test.id | ||
- model_name: snmpV2ReadId | ||
response_data_path: 'response.#(key=\"credential.snmp_v2_read\").value.0.objReferences.0' | ||
type: String | ||
description: The ID of the SNMPv2 read credentials | ||
example: 5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1 | ||
exclude_test: true | ||
- model_name: snmpV2WriteId | ||
response_data_path: 'response.#(key=\"credential.snmp_v2_write\").value.0.objReferences.0' | ||
type: String | ||
description: The ID of the SNMPv2 write credentials | ||
example: 5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1 | ||
exclude_test: true | ||
- model_name: snmpV3Id | ||
response_data_path: 'response.#(key=\"credential.snmp_v3\").value.0.objReferences.0' | ||
type: String | ||
description: The ID of the SNMPv3 credentials | ||
example: 5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1 | ||
exclude_test: true | ||
- model_name: httpRead | ||
response_data_path: 'response.#(key=\"credential.http.read\").value.0.objReferences.0' | ||
tf_name: https_read | ||
type: String | ||
description: The ID of the HTTPS read credentials | ||
example: 5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1 | ||
test_value: catalystcenter_credentials_https_read.test.id | ||
- model_name: httpWrite | ||
response_data_path: 'response.#(key=\"credential.http.write\").value.0.objReferences.0' | ||
tf_name: https_write | ||
type: String | ||
description: The ID of the HTTPS write credentials | ||
example: 5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1 | ||
exclude_test: true | ||
|
||
test_prerequisites: | | ||
resource "catalystcenter_area" "test" { | ||
name = "Area1" | ||
parent_name = "Global" | ||
depends_on = [ | ||
catalystcenter_credentials_cli.test, | ||
catalystcenter_credentials_https_read.test, | ||
] | ||
} | ||
resource "catalystcenter_credentials_cli" "test" { | ||
description = "TestCli1" | ||
username = "user1" | ||
password = "password1" | ||
} | ||
resource "catalystcenter_credentials_https_read" "test" { | ||
description = "TestHttpsRead1" | ||
username = "user1" | ||
password = "password1" | ||
} | ||
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
136 changes: 136 additions & 0 deletions
136
internal/provider/data_source_catalystcenter_assign_credentials.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.