Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Resource and Datasource for Host Path Selector (infraHPathS) (DCNE-156) #1244

Merged
merged 11 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions docs/data-sources/access_interface_override.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
# Documentation generated by "gen/generator.go"; DO NOT EDIT.
# In order to regenerate this file execute `go generate` from the repository root.
# More details can be found in the [README](https://github.com/CiscoDevNet/terraform-provider-aci/blob/master/README.md).
subcategory: "Access Policies"
layout: "aci"
page_title: "ACI: aci_access_interface_override"
sidebar_current: "docs-aci-data-source-aci_access_interface_override"
description: |-
Data source for ACI Access Interface Override
---

# aci_access_interface_override #

Data source for ACI Access Interface Override

## API Information ##

* Class: [infraHPathS](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/infraHPathS/overview)

* Supported in ACI versions: 1.1(1j) and later.

* Distinguished Name Format: `uni/infra/hpaths-{name}`

## GUI Information ##

* Locations:
- `Fabric -> Access Policies -> Interfaces -> Leaf Interfaces -> Overrides`
- `Fabric -> Access Policies -> Interfaces -> Spine Interfaces -> Overrides`

## Example Usage ##

```hcl

data "aci_access_interface_override" "example" {
name = "host_path_selector"
}

```

## Schema ##

### Required ###

* `parent_dn` - (string) The distinguished name (DN) of the parent object, possible resources:
- The distinguished name (DN) of classes below can be used but currently there is no available resource for it:
- [infraInfra](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/infraInfra/overview)

- Default: `uni/infra`

* `name` (name) - (string) The name of the Access Interface Override object.

### Read-Only ###

* `id` - (string) The distinguished name (DN) of the Access Interface Override object.
* `annotation` (annotation) - (string) The annotation of the Access Interface Override object.
* `description` (descr) - (string) The description of the Access Interface Override object.
* `name_alias` (nameAlias) - (string) The name alias of the Access Interface Override object.
* `owner_key` (ownerKey) - (string) The key for enabling clients to own their data for entity correlation.
* `owner_tag` (ownerTag) - (string) A tag for enabling clients to add their own data. For example, to indicate who created this object.

* `relation_to_host_path` - (list) A list of Relation To Host Path (ACI object [infraRsHPathAtt](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/infraRsHPathAtt/overview)) pointing to (ACI Object [fabricPathEp](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fabricPathEp/overview)).
* `annotation` (annotation) - (string) The annotation of the Relation To Host Path object.
* `target_dn` (tDn) - (string) The distinguished name of the target.

* `relation_to_access_interface_policy_group` - (list) A list of Relation To Access Interface Policy Group (ACI object [infraRsPathToAccBaseGrp](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/infraRsPathToAccBaseGrp/overview)) pointing to (ACI Object [infraAccBaseGrp](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/infraAccBaseGrp/overview)).
* `annotation` (annotation) - (string) The annotation of the Relation To Access Interface Policy Group object.
* `target_dn` (tDn) - (string) The distinguished name of the target.

* `annotations` - (list) A list of Annotations (ACI object [tagAnnotation](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/tagAnnotation/overview)). This attribute is supported in ACI versions: 3.2(1l) and later.
* `key` (key) - (string) The key used to uniquely identify this configuration object.
* `value` (value) - (string) The value of the property.

* `tags` - (list) A list of Tags (ACI object [tagTag](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/tagTag/overview)). This attribute is supported in ACI versions: 3.2(1l) and later.
* `key` (key) - (string) The key used to uniquely identify this configuration object.
* `value` (value) - (string) The value of the property.
163 changes: 163 additions & 0 deletions docs/resources/access_interface_override.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
---
# Documentation generated by "gen/generator.go"; DO NOT EDIT.
# In order to regenerate this file execute `go generate` from the repository root.
# More details can be found in the [README](https://github.com/CiscoDevNet/terraform-provider-aci/blob/master/README.md).
subcategory: "Access Policies"
layout: "aci"
page_title: "ACI: aci_access_interface_override"
sidebar_current: "docs-aci-resource-aci_access_interface_override"
description: |-
Manages ACI Access Interface Override
---

# aci_access_interface_override #

Manages ACI Access Interface Override



## API Information ##

* Class: [infraHPathS](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/infraHPathS/overview)

* Supported in ACI versions: 1.1(1j) and later.

* Distinguished Name Format: `uni/infra/hpaths-{name}`

## GUI Information ##

