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

[minor_change] Add read-only pcTag, scope and segment attributes to aci_bridge_domain resource and datasource and add scope to aci_endpoint_security_group and aci_application_epg resources and datasources (DCNE-257) #1302

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions docs/data-sources/application_epg.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ data "aci_application_epg" "example_application_profile" {
* `pc_tag` (pcTag) - (string) The classification tag used for policy enforcement and zoning.
* `preferred_group_member` (prefGrMemb) - (string) Parameter used to determine whether the EPG is part of the preferred group. Members of this group are allowed to communicate without contracts.
* `priority` (prio) - (string) The Quality of Service (QoS) priority class ID. QoS refers to the capability of a network to provide better service to selected network traffic over various technologies. The primary goal of QoS is to provide priority including dedicated bandwidth, controlled jitter and latency (required by some real-time and interactive traffic), and improved loss characteristics. You can configure the bandwidth of each QoS level using QoS profiles.
* `scope` (scope) - (string) The scope ID (L3-VNI) of the Application EPG object.
* `admin_state` (shutdown) - (string) Withdraw AEPg Configuration from all Nodes in the Fabric.
* `epg_useg_block_statement` - (map) A map of EPG uSeg Block Statement (ACI object [fvCrtrn](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvCrtrn/overview)). This attribute is supported in ACI versions: 1.1(1j) and later.
* `annotation` (annotation) - (string) The annotation of the EPG uSeg Block Statement object.
Expand Down
3 changes: 3 additions & 0 deletions docs/data-sources/bridge_domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ data "aci_bridge_domain" "example_tenant" {
* `name_alias` (nameAlias) - (string) The name alias of the Bridge Domain 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.
* `pc_tag` (pcTag) - (string) The classification tag used for policy enforcement and zoning.
* `scope` (scope) - (string) The scope ID (L3-VNI) of the Bridge Domain object.
* `segment` (seg) - (string) The segment ID (L2-VNI) of the Bridge Domain object.
* `bridge_domain_type` (type) - (string) The domain type of the Bridge Domain object.
* `unicast_routing` (unicastRoute) - (string) Enables L3 routing and endpoint IP learning for the Bridge Domain object.
* `l2_unknown_unicast_flooding` (unkMacUcastAct) - (string) The forwarding method for unknown layer 2 destinations.
Expand Down
1 change: 1 addition & 0 deletions docs/data-sources/endpoint_security_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ data "aci_endpoint_security_group" "example_application_profile" {
* `intra_esg_isolation` (pcEnfPref) - (string) Parameter used to determine whether communication between endpoints within the ESG is blocked.
* `pc_tag` (pcTag) - (string) The classification tag used for policy enforcement and zoning.
* `preferred_group_member` (prefGrMemb) - (string) Parameter used to determine whether the ESG is part of the preferred group. Members of this group are allowed to communicate without contracts.
* `scope` (scope) - (string) The scope ID (L3-VNI) of the Endpoint Security Group object.
* `admin_state` (shutdown) - (string) Withdraw the ESG configuration from all nodes in the fabric.
* `relation_to_consumed_contracts` - (list) A list of Relation To Consumed Contracts (ACI object [fvRsCons](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvRsCons/overview)) pointing to Contract (ACI Object [vzBrCP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/vzBrCP/overview)). This attribute is supported in ACI versions: 1.0(1e) and later.
* `annotation` (annotation) - (string) The annotation of the Relation To Consumed Contract object.
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/application_epg.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ All examples for the Application EPG resource can be found in the [examples](htt
* `priority` (prio) - (string) The Quality of Service (QoS) priority class ID. QoS refers to the capability of a network to provide better service to selected network traffic over various technologies. The primary goal of QoS is to provide priority including dedicated bandwidth, controlled jitter and latency (required by some real-time and interactive traffic), and improved loss characteristics. You can configure the bandwidth of each QoS level using QoS profiles.
- Default: `unspecified`
- Valid Values: `level1`, `level2`, `level3`, `level4`, `level5`, `level6`, `unspecified`.
* `scope` (scope) - (string) The scope ID (L3-VNI) of the Application EPG object.
- Default: `0`
* `admin_state` (shutdown) - (string) Withdraw AEPg Configuration from all Nodes in the Fabric.
- Default: `no`
- Valid Values: `no`, `yes`.
Expand Down
4 changes: 4 additions & 0 deletions docs/resources/bridge_domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ All examples for the Bridge Domain resource can be found in the [examples](https
* `name_alias` (nameAlias) - (string) The name alias of the Bridge Domain 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.
* `pc_tag` (pcTag) - (string) The classification tag used for policy enforcement and zoning.
* `scope` (scope) - (string) The scope ID (L3-VNI) of the Bridge Domain object.
- Default: `0`
Copy link
Collaborator

@shrsr shrsr Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we skip specifying a Default for this, if it is a Read Only property?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but it should also not be under optional. We already discussed this issue. Created a new issue to track this: #1303

* `segment` (seg) - (string) The segment ID (L2-VNI) of the Bridge Domain object.
* `bridge_domain_type` (type) - (string) The domain type of the Bridge Domain object.
- Default: `regular`
- Valid Values: `fc`, `regular`.
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/endpoint_security_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ All examples for the Endpoint Security Group resource can be found in the [examp
* `preferred_group_member` (prefGrMemb) - (string) Parameter used to determine whether the ESG is part of the preferred group. Members of this group are allowed to communicate without contracts.
- Default: `exclude`
- Valid Values: `exclude`, `include`.
* `scope` (scope) - (string) The scope ID (L3-VNI) of the Endpoint Security Group object.
- Default: `0`
* `admin_state` (shutdown) - (string) Withdraw the ESG configuration from all nodes in the fabric.
- Default: `no`
- Valid Values: `no`, `yes`.
Expand Down
14 changes: 14 additions & 0 deletions gen/definitions/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ global:
lastMbrIntvl: "The last member interval (seconds) of the %s object. The group state is removed when no host responds before the timeout"
startQueryCnt: "The start query count of the %s object."
startQueryIntvl: "The query interval (seconds) of the %s object at start-up."
seg: "The segment ID (L2-VNI) of the %s object."
pcTag: "The classification tag used for policy enforcement and zoning."
overwrites:
count: "apic_count" # count is a terraform reserved schema entry
provider: "prov" # provider is a terraform reserved schema entry
Expand All @@ -44,6 +46,7 @@ global:
netflow_pref: "enable_netflow"
num_ports: "number_of_ports"
class_pref: "class_preference"
seg: "segment"
resource_name_doc_overwrite:
Vrf: "VRF"
Sid: "SR-MPLS Segment ID"
Expand Down Expand Up @@ -429,6 +432,7 @@ netflowRecordPol:
fvESg:
read_only_properties:
- "pcTag"
- "scope"
remove_valid_values:
pcTag:
- "any"
Expand All @@ -442,6 +446,7 @@ fvESg:
prefGrMemb: "Parameter used to determine whether the ESG is part of the preferred group. Members of this group are allowed to communicate without contracts."
pcEnfPref: "Parameter used to determine whether communication between endpoints within the ESG is blocked."
shutdown: "Withdraw the ESG configuration from all nodes in the fabric."
scope: "The scope ID (L3-VNI) of the %s object."
parents:
- class_name: "fvAp"
parent_dependency: "fvTenant"
Expand Down Expand Up @@ -717,6 +722,7 @@ fvIpAttr:
fvAEPg:
read_only_properties:
- "pcTag"
- "scope"
remove_valid_values:
pcTag:
- "any"
Expand Down Expand Up @@ -745,6 +751,7 @@ fvAEPg:
isAttrBasedEPg: "The %s object is microsegmented (uSeg)."
pcEnfPref: "Parameter used to determine whether communication between endpoints within the EPG is blocked."
prefGrMemb: "Parameter used to determine whether the EPG is part of the preferred group. Members of this group are allowed to communicate without contracts."
scope: "The scope ID (L3-VNI) of the %s object."
test_values:
default:
forwarding_control: "none"
Expand Down Expand Up @@ -1317,9 +1324,15 @@ pkiKeyRing:
certificate_authority: "test_name"

fvBD:
read_only_properties:
- "pcTag"
- "seg"
- "scope"
remove_valid_values:
vmac:
- "not-applicable"
pcTag:
- "any"
add_valid_values:
epMoveDetectMode:
- ""
Expand Down Expand Up @@ -1372,6 +1385,7 @@ fvBD:
unkMcastAct: "The forwarding method for unknown layer 3 multicast destinations."
v6unkMcastAct: "The forwarding method for unknown IPv6 multicast destinations."
vmac: "The virtual MAC address of the %s object. This is used when the the BD/SVI is extended to multiple sites using a L2 Outside."
scope: "The scope ID (L3-VNI) of the %s object."
type_overwrites:
epMoveDetectMode: "string"
test_values:
Expand Down
7 changes: 1 addition & 6 deletions gen/templates/resource.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2621,14 +2621,9 @@ var {{.ResourceClassName}}{{.ParentHierarchy}}Type = types.ObjectType{
stringplanmodifier.UseStateForUnknown(),
},
{{- end}}
{{- if or .ValidValues $.TemplateProperties.HasReadOnlyProperties}}
{{- if or .ValidValues }}
Validators: []validator.String{
{{- if .ValidValues}}
stringvalidator.OneOf({{- validatorString .ValidValues}}),
{{- end}}
{{- if or .IsNaming .IsRequired}}
MakeStringRequired(),
{{- end}}
},
{{- end}}
MarkdownDescription: `{{.Comment}}`,
Expand Down
Loading
Loading