Skip to content

Commit

Permalink
Enable data source name query option of ip to sgt mapping resource
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Oct 28, 2023
1 parent ab9bc1b commit db9dafe
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 32 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.1.4 (unreleased)

- Add `ise_trustsec_ip_to_sgt_mapping` resource and data source
- Add `ise_trustsec_ip_to_sgt_mapping_group` resource and data source

## 0.1.3

- Add support for nested conditions to `ise_network_access_authentication_rule` resource and data source
Expand Down
14 changes: 7 additions & 7 deletions docs/data-sources/trustsec_ip_to_sgt_mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ data "ise_trustsec_ip_to_sgt_mapping" "example" {
<!-- schema generated by tfplugindocs -->
## Schema

### Required
### Optional

- `id` (String) The id of the object
- `name` (String) The name of the IP to SGT mapping

### Read-Only

- `deploy_to` (String) Mandatory unless mappingGroup is set or unless `deployType=ALL`
- `deploy_to` (String) Mandatory unless `mapping_group` is set or unless `deploy_type` is `ALL`
- `deploy_type` (String) Deploy Type
- `description` (String) Description
- `host_ip` (String) Mandatory if hostName is empty -- valid IP
- `host_name` (String) Mandatory if hostIp is empty
- `mapping_group` (String) IP to SGT Mapping Group ID. Mandatory unless sgt and deployTo and deployType are set
- `name` (String) The name of the IP to SGT mapping
- `sgt` (String) Trustsec Security Group ID. Mandatory unless mappingGroup is set
- `host_ip` (String) Mandatory if `host_name` is empty
- `host_name` (String) Mandatory if `host_ip` is empty
- `mapping_group` (String) IP to SGT Mapping Group ID. Mandatory unless `sgt` and `deploy_to` and `deploy_type` are set
- `sgt` (String) Trustsec Security Group ID. Mandatory unless `mapping_group` is set
5 changes: 5 additions & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ description: |-

# Changelog

## 0.1.4 (unreleased)

- Add `ise_trustsec_ip_to_sgt_mapping` resource and data source
- Add `ise_trustsec_ip_to_sgt_mapping_group` resource and data source

## 0.1.3

- Add support for nested conditions to `ise_network_access_authentication_rule` resource and data source
Expand Down
10 changes: 5 additions & 5 deletions docs/resources/trustsec_ip_to_sgt_mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ resource "ise_trustsec_ip_to_sgt_mapping" "example" {

### Optional

- `deploy_to` (String) Mandatory unless mappingGroup is set or unless `deployType=ALL`
- `deploy_to` (String) Mandatory unless `mapping_group` is set or unless `deploy_type` is `ALL`
- `deploy_type` (String) Deploy Type
- Choices: `ALL`, `ND`, `NDG`
- `description` (String) Description
- `host_ip` (String) Mandatory if hostName is empty -- valid IP
- `host_name` (String) Mandatory if hostIp is empty
- `mapping_group` (String) IP to SGT Mapping Group ID. Mandatory unless sgt and deployTo and deployType are set
- `sgt` (String) Trustsec Security Group ID. Mandatory unless mappingGroup is set
- `host_ip` (String) Mandatory if `host_name` is empty
- `host_name` (String) Mandatory if `host_ip` is empty
- `mapping_group` (String) IP to SGT Mapping Group ID. Mandatory unless `sgt` and `deploy_to` and `deploy_type` are set
- `sgt` (String) Trustsec Security Group ID. Mandatory unless `mapping_group` is set

### Read-Only

Expand Down
12 changes: 7 additions & 5 deletions gen/definitions/trustsec_ip_to_sgt_mapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: TrustSec IP to SGT Mapping
rest_endpoint: /ers/config/sgmapping
doc_category: TrustSec
data_source_name_query: true
id_path: response.id
attributes:
- model_name: name
Expand All @@ -18,7 +19,7 @@ attributes:
- model_name: deployTo
data_path: [SGMapping]
type: String
description: "Mandatory unless mappingGroup is set or unless `deployType=ALL`"
description: "Mandatory unless `mapping_group` is set or unless `deploy_type` is `ALL`"
exclude_test: true
example: "All Locations"
- model_name: deployType
Expand All @@ -31,26 +32,27 @@ attributes:
- model_name: hostName
data_path: [SGMapping]
type: String
description: Mandatory if hostIp is empty
description: Mandatory if `host_ip` is empty
example: "server1.cisco.com"
exclude_test: true
- model_name: hostIp
data_path: [SGMapping]
type: String
description: Mandatory if hostName is empty -- valid IP
description: Mandatory if `host_name` is empty
example: "10.0.0.1/32"
minimum_test_value: '"10.0.0.1/32"'
- model_name: sgt
data_path: [SGMapping]
type: String
example: "93e1bf00-8c01-11e6-996c-525400b48521"
test_value: ise_trustsec_security_group.test.id
minimum_test_value: ise_trustsec_security_group.test.id
description: Trustsec Security Group ID. Mandatory unless mappingGroup is set
description: Trustsec Security Group ID. Mandatory unless `mapping_group` is set
- model_name: mappingGroup
data_path: [SGMapping]
type: String
example: "48fc1ac2-d500-493d-99ad-8d8fab0ef11f"
description: IP to SGT Mapping Group ID. Mandatory unless sgt and deployTo and deployType are set
description: IP to SGT Mapping Group ID. Mandatory unless `sgt` and `deploy_to` and `deploy_type` are set
exclude_test: true

test_prerequisites: |
Expand Down
53 changes: 47 additions & 6 deletions internal/provider/data_source_ise_trustsec_ip_to_sgt_mapping.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions internal/provider/resource_ise_trustsec_ip_to_sgt_mapping.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions templates/guides/changelog.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ description: |-

# Changelog

## 0.1.4 (unreleased)

- Add `ise_trustsec_ip_to_sgt_mapping` resource and data source
- Add `ise_trustsec_ip_to_sgt_mapping_group` resource and data source

## 0.1.3

- Add support for nested conditions to `ise_network_access_authentication_rule` resource and data source
Expand Down

0 comments on commit db9dafe

Please sign in to comment.