Skip to content

Commit

Permalink
[minor_change] Add aci_netflow_record_policy resource and datasource. (
Browse files Browse the repository at this point in the history
  • Loading branch information
gmicol committed Jun 25, 2024
1 parent 3f31989 commit 2d8ffe2
Show file tree
Hide file tree
Showing 29 changed files with 3,018 additions and 107 deletions.
3 changes: 2 additions & 1 deletion docs/data-sources/netflow_monitor_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Data source for Netflow Monitor Policy

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

* Supported in ACI versions: 2.2(1k) and later.

* Distinguished Name Formats:
- `uni/infra/monitorpol-{name}`
Expand Down Expand Up @@ -46,7 +47,7 @@ data "aci_netflow_monitor_policy" "example_tenant" {

* `parent_dn` - (string) The distinguished name (DN) of the parent object, possible resources:
- [aci_tenant](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/tenant) ([fvTenant](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvTenant/overview))
- The distinquised name (DN) of classes below can be used but currently there is no available resource for it:
- 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`
Expand Down
74 changes: 74 additions & 0 deletions docs/data-sources/netflow_record_policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
# 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: "Tenant Policies"
layout: "aci"
page_title: "ACI: aci_netflow_record_policy"
sidebar_current: "docs-aci-data-source-aci_netflow_record_policy"
description: |-
Data source for Netflow Record Policy
---

# aci_netflow_record_policy #

Data source for Netflow Record Policy

## API Information ##

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

* Supported in ACI versions: 2.2(1k) and later.

* Distinguished Name Formats:
- `uni/infra/recordpol-{name}`
- `uni/tn-{name}/recordpol-{name}`

## GUI Information ##

* Locations:
- `Tenants -> Policies -> NetFlow -> NetFlow Records`
- `Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Records`

## Example Usage ##

```hcl
data "aci_netflow_record_policy" "example_tenant" {
parent_dn = aci_tenant.example.id
name = "netfow_record"
}
```

## Schema ##

### Required ###

* `parent_dn` - (string) The distinguished name (DN) of the parent object, possible resources:
- [aci_tenant](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/tenant) ([fvTenant](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvTenant/overview))
- 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 Netflow Record Policy object.

### Read-Only ###

* `id` - (string) The distinguished name (DN) of the Netflow Record Policy object.
* `annotation` (annotation) - (string) The annotation of the Netflow Record Policy object.
* `collect_parameters` (collect) - (list) Collect parameters of the Netflow Record Policy object.
* `description` (descr) - (string) The description of the Netflow Record Policy object.
* `match_parameters` (match) - (list) Match parameters of the Netflow Record Policy object.
* `name_alias` (nameAlias) - (string) The name alias of the Netflow Record Policy 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.

* `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.
1 change: 1 addition & 0 deletions docs/data-sources/relation_to_netflow_exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Data source for Relation To Netflow Exporter

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

* Supported in ACI versions: 2.2(1k) and later.

* Distinguished Name Formats:
- `uni/infra/monitorpol-{name}/rsmonitorToExporter-{tnNetflowExporterPolName}`
Expand Down
3 changes: 2 additions & 1 deletion docs/resources/netflow_monitor_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Manages ACI Netflow Monitor Policy

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

* Supported in ACI versions: 2.2(1k) and later.

* Distinguished Name Formats:
- `uni/infra/monitorpol-{name}`
Expand Down Expand Up @@ -100,7 +101,7 @@ All examples for the Netflow Monitor Policy resource can be found in the [exampl
### Optional ###
* `parent_dn` - (string) The distinguished name (DN) of the parent object, possible resources:
- [aci_tenant](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/tenant) ([fvTenant](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvTenant/overview))
- The distinquised name (DN) of classes below can be used but currently there is no available resource for it:
- 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`
Expand Down
142 changes: 142 additions & 0 deletions docs/resources/netflow_record_policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
# 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: "Tenant Policies"
layout: "aci"
page_title: "ACI: aci_netflow_record_policy"
sidebar_current: "docs-aci-resource-aci_netflow_record_policy"
description: |-
Manages ACI Netflow Record Policy
---

# aci_netflow_record_policy #

Manages ACI Netflow Record Policy



## API Information ##

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

* Supported in ACI versions: 2.2(1k) and later.

* Distinguished Name Formats:
- `uni/infra/recordpol-{name}`
- `uni/tn-{name}/recordpol-{name}`

## GUI Information ##

* Locations:
- `Tenants -> Policies -> NetFlow -> NetFlow Records`
- `Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Records`

## Example Usage ##

The configuration snippet below creates a Netflow Record Policy with only required attributes.

```hcl
resource "aci_netflow_record_policy" "example_tenant" {
parent_dn = aci_tenant.example.id
name = "netfow_record"
}
```
The configuration snippet below shows all possible attributes of the Netflow Record Policy.

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

```hcl
resource "aci_netflow_record_policy" "full_example_tenant" {
parent_dn = aci_tenant.example.id
annotation = "annotation"
collect_parameters = ["count-bytes", "src-intf"]
description = "description"
match_parameters = ["dst-ip", "src-ip"]
name = "netfow_record"
name_alias = "name_alias"
owner_key = "owner_key"
owner_tag = "owner_tag"
annotations = [
{
key = "key_0"
value = "value_1"
}
]
tags = [
{
key = "key_0"
value = "value_1"
}
]
}
```

All examples for the Netflow Record Policy resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_netflow_record_policy) folder.

## Schema ##

### Required ###

* `name` (name) - (string) The name of the Netflow Record Policy object.

### Read-Only ###

* `id` - (string) The distinguished name (DN) of the Netflow Record Policy object.

### Optional ###
* `parent_dn` - (string) The distinguished name (DN) of the parent object, possible resources:
- [aci_tenant](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/tenant) ([fvTenant](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvTenant/overview))
- 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 Netflow Record Policy object.
- Default: `orchestrator:terraform`
* `collect_parameters` (collect) - (list) Collect parameters of the Netflow Record Policy object.
- Default: `src-intf`.
- Valid Values: `count-bytes`, `count-pkts`, `pkt-disp`, `sampler-id`, `src-intf`, `tcp-flags`, `ts-first`, `ts-recent`.
* `description` (descr) - (string) The description of the Netflow Record Policy object.
* `match_parameters` (match) - (list) Match parameters of the Netflow Record Policy object.
- Default: `unspecified`.
- Valid Values: `dst-ip`, `dst-ipv4`, `dst-ipv6`, `dst-mac`, `dst-port`, `ethertype`, `proto`, `src-ip`, `src-ipv4`, `src-ipv6`, `src-mac`, `src-port`, `tos`, `vlan`.
* `name_alias` (nameAlias) - (string) The name alias of the Netflow Record Policy 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.

* `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 Netflow Record Policy 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_netflow_record_policy.example_tenant uni/infra/recordpol-{name}
```

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

```
import {
id = "uni/infra/recordpol-{name}"
to = aci_netflow_record_policy.example_tenant
}
```
1 change: 1 addition & 0 deletions docs/resources/relation_to_netflow_exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Manages ACI Relation To Netflow Exporter

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

* Supported in ACI versions: 2.2(1k) and later.

* Distinguished Name Formats:
- `uni/infra/monitorpol-{name}/rsmonitorToExporter-{tnNetflowExporterPolName}`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

data "aci_netflow_record_policy" "example_tenant" {
parent_dn = aci_tenant.example.id
name = "netfow_record"
}
14 changes: 14 additions & 0 deletions examples/data-sources/aci_netflow_record_policy/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_netflow_record_policy/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,24 @@

resource "aci_netflow_record_policy" "full_example_tenant" {
parent_dn = aci_tenant.example.id
annotation = "annotation"
collect_parameters = ["count-bytes", "src-intf"]
description = "description"
match_parameters = ["dst-ip", "src-ip"]
name = "netfow_record"
name_alias = "name_alias"
owner_key = "owner_key"
owner_tag = "owner_tag"
annotations = [
{
key = "key_0"
value = "value_1"
}
]
tags = [
{
key = "key_0"
value = "value_1"
}
]
}
5 changes: 5 additions & 0 deletions examples/resources/aci_netflow_record_policy/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

resource "aci_netflow_record_policy" "example_tenant" {
parent_dn = aci_tenant.example.id
name = "netfow_record"
}
38 changes: 38 additions & 0 deletions gen/definitions/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,41 @@ mplsNodeSidP:
- class_name: "l3extLoopBackIfP"
parent_dependency: "l3extRsNodeL3OutAtt"
parent_dn: "aci_logical_node_to_fabric_node.test.id"

netflowRecordPol:
overwrites:
match: "match_parameters"
collect: "collect_parameters"
documentation:
match: "Match parameters of the %s object."
collect: "Collect parameters of the %s object."
default_values:
parent_dn: "uni/infra"
remove_valid_values:
match:
- "unspecified"
test_values:
default:
match_parameters: []
collect_parameters:
- "src-intf"
all:
collect_parameters:
- "count-bytes"
- "src-intf"
match_parameters:
- "dst-ip"
- "src-ip"
resource_required:
name: "netfow_record"
datasource_required:
name: "netfow_record"
datasource_non_existing:
name: "netfow_record_non_existing"
parents:
- class_name: "infraInfra"
parent_dependency: ""
parent_dn: "uni/infra"
- class_name: "fvTenant"
parent_dependency: ""
parent_dn: "aci_tenant.test.id"
Loading

0 comments on commit 2d8ffe2

Please sign in to comment.