* Locations:
- `Fabric -> Access Policies -> Interfaces -> Leaf Interfaces -> Overrides`
- `Fabric -> Access Policies -> Interfaces -> Spine Interfaces -> Overrides`

## Example Usage ##

The configuration snippet below creates a Access Interface Override with only required attributes.

```hcl

resource "aci_access_interface_override" "example" {
name = "host_path_selector"
}

```
The configuration snippet below shows all possible attributes of the Access Interface Override.

!> This example might not be valid configuration and is only used to show all possible attributes.

```hcl

resource "aci_access_interface_override" "full_example" {
annotation = "annotation"
description = "description_1"
name = "host_path_selector"
name_alias = "name_alias_1"
owner_key = "owner_key_1"
owner_tag = "owner_tag_1"
relation_to_host_path = [
{
annotation = "annotation_1"
target_dn = "topology/pod-1/paths-101/pathep-[eth1/1]"
}
]
relation_to_access_interface_policy_group = [
{
annotation = "annotation_1"
target_dn = "uni/infra/funcprof/accportgrp-access_interface_policy_group"
}
]
annotations = [
{
key = "key_0"
value = "value_1"
}
]
tags = [
{
key = "key_0"
value = "value_1"
}
]
}

```

All examples for the Access Interface Override resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_access_interface_override) folder.

## Schema ##

### Required ###

* `name` (name) - (string) The name of the Access Interface Override object.

### Read-Only ###

* `id` - (string) The distinguished name (DN) of the Access Interface Override object.

### Optional ###
* `parent_dn` - (string) The distinguished name (DN) of the parent object, possible resources:
- The distinguished name (DN) of classes below can be used but currently there is no available resource for it:
- [infraInfra](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/infraInfra/overview)

- Default: `uni/infra`

* `annotation` (annotation) - (string) The annotation of the Access Interface Override object.
- Default: `orchestrator:terraform`
* `description` (descr) - (string) The description of the Access Interface Override object.
* `name_alias` (nameAlias) - (string) The name alias of the Access Interface Override object.
* `owner_key` (ownerKey) - (string) The key for enabling clients to own their data for entity correlation.
* `owner_tag` (ownerTag) - (string) A tag for enabling clients to add their own data. For example, to indicate who created this object.

* `relation_to_host_path` - (list) A list of Relation To Host Path (ACI object [infraRsHPathAtt](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/infraRsHPathAtt/overview)) pointing to (ACI Object [fabricPathEp](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fabricPathEp/overview)).
- Max Items: 1

#### Required ####

* `target_dn` (tDn) - (string) The distinguished name of the target.

#### Optional ####

* `annotation` (annotation) - (string) The annotation of the Relation To Host Path object.
- Default: `orchestrator:terraform`

* `relation_to_access_interface_policy_group` - (list) A list of Relation To Access Interface Policy Group (ACI object [infraRsPathToAccBaseGrp](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/infraRsPathToAccBaseGrp/overview)) pointing to (ACI Object [infraAccBaseGrp](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/infraAccBaseGrp/overview)).
gmicol marked this conversation as resolved.
Show resolved Hide resolved
- Max Items: 1


#### Optional ####

* `annotation` (annotation) - (string) The annotation of the Relation To Access Interface Policy Group object.
- Default: `orchestrator:terraform`
* `target_dn` (tDn) - (string) The distinguished name of the target.

* `annotations` - (list) A list of Annotations (ACI object [tagAnnotation](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/tagAnnotation/overview)). Annotations can also be configured using a separate [aci_annotation](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/annotation) resource. This attribute is supported in ACI versions: 3.2(1l) and later.

#### Required ####

* `key` (key) - (string) The key used to uniquely identify this configuration object.
* `value` (value) - (string) The value of the property.

* `tags` - (list) A list of Tags (ACI object [tagTag](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/tagTag/overview)). Tags can also be configured using a separate [aci_tag](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/tag) resource. This attribute is supported in ACI versions: 3.2(1l) and later.

#### Required ####

* `key` (key) - (string) The key used to uniquely identify this configuration object.
* `value` (value) - (string) The value of the property.

## Importing

An existing Access Interface Override can be [imported](https://www.terraform.io/docs/import/index.html) into this resource with its distinguished name (DN), via the following command:

```
terraform import aci_access_interface_override.example uni/infra/hpaths-{name}
```

Starting in Terraform version 1.5, an existing Access Interface Override can be imported
using [import blocks](https://developer.hashicorp.com/terraform/language/import) via the following configuration:

```
import {
id = "uni/infra/hpaths-{name}"
to = aci_access_interface_override.example
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

data "aci_access_interface_override" "example" {
name = "host_path_selector"
}
14 changes: 14 additions & 0 deletions examples/data-sources/aci_access_interface_override/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
terraform {
required_providers {
aci = {
source = "ciscodevnet/aci"
}
}
}

provider "aci" {
username = ""
password = ""
url = ""
insecure = true
}
14 changes: 14 additions & 0 deletions examples/resources/aci_access_interface_override/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
terraform {
required_providers {
aci = {
source = "ciscodevnet/aci"
}
}
}

provider "aci" {
username = ""
password = ""
url = ""
insecure = true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

resource "aci_access_interface_override" "full_example" {
annotation = "annotation"
description = "description_1"
name = "host_path_selector"
name_alias = "name_alias_1"
owner_key = "owner_key_1"
owner_tag = "owner_tag_1"
relation_to_host_path = [
{
annotation = "annotation_1"
target_dn = "topology/pod-1/paths-101/pathep-[eth1/1]"
}
]
relation_to_access_interface_policy_group = [
{
annotation = "annotation_1"
target_dn = "uni/infra/funcprof/accportgrp-access_interface_policy_group"
}
]
annotations = [
{
key = "key_0"
value = "value_1"
}
]
tags = [
{
key = "key_0"
value = "value_1"
}
]
}
4 changes: 4 additions & 0 deletions examples/resources/aci_access_interface_override/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

resource "aci_access_interface_override" "example" {
name = "host_path_selector"
}
23 changes: 23 additions & 0 deletions gen/definitions/classes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -567,5 +567,28 @@ fvIpAttr:
- "uni/tn-{name}/ap-{name}/epg-{name}/crtrn/ipattr-{name}"
contained_by:
- "fvCrtrn"

physDomP:
resource_name: "physical_domain"

infraHPathS:
ui_locations:
- "Fabric -> Access Policies -> Interfaces -> Leaf Interfaces -> Overrides"
- "Fabric -> Access Policies -> Interfaces -> Spine Interfaces -> Overrides"
sub_category: "Access Policies"
resource_name: "access_interface_override"

infraRsHPathAtt:
ui_locations:
- "Fabric -> Access Policies -> Interfaces -> Leaf Interfaces -> Overrides"
- "Fabric -> Access Policies -> Interfaces -> Spine Interfaces -> Overrides"
sub_category: "Access Policies"
resource_name: "relation_to_host_path"
max_one_class_allowed: true

infraRsPathToAccBaseGrp:
ui_locations:
- "Fabric -> Access Policies -> Interfaces -> Leaf Interfaces -> Overrides"
- "Fabric -> Access Policies -> Interfaces -> Spine Interfaces -> Overrides"
sub_category: "Access Policies"
resource_name: "relation_to_access_interface_policy_group"
40 changes: 40 additions & 0 deletions gen/definitions/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -928,3 +928,43 @@ rtctrlProfile:
documentation:
autoContinue: "The route_map_continue applies a continue statement for all user-configured sequences (contexts) in a given BGP route profile so that switches will continue to find matches with subsequent user-configured sequences in the route map. Without the continue statement, after a route matches one of the sequences in a route map, switches will not continue to check other sequences."
type: "The type of the %s object. Use combinable when pervasive subnets (fvSubnet) and external subnets (l3extSubnet) should be combined with a route profile and merged into a single route map or route map entry. Use global when the route profile is the only source of information to generate a route map, this will overwrite other policy attributes."

infraHPathS:
default_values:
parent_dn: "uni/infra"
test_values:
default:
name: "host_path_selector_default"
resource_required:
name: "host_path_selector"
datasource_required:
name: "host_path_selector"
datasource_non_existing:
name: "host_path_selector_non_existing"
parents:
- class_name: "infraInfra"
parent_dependency: ""
parent_dn: "uni/infra"

infraRsHPathAtt:
parents:
- class_name: "infraHPathS"
target_classes:
- "fabricPathEp"
targets:
- class_name: "fabricPathEp"
target_dn: "topology/pod-1/paths-101/pathep-[eth1/1]"
relation_resource_name: "host_path"
static: true

infraRsPathToAccBaseGrp:
parents:
- class_name: "infraHPathS"
target_classes:
- "infraAccPortGrp"
targets:
- class_name: "infraAccPortGrp"
target_dn: "uni/infra/funcprof/accportgrp-access_interface_policy_group"
relation_resource_name: "access_interface_policy_group"
static: true

Loading
Loading