From d8ebdd862d778bc258be39ba7641fbfbafca6335 Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Mon, 22 Jan 2024 22:47:31 -0800 Subject: [PATCH 01/10] [minor_changes] Adding ip parameter to fix resource creation when is_static_ip parameter is set in aci_cloud_l4_l7_native_load_balancer resource/datasource. --- aci/data_source_aci_cloudlb.go | 6 +++ aci/resource_aci_cloudlb.go | 46 +++++++++++++++++++ examples/l4_l7_service_graph_template/main.tf | 4 +- 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/aci/data_source_aci_cloudlb.go b/aci/data_source_aci_cloudlb.go index 3b652c798..65568871b 100644 --- a/aci/data_source_aci_cloudlb.go +++ b/aci/data_source_aci_cloudlb.go @@ -150,6 +150,12 @@ func dataSourceAciCloudL4L7LoadBalancer() *schema.Resource { Computed: true, Set: schema.HashString, }, + "static_ip_address": &schema.Schema{ + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Optional: true, + Set: schema.HashString, + }, }), } } diff --git a/aci/resource_aci_cloudlb.go b/aci/resource_aci_cloudlb.go index 48c301a63..496019b19 100644 --- a/aci/resource_aci_cloudlb.go +++ b/aci/resource_aci_cloudlb.go @@ -15,6 +15,7 @@ import ( const ( CloudLBClassName = "cloudLB" CloudRsLDevToCloudSubnetClassName = "cloudRsLDevToCloudSubnet" + CloudFrontendIPv4AddrClassName = "cloudFrontendIPv4Addr" RnCloudLB = "clb-%s" ) @@ -277,6 +278,12 @@ func resourceAciCloudL4L7LoadBalancer() *schema.Resource { Optional: true, Set: schema.HashString, }, + "static_ip_address": &schema.Schema{ + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Optional: true, + Set: schema.HashString, + }, }, GetNameAliasAttrSchema(), GetAnnotationAttrSchema()), } } @@ -334,6 +341,23 @@ func mapCloudRsLDevToCloudSubnetAttrs(annotation, status string, subnetTargetDnL return cloudSubnetAttrsList } +func mapCloudFrontendIPv4AddrAttrs(annotation, status string, subnetStaticIPList []string) []interface{} { + cloudSubnetAttrsList := make([]interface{}, len(subnetStaticIPList)) + for index, ip := range subnetStaticIPList { + cloudSubnetAttrsMap := map[string]interface{}{ + CloudFrontendIPv4AddrClassName: map[string]interface{}{ + "attributes": map[string]string{ + "annotation": annotation, + "ip": ip, + "status": status, + }, + }, + } + cloudSubnetAttrsList[index] = cloudSubnetAttrsMap + } + return cloudSubnetAttrsList +} + func getAndSetRemoteCloudL4L7LoadBalancerAttributes(client *client.Client, dn string, d *schema.ResourceData) (*schema.ResourceData, error) { dnUrl := fmt.Sprintf("%s/%s.json?rsp-subtree=full", client.MOURL, dn) cloudLBCont, err := client.GetViaURL(dnUrl) @@ -386,6 +410,7 @@ func getAndSetRemoteCloudL4L7LoadBalancerAttributes(client *client.Client, dn st cloudLBChildSubnetList := make([]string, 0) cloudLBChildAaaDomainList := make([]string, 0) + cloudLBChildStaticIPList := make([]string, 0) cloudLBChild := cloudLBCont.S("imdata").Index(0).S(CloudLBClassName).S("children") for i := 0; i < cloudLBChildCount; i++ { @@ -394,6 +419,11 @@ func getAndSetRemoteCloudL4L7LoadBalancerAttributes(client *client.Client, dn st cloudLBChildSubnetList = append(cloudLBChildSubnetList, cloudSubnetTDn) continue } + staticIPAddress := models.StripQuotes(cloudLBChild.Index(i).S(CloudFrontendIPv4AddrClassName).S("attributes").S("ip").String()) + if staticIPAddress != "{}" { + cloudLBChildStaticIPList = append(cloudLBChildStaticIPList, staticIPAddress) + continue + } aaaDomainName := models.StripQuotes(cloudLBChild.Index(i).S("aaaRbacAnnotation").S("attributes").S("domain").String()) if aaaDomainName != "{}" { cloudLBChildAaaDomainList = append(cloudLBChildAaaDomainList, fmt.Sprintf("uni/userext/domain-%s", aaaDomainName)) @@ -401,6 +431,7 @@ func getAndSetRemoteCloudL4L7LoadBalancerAttributes(client *client.Client, dn st } } d.Set("relation_cloud_rs_ldev_to_cloud_subnet", cloudLBChildSubnetList) + d.Set("static_ip_address", cloudLBChildStaticIPList) d.Set("aaa_domain_dn", cloudLBChildAaaDomainList) d.SetId(cloudLBDistinguishedName) @@ -451,6 +482,11 @@ func resourceAciCloudL4L7LoadBalancerCreate(ctx context.Context, d *schema.Resou cloudLBChildList = append(cloudLBChildList, mapListOfAaaDomainAttrs("created", toStringList(aaaDomainDn.(*schema.Set).List()))...) } + if staticIPAddress, ok := d.GetOk("static_ip_address"); ok { + cloudLBChildList = append(cloudLBChildList, mapCloudFrontendIPv4AddrAttrs(annotation, "created", toStringList(staticIPAddress.(*schema.Set).List()))) + + } + cloudLBMapAttrs := mapCloudL4L7LoadBalancerAttrs("created", d) deleteEmptyValuesfromMap(cloudLBMapAttrs) cloudLBMap := map[string]interface{}{ @@ -511,6 +547,16 @@ func resourceAciCloudL4L7LoadBalancerUpdate(ctx context.Context, d *schema.Resou cloudLBChildList = append(cloudLBChildList, mapCloudRsLDevToCloudSubnetAttrs(annotation, "created, modified", relToCreate)...) } + if d.HasChange("static_ip_address") { + oldRel, newRel := d.GetChange("static_ip_address") + oldRelSet := oldRel.(*schema.Set) + newRelSet := newRel.(*schema.Set) + relToDelete := toStringList(oldRelSet.Difference(newRelSet).List()) + relToCreate := toStringList(newRelSet.Difference(oldRelSet).List()) + cloudLBChildList = append(cloudLBChildList, mapCloudFrontendIPv4AddrAttrs(annotation, "deleted", relToDelete)...) + cloudLBChildList = append(cloudLBChildList, mapCloudFrontendIPv4AddrAttrs(annotation, "created, modified", relToCreate)...) + } + if d.HasChange("aaa_domain_dn") { oldRel, newRel := d.GetChange("aaa_domain_dn") oldRelSet := oldRel.(*schema.Set) diff --git a/examples/l4_l7_service_graph_template/main.tf b/examples/l4_l7_service_graph_template/main.tf index 0c45156eb..c5b68bb58 100644 --- a/examples/l4_l7_service_graph_template/main.tf +++ b/examples/l4_l7_service_graph_template/main.tf @@ -76,6 +76,8 @@ resource "aci_cloud_l4_l7_native_load_balancer" "cloud_native_alb" { aci_cloud_subnet.cloud_subnet.id ] cloud_l4l7_load_balancer_type = "application" + is_static_ip = "yes" + static_ip_address = ["10.1.1.0"] } # Third-Party Firewall @@ -225,4 +227,4 @@ resource "aci_connection" "provider" { aci_l4_l7_service_graph_template.cloud_service_graph.term_prov_dn, aci_function_node.function_node_2.conn_provider_dn ] -} +} \ No newline at end of file From fd9dab83695148714639475718776c0c72ef60f7 Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Fri, 1 Mar 2024 16:14:25 -0800 Subject: [PATCH 02/10] [minor_changes] Added connector_type and att_notify parameters to 'aci_function_mode' and fixed documentation for aci_function_node and and aci_connection to have a particular format for names and added examples to show these changes. --- aci/data_source_aci_vnsabsnode.go | 16 + aci/resource_aci_vnsabsnode.go | 66 +++- docs/data-sources/function_node.md | 6 +- docs/resources/connection.md | 2 +- docs/resources/function_node.md | 10 +- examples/function_node/main.tf | 216 +++++++++- examples/l4_l7_service_graph_template/main.tf | 369 +++++++++--------- 7 files changed, 483 insertions(+), 202 deletions(-) diff --git a/aci/data_source_aci_vnsabsnode.go b/aci/data_source_aci_vnsabsnode.go index 15a54934b..7dc5fd3ca 100644 --- a/aci/data_source_aci_vnsabsnode.go +++ b/aci/data_source_aci_vnsabsnode.go @@ -97,6 +97,22 @@ func dataSourceAciFunctionNode() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "l4_l7_device_interface_consumer_connector_type": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "l4_l7_device_interface_provider_connector_type": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "l4_l7_device_interface_consumer_att_notify": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "l4_l7_device_interface_provider_att_notify": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, }), } } diff --git a/aci/resource_aci_vnsabsnode.go b/aci/resource_aci_vnsabsnode.go index 07deeb2bb..08b9cd2c0 100644 --- a/aci/resource_aci_vnsabsnode.go +++ b/aci/resource_aci_vnsabsnode.go @@ -148,29 +148,63 @@ func resourceAciFunctionNode() *schema.Resource { }, "relation_vns_rs_node_to_abs_func_prof": &schema.Schema{ - Type: schema.TypeString, - + Type: schema.TypeString, Optional: true, }, "relation_vns_rs_node_to_l_dev": &schema.Schema{ - Type: schema.TypeString, - + Type: schema.TypeString, Optional: true, }, "relation_vns_rs_node_to_m_func": &schema.Schema{ - Type: schema.TypeString, - + Type: schema.TypeString, Optional: true, }, "relation_vns_rs_default_scope_to_term": &schema.Schema{ - Type: schema.TypeString, - + Type: schema.TypeString, Optional: true, }, "relation_vns_rs_node_to_cloud_l_dev": &schema.Schema{ - Type: schema.TypeString, - + Type: schema.TypeString, + Optional: true, + }, + "l4_l7_device_interface_consumer_connector_type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + "none", + "redir", + }, false), + }, + "l4_l7_device_interface_provider_connector_type": &schema.Schema{ + Type: schema.TypeString, Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + "none", + "redir", + "dnat", + "snat", + "snat_dnat", + }, false), + }, + "l4_l7_device_interface_consumer_att_notify": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + "no", + "yes", + }, false), + }, + "l4_l7_device_interface_provider_att_notify": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + "no", + "yes", + }, false), }, }), } @@ -231,6 +265,8 @@ func getAndSetFunctionNodeRelationalAttributes(client *client.Client, dn string, } d.Set("conn_consumer_dn", vnsAbsFuncConn.DistinguishedName) d.Set("l4_l7_device_interface_consumer_name", vnsAbsFuncConn.DeviceLIfName) + d.Set("l4_l7_device_interface_consumer_connector_type", vnsAbsFuncConn.ConnType) + d.Set("l4_l7_device_interface_consumer_att_notify", vnsAbsFuncConn.AttNotify) // Provider Part provDn := fmt.Sprintf("%s/AbsFConn-provider", dn) @@ -244,6 +280,8 @@ func getAndSetFunctionNodeRelationalAttributes(client *client.Client, dn string, } d.Set("conn_provider_dn", vnsAbsFuncConn.DistinguishedName) d.Set("l4_l7_device_interface_provider_name", vnsAbsFuncConn.DeviceLIfName) + d.Set("l4_l7_device_interface_provider_connector_type", vnsAbsFuncConn.ConnType) + d.Set("l4_l7_device_interface_provider_att_notify", vnsAbsFuncConn.AttNotify) vnsRsNodeToAbsFuncProfData, err := client.ReadRelationvnsRsNodeToAbsFuncProfFromFunctionNode(dn) if err != nil { @@ -361,6 +399,8 @@ func resourceAciFunctionNodeCreate(ctx context.Context, d *schema.ResourceData, vnsAbsFuncConnAttr := models.FunctionConnectorAttributes{} vnsAbsFuncConnAttr.Annotation = "{}" vnsAbsFuncConnAttr.DeviceLIfName = d.Get("l4_l7_device_interface_consumer_name").(string) + vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_consumer_att_notify").(string) + vnsAbsFuncConnAttr.ConnType = d.Get("l4_l7_device_interface_consumer_connector_type").(string) vnsAbsFuncConn := models.NewFunctionConnector(fmt.Sprintf("AbsFConn-%s", "consumer"), vnsAbsNode.DistinguishedName, "", vnsAbsFuncConnAttr) err = aciClient.Save(vnsAbsFuncConn) if err != nil { @@ -369,6 +409,8 @@ func resourceAciFunctionNodeCreate(ctx context.Context, d *schema.ResourceData, d.Set("conn_consumer_dn", vnsAbsFuncConn.DistinguishedName) vnsAbsFuncConnAttr.DeviceLIfName = d.Get("l4_l7_device_interface_provider_name").(string) + vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_provider_att_notify").(string) + vnsAbsFuncConnAttr.ConnType = d.Get("l4_l7_device_interface_provider_connector_type").(string) vnsAbsFuncConn = models.NewFunctionConnector(fmt.Sprintf("AbsFConn-%s", "provider"), vnsAbsNode.DistinguishedName, "", vnsAbsFuncConnAttr) err = aciClient.Save(vnsAbsFuncConn) if err != nil { @@ -509,6 +551,8 @@ func resourceAciFunctionNodeUpdate(ctx context.Context, d *schema.ResourceData, vnsAbsFuncConnAttr := models.FunctionConnectorAttributes{} vnsAbsFuncConnAttr.Annotation = "{}" vnsAbsFuncConnAttr.DeviceLIfName = d.Get("l4_l7_device_interface_consumer_name").(string) + vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_consumer_att_notify").(string) + vnsAbsFuncConnAttr.ConnType = d.Get("l4_l7_device_interface_consumer_connector_type").(string) vnsAbsFuncConn := models.NewFunctionConnector(fmt.Sprintf("AbsFConn-%s", "consumer"), vnsAbsNode.DistinguishedName, "", vnsAbsFuncConnAttr) err = aciClient.Save(vnsAbsFuncConn) if err != nil { @@ -521,6 +565,8 @@ func resourceAciFunctionNodeUpdate(ctx context.Context, d *schema.ResourceData, vnsAbsFuncConnAttr := models.FunctionConnectorAttributes{} vnsAbsFuncConnAttr.Annotation = "{}" vnsAbsFuncConnAttr.DeviceLIfName = d.Get("l4_l7_device_interface_provider_name").(string) + vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_provider_att_notify").(string) + vnsAbsFuncConnAttr.ConnType = d.Get("l4_l7_device_interface_provider_connector_type").(string) vnsAbsFuncConn := models.NewFunctionConnector(fmt.Sprintf("AbsFConn-%s", "provider"), vnsAbsNode.DistinguishedName, "", vnsAbsFuncConnAttr) err = aciClient.Save(vnsAbsFuncConn) if err != nil { diff --git a/docs/data-sources/function_node.md b/docs/data-sources/function_node.md index 8380f3faf..3fe9f8499 100644 --- a/docs/data-sources/function_node.md +++ b/docs/data-sources/function_node.md @@ -53,4 +53,8 @@ data "aci_function_node" "example" { - `relation_vns_rs_node_to_l_dev` - (Read-Only) Represents the relation to Logical Device Abstraction (class vnsALDevIf). Type: String. - `relation_vns_rs_node_to_m_func` - (Read-Only) Represents the relation to Meta Function (class vnsMFunc). Type: String. - `relation_vns_rs_default_scope_to_term` - (Read-Only) Represents the relation to Terminal Abstract Class (class vnsATerm). Type: String. -- `relation_vns_rs_node_to_cloud_l_dev` - (Read-Only) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. \ No newline at end of file +- `relation_vns_rs_node_to_cloud_l_dev` - (Read-Only) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. +- `l4_l7_device_interface_consumer_connector_type` - (Read-Only) The connection type of the consumer interface. Type: String. +- `l4_l7_device_interface_provider_connector_type` - (Read-Only) The connection type of the provider interface. Type: String. +- `l4_l7_device_interface_consumer_att_notify` - (Read-Only) The consumer interface attribute notification. Type: String. +- `l4_l7_device_interface_provider_att_notify` - (Read-Only) The provider interface attribute notification. Type: String. \ No newline at end of file diff --git a/docs/resources/connection.md b/docs/resources/connection.md index f55d2146f..f5e67ce91 100644 --- a/docs/resources/connection.md +++ b/docs/resources/connection.md @@ -35,7 +35,7 @@ resource "aci_connection" "conn2" { ## Argument Reference - `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. -- `name` - (Required) Name of object connection. +- `name` - (Required) Name of object connection. The valid connection name format is `CONX`, where X is a number starting with 0. Type: String. - `adj_type` - (Optional) Connector adjacency type. Allowed values are "L2", "L3". Default value is "L2". - `annotation` - (Optional) Annotation for object connection. - `description` - (Optional) Description for object connection. diff --git a/docs/resources/function_node.md b/docs/resources/function_node.md index 69b5730c6..301331e3f 100644 --- a/docs/resources/function_node.md +++ b/docs/resources/function_node.md @@ -38,13 +38,17 @@ resource "aci_function_node" "example" { share_encap = "yes" l4_l7_device_interface_consumer_name = "interface1" l4_l7_device_interface_provider_name = "interface2" + l4_l7_device_interface_consumer_connector_type = "none" + l4_l7_device_interface_provider_connector_type = "redir" + l4_l7_device_interface_consumer_att_notify = "no" + l4_l7_device_interface_provider_att_notify = "yes" } ``` ## Argument Reference - `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. Type: String. -- `name` - (Required) Name of the Function Node object. Type: String. +- `name` - (Required) Name of the Function Node object. The valid function node format is `NX`, where X is a number starting with 0. Type: String. - `annotation` - (Optional) Annotation of the Function Node object. Type: String. - `description` - (Optional) Description of the Function Node object. Type: String. - `func_template_type` - (Optional) Function Template type of the Function Node object. Allowed values: "OTHER", "FW_TRANS", "FW_ROUTED", "CLOUD_VENDOR_LB", "CLOUD_VENDOR_FW", "CLOUD_NATIVE_LB", "CLOUD_NATIVE_FW", "ADC_TWO_ARM", "ADC_ONE_ARM". Default value: "OTHER". Type: String. @@ -62,6 +66,10 @@ resource "aci_function_node" "example" { - `relation_vns_rs_node_to_m_func` - (Optional) Represents the relation to Meta Function (class vnsMFunc). Type: String. - `relation_vns_rs_default_scope_to_term` - (Optional) Represents the relation to Terminal Abstract Class (class vnsATerm). Type: String. - `relation_vns_rs_node_to_cloud_l_dev` - (Optional) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. +- `l4_l7_device_interface_consumer_connector_type` - (Optional) The connection type of the consumer interface. Allowed values: "none", "redir". Default value: "none". This argument can be set only when the function node is a "network load balancer" or "third party firewall". Type: String. +- `l4_l7_device_interface_provider_connector_type` - (Optional) The connection type of the provider interface. Allowed values: "none", "redir", "dnat", "snat", "snat_dnat". This argument can be set only when the function node is a "network load balancer" or "third party firewall". Default value: "none". Type: String. +- `l4_l7_device_interface_consumer_att_notify` - (Optional) The consumer interface attribute notification. Allowed values: "no", "yes". Default value: "no". Type: String. +- `l4_l7_device_interface_provider_att_notify` - (Optional) The provider interface attribute notification. Allowed values: "no", "yes". Default value: "no". Type: String. ## Importing diff --git a/examples/function_node/main.tf b/examples/function_node/main.tf index ab328406c..7eab5343a 100644 --- a/examples/function_node/main.tf +++ b/examples/function_node/main.tf @@ -13,15 +13,209 @@ provider "aci" { insecure = true } -resource "aci_function_node" "foofunction_node" { - - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.serviceGraphTemp.id - name = "functionNodeOne" - func_template_type = "OTHER" - func_type = "None" - is_copy = "no" - managed = "no" - routing_mode = "unspecified" - sequence_number = "3" - share_encap = "yes" +data "aci_tenant" "tf_tenant" { + name = "tf_ansible_test" +} +data "aci_vrf" "tf_vrf" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "tf_vrf" +} + +data "aci_cloud_context_profile" "ccp1" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "tf_ccp" +} +data "aci_cloud_cidr_pool" "cidr1" { + cloud_context_profile_dn = data.aci_cloud_context_profile.ccp1.id + addr = "10.20.0.0/25" +} +data "aci_cloud_subnet" "cs1" { + cloud_cidr_pool_dn = data.aci_cloud_cidr_pool.cidr1.id + ip = "10.20.0.0/25" +} + +# Create Logical Firewall Representation (3rd party example) + +resource "aci_cloud_l4_l7_third_party_device" "third_pa_fw" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "tf_third_party_fw" + relation_cloud_rs_ldev_to_ctx = data.aci_vrf.tf_vrf.id + interface_selectors { + allow_all = "yes" + name = "trust" + end_point_selectors { + match_expression = "custom:internal=='trust'" + name = "trust" + } + } + interface_selectors { + allow_all = "yes" + name = "untrust" + end_point_selectors { + match_expression = "custom:external=='untrust'" + name = "untrust" + } + } +} + +# Create Native Network Load Balancer for Firewall + +resource "aci_cloud_l4_l7_native_load_balancer" "cloud_nlb" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "tf_cloud_nlb" + relation_cloud_rs_ldev_to_cloud_subnet = [data.aci_cloud_subnet.cs1.id] + allow_all = "yes" + is_static_ip = "yes" + static_ip_address = ["10.20.0.0"] + scheme = "internal" + cloud_l4l7_load_balancer_type = "network" +} + +resource "aci_l4_l7_service_graph_template" "tf_sg" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "tf_sg_1" + l4_l7_service_graph_template_type = "cloud" +} + +resource "aci_function_node" "tf_nlb" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id + name = "N0" + func_template_type = "ADC_ONE_ARM" + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_native_load_balancer.cloud_nlb.id + managed = "yes" + func_type = "GoTo" + is_copy = "no" + sequence_number = "0" +} + +resource "aci_function_node" "tf_fw" { # does not get configured + l4_l7_service_graph_template_dn = aci_function_node.tf_nlb.l4_l7_service_graph_template_dn + name = "N1" + func_template_type = "FW_ROUTED" + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_pa_fw.id + l4_l7_device_interface_consumer_name = "trust" + l4_l7_device_interface_provider_name = "untrust" + managed = "no" +} + +# Create L4-L7 Service Graph connection with template T1 and the first node N0. +resource "aci_connection" "t1-n0" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id + name = "CON0" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_l4_l7_service_graph_template.tf_sg.term_cons_dn, + aci_function_node.tf_nlb.conn_consumer_dn + ] +} + +# Create L4-L7 Service Graph connection with current node N0 and next node N1. +resource "aci_connection" "n0-n1" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id + name = "CON1" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_function_node.tf_nlb.conn_provider_dn, + aci_function_node.tf_fw.conn_consumer_dn + ] +} + +# Create L4-L7 Service Graph connection with the last node N1 and template T2. +resource "aci_connection" "n1-t1" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id + name = "CON2" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_function_node.tf_fw.conn_provider_dn, + aci_l4_l7_service_graph_template.tf_sg.term_prov_dn + ] +} + + +resource "aci_l4_l7_service_graph_template" "tf_sg2" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "tf_sg_2" + l4_l7_service_graph_template_type = "cloud" +} + +resource "aci_function_node" "tf_nlb2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id + name = "N0" + func_template_type = "ADC_ONE_ARM" + routing_mode = "Redirect" + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_native_load_balancer.cloud_nlb.id + managed = "yes" + l4_l7_device_interface_consumer_connector_type = "none" + l4_l7_device_interface_provider_connector_type = "redir" +} + +resource "aci_function_node" "tf_fw2" { # does not get configured + l4_l7_service_graph_template_dn = aci_function_node.tf_nlb2.l4_l7_service_graph_template_dn + name = "N1" + func_template_type = "FW_ROUTED" + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_pa_fw.id + l4_l7_device_interface_consumer_name = "trust" + l4_l7_device_interface_provider_name = "untrust" + l4_l7_device_interface_consumer_connector_type = "redir" + l4_l7_device_interface_provider_connector_type = "snat" + l4_l7_device_interface_consumer_att_notify = "no" + l4_l7_device_interface_provider_att_notify = "yes" + managed = "no" +} + +# Create L4-L7 Service Graph tf_sg2 connection with template T1 and the first node N0. +resource "aci_connection" "t1-n0-2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id + name = "CON0" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_l4_l7_service_graph_template.tf_sg2.term_cons_dn, + aci_function_node.tf_nlb2.conn_consumer_dn + ] +} + +# Create L4-L7 Service Graph tf_sg2 connection with current node N0 and next node N1. +resource "aci_connection" "n0-n1-2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id + name = "CON1" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_function_node.tf_nlb2.conn_provider_dn, + aci_function_node.tf_fw2.conn_consumer_dn + ] +} + +# Create L4-L7 Service Graph tf_sg2 connection with the last node N1 and template T2. +resource "aci_connection" "n1-t1-2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id + name = "CON2" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_function_node.tf_fw2.conn_provider_dn, + aci_l4_l7_service_graph_template.tf_sg2.term_prov_dn + ] } diff --git a/examples/l4_l7_service_graph_template/main.tf b/examples/l4_l7_service_graph_template/main.tf index c5b68bb58..19ee3e5c4 100644 --- a/examples/l4_l7_service_graph_template/main.tf +++ b/examples/l4_l7_service_graph_template/main.tf @@ -5,226 +5,239 @@ terraform { } } } +# provider "aci" { #azure 26 +# username = "admin" +# password = "C!sco123456$" +# url = "https://172.167.14.72/" +# insecure = true +# } provider "aci" { - username = "" - password = "" - url = "" + username = "ansible_github_ci" + password = "sJ94G92#8dq2hx*K4qh" + url = "https://20.253.151.162" insecure = true } -resource "aci_tenant" "tf_tenant" { - name = "tf_tenant" -} -# VRF setup part -resource "aci_vrf" "vrf1" { - tenant_dn = aci_tenant.tf_tenant.id - name = "vrf-1" -} -# AAA Domain setup part -resource "aci_aaa_domain" "aaa_domain_1" { - name = "aaa_domain_1" +data "aci_tenant" "tf_tenant" { + name = "ansible_test_anv" } - -resource "aci_cloud_context_profile" "ctx1" { - name = "tf_ctx1" - tenant_dn = aci_tenant.tf_tenant.id - primary_cidr = "10.1.0.0/16" - region = "westus" - cloud_vendor = "azure" - relation_cloud_rs_to_ctx = aci_vrf.vrf1.id - hub_network = "uni/tn-infra/gwrouterp-default" +data "aci_vrf" "tf_vrf" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "vrf_anv" } -resource "aci_cloud_cidr_pool" "cloud_cidr_pool" { - cloud_context_profile_dn = aci_cloud_context_profile.ctx1.id - addr = "10.1.0.0/16" +data "aci_cloud_context_profile" "ccp1" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "ccp" } - -data "aci_cloud_provider_profile" "cloud_profile" { - vendor = "azure" +data "aci_cloud_cidr_pool" "cidr1" { + cloud_context_profile_dn = data.aci_cloud_context_profile.ccp1.id + addr = "10.20.0.0/25" } - -data "aci_cloud_providers_region" "cloud_region" { - cloud_provider_profile_dn = data.aci_cloud_provider_profile.cloud_profile.id - name = "westus" +data "aci_cloud_subnet" "cs1" { + cloud_cidr_pool_dn = data.aci_cloud_cidr_pool.cidr1.id + ip = "10.20.0.0/25" } -data "aci_cloud_availability_zone" "region_availability_zone" { - cloud_providers_region_dn = data.aci_cloud_providers_region.cloud_region.id - name = "default" +data "aci_cloud_context_profile" "ccp2" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "ccp_anv2" } - -resource "aci_cloud_subnet" "cloud_subnet" { - cloud_cidr_pool_dn = aci_cloud_cidr_pool.cloud_cidr_pool.id - ip = "10.1.1.0/24" - usage = "gateway" - zone = data.aci_cloud_availability_zone.region_availability_zone.id - scope = ["shared", "private", "public"] +data "aci_cloud_cidr_pool" "cidr2" { + cloud_context_profile_dn = data.aci_cloud_context_profile.ccp2.id + addr = "10.40.20.0/16" } - -# Application Load Balancer -resource "aci_cloud_l4_l7_native_load_balancer" "cloud_native_alb" { - tenant_dn = aci_tenant.tf_tenant.id - name = "cloud_native_alb" - aaa_domain_dn = [ - aci_aaa_domain.aaa_domain_1.id - ] - relation_cloud_rs_ldev_to_cloud_subnet = [ - aci_cloud_subnet.cloud_subnet.id - ] - cloud_l4l7_load_balancer_type = "application" - is_static_ip = "yes" - static_ip_address = ["10.1.1.0"] +data "aci_cloud_subnet" "cs2" { + cloud_cidr_pool_dn = data.aci_cloud_cidr_pool.cidr2.id + ip = "10.40.20.0/24" } -# Third-Party Firewall -resource "aci_cloud_l4_l7_third_party_device" "cloud_third_party_fw" { - tenant_dn = aci_tenant.tf_tenant.id - name = "cloud_third_party_fw" - service_type = "FW" - aaa_domain_dn = [ - aci_aaa_domain.aaa_domain_1.id - ] - relation_cloud_rs_ldev_to_ctx = aci_vrf.vrf1.id +# Create Logical Firewall Representation (3rd party example) + +resource "aci_cloud_l4_l7_third_party_device" "third_pa_fw" { + # tenant_dn = data.aci_tenant.infra_tenant.id + tenant_dn = data.aci_tenant.tf_tenant.id # aci_tenant.tf_tenant.id + name = "tf_third_party_fw" + # relation_cloud_rs_ldev_to_ctx = data.aci_vrf.services_vrf.id + relation_cloud_rs_ldev_to_ctx = data.aci_vrf.tf_vrf.id #aci_vrf.vrf1.id interface_selectors { - allow_all = "no" - name = "Interface_1" - end_point_selectors { - match_expression = "IP=='1.1.1.21/24'" - name = "Interface_1_ep_1" - } + allow_all = "yes" + name = "trust" end_point_selectors { - match_expression = "custom:Name1=='admin-ep1'" - name = "Interface_1_ep_2" + match_expression = "custom:internal=='trust'" + name = "trust" } } interface_selectors { - allow_all = "no" - name = "Interface_2" + allow_all = "yes" + name = "untrust" end_point_selectors { - match_expression = "IP=='1.1.1.21/24'" - name = "Interface_2_ep_1" - } - end_point_selectors { - match_expression = "custom:Name1=='admin-ep1'" - name = "Interface_2_ep_2" + match_expression = "custom:external=='untrust'" + name = "untrust" } } } -# Third-Party Load Balancer -resource "aci_cloud_l4_l7_third_party_device" "cloud_third_party_lb" { - tenant_dn = aci_tenant.tf_tenant.id - name = "cloud_third_party_lb" - service_type = "ADC" - - aaa_domain_dn = [ - aci_aaa_domain.aaa_domain_1.id - ] - relation_cloud_rs_ldev_to_ctx = aci_vrf.vrf1.id +# Create Native Network Load Balancer for Firewall - interface_selectors { - allow_all = "no" - name = "Interface_1" - end_point_selectors { - match_expression = "IP=='1.1.1.21/24'" - name = "Interface_1_ep_1" - } - end_point_selectors { - match_expression = "custom:Name1=='admin-ep1'" - name = "Interface_1_ep_2" - } - } +resource "aci_cloud_l4_l7_native_load_balancer" "cloud_nlb" { + # tenant_dn = data.aci_tenant.infra_tenant.id + tenant_dn = data.aci_tenant.tf_tenant.id # aci_tenant.tf_tenant.id + name = "tf_cloud_nlb" + # relation_cloud_rs_ldev_to_cloud_subnet = [data.aci_cloud_subnet.cs1.id, data.aci_cloud_subnet.cs2.id] + relation_cloud_rs_ldev_to_cloud_subnet = [data.aci_cloud_subnet.cs1.id] + allow_all = "yes" + is_static_ip = "yes" + # static_ip_address = ["10.40.20.0", "10.20.0.0"] + static_ip_address = ["10.20.0.0"] + scheme = "internal" + cloud_l4l7_load_balancer_type = "network" } -# Service Graph Part -resource "aci_l4_l7_service_graph_template" "cloud_service_graph" { - tenant_dn = aci_tenant.tf_tenant.id - name = "cloud_service_graph" +resource "aci_l4_l7_service_graph_template" "tf_sg" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "tf_sg_1" l4_l7_service_graph_template_type = "cloud" } -resource "aci_function_node" "function_node_0" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id +resource "aci_function_node" "tf_nlb" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id name = "N0" func_template_type = "ADC_ONE_ARM" - managed = "yes" - relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_native_load_balancer.cloud_native_alb.id + # routing_mode = "Redirect" # No option to set Redirect on consumer and provider connector types + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_native_load_balancer.cloud_nlb.id + managed = "yes" } -resource "aci_function_node" "function_node_1" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id - name = "N2" - func_template_type = "OTHER" - managed = "no" - relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.cloud_third_party_lb.id +resource "aci_function_node" "tf_fw" { # does not get configured + l4_l7_service_graph_template_dn = aci_function_node.tf_nlb.l4_l7_service_graph_template_dn + name = "N1" + func_template_type = "FW_ROUTED" + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_pa_fw.id + l4_l7_device_interface_consumer_name = "trust" + l4_l7_device_interface_provider_name = "untrust" + managed = "no" +} + +# Create L4-L7 Service Graph template T1 connection. +resource "aci_connection" "t1-n0" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id + name = "CON0" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_l4_l7_service_graph_template.tf_sg.term_cons_dn, + aci_function_node.tf_nlb.conn_consumer_dn + ] +} + +resource "aci_connection" "n0-n1" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id + name = "CON1" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_function_node.tf_nlb.conn_provider_dn, + aci_function_node.tf_fw.conn_consumer_dn + ] +} + +resource "aci_connection" "n1-t1" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id + name = "CON2" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_function_node.tf_fw.conn_provider_dn, + aci_l4_l7_service_graph_template.tf_sg.term_prov_dn + ] +} + + +resource "aci_l4_l7_service_graph_template" "tf_sg2" { + tenant_dn = data.aci_tenant.tf_tenant.id + name = "tf_sg_2" + l4_l7_service_graph_template_type = "cloud" +} + +resource "aci_function_node" "tf_nlb2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id + name = "N0" + func_template_type = "ADC_ONE_ARM" + routing_mode = "Redirect" + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_native_load_balancer.cloud_nlb.id + managed = "yes" + l4_l7_device_interface_consumer_connector_type = "none" + l4_l7_device_interface_provider_connector_type = "redir" } -resource "aci_function_node" "function_node_2" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id +resource "aci_function_node" "tf_fw2" { # does not get configured + l4_l7_service_graph_template_dn = aci_function_node.tf_nlb2.l4_l7_service_graph_template_dn name = "N1" func_template_type = "FW_ROUTED" - managed = "no" - relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.cloud_third_party_fw.id - l4_l7_device_interface_consumer_name = "Interface_1" - l4_l7_device_interface_provider_name = "Interface_2" -} - -resource "aci_connection" "consumer" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id - name = "CON0" - adj_type = "L3" - conn_dir = "consumer" - conn_type = "external" - direct_connect = "yes" - unicast_route = "yes" - relation_vns_rs_abs_connection_conns = [ - aci_l4_l7_service_graph_template.cloud_service_graph.term_cons_dn, - aci_function_node.function_node_0.conn_consumer_dn, - ] -} - -resource "aci_connection" "consumer_provider_1" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id - name = "CON1" - adj_type = "L3" - conn_type = "external" - direct_connect = "yes" - unicast_route = "yes" - relation_vns_rs_abs_connection_conns = [ - aci_function_node.function_node_1.conn_consumer_dn, - aci_function_node.function_node_0.conn_provider_dn - ] -} - -resource "aci_connection" "consumer_provider_2" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id - name = "CON2" - adj_type = "L3" - conn_type = "external" - direct_connect = "yes" - unicast_route = "yes" - relation_vns_rs_abs_connection_conns = [ - aci_function_node.function_node_1.conn_provider_dn, - aci_function_node.function_node_2.conn_consumer_dn - ] -} - -resource "aci_connection" "provider" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id - name = "CON3" - adj_type = "L3" - conn_dir = "provider" - conn_type = "external" - direct_connect = "yes" - unicast_route = "yes" - relation_vns_rs_abs_connection_conns = [ - aci_l4_l7_service_graph_template.cloud_service_graph.term_prov_dn, - aci_function_node.function_node_2.conn_provider_dn - ] + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_pa_fw.id + l4_l7_device_interface_consumer_name = "trust" + l4_l7_device_interface_provider_name = "untrust" + l4_l7_device_interface_consumer_connector_type = "redir" + l4_l7_device_interface_provider_connector_type = "snat" + l4_l7_device_interface_consumer_att_notify = "no" + l4_l7_device_interface_provider_att_notify = "yes" + managed = "no" +} + +# Create L4-L7 Service Graph template T1 connection. +resource "aci_connection" "t1-n0-2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id + name = "CON0" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_l4_l7_service_graph_template.tf_sg2.term_cons_dn, + aci_function_node.tf_nlb2.conn_consumer_dn + ] +} + +resource "aci_connection" "n0-n1-2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id + name = "CON1" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_function_node.tf_nlb2.conn_provider_dn, + aci_function_node.tf_fw2.conn_consumer_dn + ] +} + +resource "aci_connection" "n1-t1-2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id + name = "CON2" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "no" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_function_node.tf_fw2.conn_provider_dn, + aci_l4_l7_service_graph_template.tf_sg2.term_prov_dn + ] } \ No newline at end of file From 533498ff52a22f28dad0861fb68fc8efb885d32a Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Fri, 1 Mar 2024 16:32:10 -0800 Subject: [PATCH 03/10] [ignore] Adding vendor files. --- examples/l4_l7_service_graph_template/main.tf | 369 +++++++++--------- go.mod | 4 +- go.sum | 12 +- .../v2/client/service_manager.go | 5 + .../v2/models/vns_abs_func_conn.go | 3 + vendor/modules.txt | 3 +- 6 files changed, 201 insertions(+), 195 deletions(-) diff --git a/examples/l4_l7_service_graph_template/main.tf b/examples/l4_l7_service_graph_template/main.tf index 19ee3e5c4..c5b68bb58 100644 --- a/examples/l4_l7_service_graph_template/main.tf +++ b/examples/l4_l7_service_graph_template/main.tf @@ -5,239 +5,226 @@ terraform { } } } -# provider "aci" { #azure 26 -# username = "admin" -# password = "C!sco123456$" -# url = "https://172.167.14.72/" -# insecure = true -# } provider "aci" { - username = "ansible_github_ci" - password = "sJ94G92#8dq2hx*K4qh" - url = "https://20.253.151.162" + username = "" + password = "" + url = "" insecure = true } +resource "aci_tenant" "tf_tenant" { + name = "tf_tenant" +} - -data "aci_tenant" "tf_tenant" { - name = "ansible_test_anv" +# VRF setup part +resource "aci_vrf" "vrf1" { + tenant_dn = aci_tenant.tf_tenant.id + name = "vrf-1" } -data "aci_vrf" "tf_vrf" { - tenant_dn = data.aci_tenant.tf_tenant.id - name = "vrf_anv" + +# AAA Domain setup part +resource "aci_aaa_domain" "aaa_domain_1" { + name = "aaa_domain_1" } -data "aci_cloud_context_profile" "ccp1" { - tenant_dn = data.aci_tenant.tf_tenant.id - name = "ccp" +resource "aci_cloud_context_profile" "ctx1" { + name = "tf_ctx1" + tenant_dn = aci_tenant.tf_tenant.id + primary_cidr = "10.1.0.0/16" + region = "westus" + cloud_vendor = "azure" + relation_cloud_rs_to_ctx = aci_vrf.vrf1.id + hub_network = "uni/tn-infra/gwrouterp-default" } -data "aci_cloud_cidr_pool" "cidr1" { - cloud_context_profile_dn = data.aci_cloud_context_profile.ccp1.id - addr = "10.20.0.0/25" + +resource "aci_cloud_cidr_pool" "cloud_cidr_pool" { + cloud_context_profile_dn = aci_cloud_context_profile.ctx1.id + addr = "10.1.0.0/16" } -data "aci_cloud_subnet" "cs1" { - cloud_cidr_pool_dn = data.aci_cloud_cidr_pool.cidr1.id - ip = "10.20.0.0/25" + +data "aci_cloud_provider_profile" "cloud_profile" { + vendor = "azure" } -data "aci_cloud_context_profile" "ccp2" { - tenant_dn = data.aci_tenant.tf_tenant.id - name = "ccp_anv2" +data "aci_cloud_providers_region" "cloud_region" { + cloud_provider_profile_dn = data.aci_cloud_provider_profile.cloud_profile.id + name = "westus" } -data "aci_cloud_cidr_pool" "cidr2" { - cloud_context_profile_dn = data.aci_cloud_context_profile.ccp2.id - addr = "10.40.20.0/16" + +data "aci_cloud_availability_zone" "region_availability_zone" { + cloud_providers_region_dn = data.aci_cloud_providers_region.cloud_region.id + name = "default" } -data "aci_cloud_subnet" "cs2" { - cloud_cidr_pool_dn = data.aci_cloud_cidr_pool.cidr2.id - ip = "10.40.20.0/24" + +resource "aci_cloud_subnet" "cloud_subnet" { + cloud_cidr_pool_dn = aci_cloud_cidr_pool.cloud_cidr_pool.id + ip = "10.1.1.0/24" + usage = "gateway" + zone = data.aci_cloud_availability_zone.region_availability_zone.id + scope = ["shared", "private", "public"] } +# Application Load Balancer +resource "aci_cloud_l4_l7_native_load_balancer" "cloud_native_alb" { + tenant_dn = aci_tenant.tf_tenant.id + name = "cloud_native_alb" + aaa_domain_dn = [ + aci_aaa_domain.aaa_domain_1.id + ] + relation_cloud_rs_ldev_to_cloud_subnet = [ + aci_cloud_subnet.cloud_subnet.id + ] + cloud_l4l7_load_balancer_type = "application" + is_static_ip = "yes" + static_ip_address = ["10.1.1.0"] +} -# Create Logical Firewall Representation (3rd party example) +# Third-Party Firewall +resource "aci_cloud_l4_l7_third_party_device" "cloud_third_party_fw" { + tenant_dn = aci_tenant.tf_tenant.id + name = "cloud_third_party_fw" + service_type = "FW" -resource "aci_cloud_l4_l7_third_party_device" "third_pa_fw" { - # tenant_dn = data.aci_tenant.infra_tenant.id - tenant_dn = data.aci_tenant.tf_tenant.id # aci_tenant.tf_tenant.id - name = "tf_third_party_fw" - # relation_cloud_rs_ldev_to_ctx = data.aci_vrf.services_vrf.id - relation_cloud_rs_ldev_to_ctx = data.aci_vrf.tf_vrf.id #aci_vrf.vrf1.id + aaa_domain_dn = [ + aci_aaa_domain.aaa_domain_1.id + ] + relation_cloud_rs_ldev_to_ctx = aci_vrf.vrf1.id interface_selectors { - allow_all = "yes" - name = "trust" + allow_all = "no" + name = "Interface_1" + end_point_selectors { + match_expression = "IP=='1.1.1.21/24'" + name = "Interface_1_ep_1" + } end_point_selectors { - match_expression = "custom:internal=='trust'" - name = "trust" + match_expression = "custom:Name1=='admin-ep1'" + name = "Interface_1_ep_2" } } interface_selectors { - allow_all = "yes" - name = "untrust" + allow_all = "no" + name = "Interface_2" end_point_selectors { - match_expression = "custom:external=='untrust'" - name = "untrust" + match_expression = "IP=='1.1.1.21/24'" + name = "Interface_2_ep_1" + } + end_point_selectors { + match_expression = "custom:Name1=='admin-ep1'" + name = "Interface_2_ep_2" } } } -# Create Native Network Load Balancer for Firewall +# Third-Party Load Balancer +resource "aci_cloud_l4_l7_third_party_device" "cloud_third_party_lb" { + tenant_dn = aci_tenant.tf_tenant.id + name = "cloud_third_party_lb" + service_type = "ADC" -resource "aci_cloud_l4_l7_native_load_balancer" "cloud_nlb" { - # tenant_dn = data.aci_tenant.infra_tenant.id - tenant_dn = data.aci_tenant.tf_tenant.id # aci_tenant.tf_tenant.id - name = "tf_cloud_nlb" - # relation_cloud_rs_ldev_to_cloud_subnet = [data.aci_cloud_subnet.cs1.id, data.aci_cloud_subnet.cs2.id] - relation_cloud_rs_ldev_to_cloud_subnet = [data.aci_cloud_subnet.cs1.id] - allow_all = "yes" - is_static_ip = "yes" - # static_ip_address = ["10.40.20.0", "10.20.0.0"] - static_ip_address = ["10.20.0.0"] - scheme = "internal" - cloud_l4l7_load_balancer_type = "network" + aaa_domain_dn = [ + aci_aaa_domain.aaa_domain_1.id + ] + relation_cloud_rs_ldev_to_ctx = aci_vrf.vrf1.id + + interface_selectors { + allow_all = "no" + name = "Interface_1" + end_point_selectors { + match_expression = "IP=='1.1.1.21/24'" + name = "Interface_1_ep_1" + } + end_point_selectors { + match_expression = "custom:Name1=='admin-ep1'" + name = "Interface_1_ep_2" + } + } } -resource "aci_l4_l7_service_graph_template" "tf_sg" { - tenant_dn = data.aci_tenant.tf_tenant.id - name = "tf_sg_1" +# Service Graph Part +resource "aci_l4_l7_service_graph_template" "cloud_service_graph" { + tenant_dn = aci_tenant.tf_tenant.id + name = "cloud_service_graph" l4_l7_service_graph_template_type = "cloud" } -resource "aci_function_node" "tf_nlb" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id +resource "aci_function_node" "function_node_0" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id name = "N0" func_template_type = "ADC_ONE_ARM" - # routing_mode = "Redirect" # No option to set Redirect on consumer and provider connector types - relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_native_load_balancer.cloud_nlb.id - managed = "yes" + managed = "yes" + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_native_load_balancer.cloud_native_alb.id } -resource "aci_function_node" "tf_fw" { # does not get configured - l4_l7_service_graph_template_dn = aci_function_node.tf_nlb.l4_l7_service_graph_template_dn - name = "N1" - func_template_type = "FW_ROUTED" - relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_pa_fw.id - l4_l7_device_interface_consumer_name = "trust" - l4_l7_device_interface_provider_name = "untrust" - managed = "no" -} - -# Create L4-L7 Service Graph template T1 connection. -resource "aci_connection" "t1-n0" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id - name = "CON0" - adj_type = "L3" - conn_dir = "provider" - conn_type = "external" - direct_connect = "no" - unicast_route = "yes" - relation_vns_rs_abs_connection_conns = [ - aci_l4_l7_service_graph_template.tf_sg.term_cons_dn, - aci_function_node.tf_nlb.conn_consumer_dn - ] -} - -resource "aci_connection" "n0-n1" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id - name = "CON1" - adj_type = "L3" - conn_dir = "provider" - conn_type = "external" - direct_connect = "no" - unicast_route = "yes" - relation_vns_rs_abs_connection_conns = [ - aci_function_node.tf_nlb.conn_provider_dn, - aci_function_node.tf_fw.conn_consumer_dn - ] -} - -resource "aci_connection" "n1-t1" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id - name = "CON2" - adj_type = "L3" - conn_dir = "provider" - conn_type = "external" - direct_connect = "no" - unicast_route = "yes" - relation_vns_rs_abs_connection_conns = [ - aci_function_node.tf_fw.conn_provider_dn, - aci_l4_l7_service_graph_template.tf_sg.term_prov_dn - ] -} - - -resource "aci_l4_l7_service_graph_template" "tf_sg2" { - tenant_dn = data.aci_tenant.tf_tenant.id - name = "tf_sg_2" - l4_l7_service_graph_template_type = "cloud" -} - -resource "aci_function_node" "tf_nlb2" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id - name = "N0" - func_template_type = "ADC_ONE_ARM" - routing_mode = "Redirect" - relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_native_load_balancer.cloud_nlb.id - managed = "yes" - l4_l7_device_interface_consumer_connector_type = "none" - l4_l7_device_interface_provider_connector_type = "redir" +resource "aci_function_node" "function_node_1" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id + name = "N2" + func_template_type = "OTHER" + managed = "no" + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.cloud_third_party_lb.id } -resource "aci_function_node" "tf_fw2" { # does not get configured - l4_l7_service_graph_template_dn = aci_function_node.tf_nlb2.l4_l7_service_graph_template_dn +resource "aci_function_node" "function_node_2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id name = "N1" func_template_type = "FW_ROUTED" - relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_pa_fw.id - l4_l7_device_interface_consumer_name = "trust" - l4_l7_device_interface_provider_name = "untrust" - l4_l7_device_interface_consumer_connector_type = "redir" - l4_l7_device_interface_provider_connector_type = "snat" - l4_l7_device_interface_consumer_att_notify = "no" - l4_l7_device_interface_provider_att_notify = "yes" - managed = "no" -} - -# Create L4-L7 Service Graph template T1 connection. -resource "aci_connection" "t1-n0-2" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id - name = "CON0" - adj_type = "L3" - conn_dir = "provider" - conn_type = "external" - direct_connect = "no" - unicast_route = "yes" - relation_vns_rs_abs_connection_conns = [ - aci_l4_l7_service_graph_template.tf_sg2.term_cons_dn, - aci_function_node.tf_nlb2.conn_consumer_dn - ] -} - -resource "aci_connection" "n0-n1-2" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id - name = "CON1" - adj_type = "L3" - conn_dir = "provider" - conn_type = "external" - direct_connect = "no" - unicast_route = "yes" - relation_vns_rs_abs_connection_conns = [ - aci_function_node.tf_nlb2.conn_provider_dn, - aci_function_node.tf_fw2.conn_consumer_dn - ] -} - -resource "aci_connection" "n1-t1-2" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id - name = "CON2" - adj_type = "L3" - conn_dir = "provider" - conn_type = "external" - direct_connect = "no" - unicast_route = "yes" - relation_vns_rs_abs_connection_conns = [ - aci_function_node.tf_fw2.conn_provider_dn, - aci_l4_l7_service_graph_template.tf_sg2.term_prov_dn - ] + managed = "no" + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.cloud_third_party_fw.id + l4_l7_device_interface_consumer_name = "Interface_1" + l4_l7_device_interface_provider_name = "Interface_2" +} + +resource "aci_connection" "consumer" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id + name = "CON0" + adj_type = "L3" + conn_dir = "consumer" + conn_type = "external" + direct_connect = "yes" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_l4_l7_service_graph_template.cloud_service_graph.term_cons_dn, + aci_function_node.function_node_0.conn_consumer_dn, + ] +} + +resource "aci_connection" "consumer_provider_1" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id + name = "CON1" + adj_type = "L3" + conn_type = "external" + direct_connect = "yes" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_function_node.function_node_1.conn_consumer_dn, + aci_function_node.function_node_0.conn_provider_dn + ] +} + +resource "aci_connection" "consumer_provider_2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id + name = "CON2" + adj_type = "L3" + conn_type = "external" + direct_connect = "yes" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_function_node.function_node_1.conn_provider_dn, + aci_function_node.function_node_2.conn_consumer_dn + ] +} + +resource "aci_connection" "provider" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.cloud_service_graph.id + name = "CON3" + adj_type = "L3" + conn_dir = "provider" + conn_type = "external" + direct_connect = "yes" + unicast_route = "yes" + relation_vns_rs_abs_connection_conns = [ + aci_l4_l7_service_graph_template.cloud_service_graph.term_prov_dn, + aci_function_node.function_node_2.conn_provider_dn + ] } \ No newline at end of file diff --git a/go.mod b/go.mod index a3636aea6..db6ecddd0 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,11 @@ module github.com/CiscoDevNet/terraform-provider-aci/v2 +replace github.com/ciscoecosystem/aci-go-client/v2 => /Users/anvjain/Terraform/ACI/aci-go-client + go 1.18 require ( - github.com/ciscoecosystem/aci-go-client/v2 v2.26.0 + github.com/ciscoecosystem/aci-go-client/v2 v2.27.0 github.com/ghodss/yaml v1.0.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-framework v1.4.2 diff --git a/go.sum b/go.sum index c2c7a2693..d7dcbc7b6 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,9 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= @@ -23,13 +26,13 @@ github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJE github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/ciscoecosystem/aci-go-client/v2 v2.26.0 h1:mqg8TESEchmhiIhbri+VAE7UasBl4ywIpgh6j9uiscg= -github.com/ciscoecosystem/aci-go-client/v2 v2.26.0/go.mod h1:0uk5hiHANgXo+0h+Z8dFBriB7hHnI0PSGVUm7/20bt4= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= @@ -170,6 +173,7 @@ github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv2 github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= @@ -202,6 +206,7 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -224,6 +229,7 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= @@ -233,8 +239,10 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/vendor/github.com/ciscoecosystem/aci-go-client/v2/client/service_manager.go b/vendor/github.com/ciscoecosystem/aci-go-client/v2/client/service_manager.go index bfe3fcffc..173de4d60 100644 --- a/vendor/github.com/ciscoecosystem/aci-go-client/v2/client/service_manager.go +++ b/vendor/github.com/ciscoecosystem/aci-go-client/v2/client/service_manager.go @@ -103,6 +103,11 @@ func CheckForErrors(cont *container.Container, method string, skipLoggingPayload log.Printf("[DEBUG] Exit from error 1, 107 or 120 %v", cont) } return nil + } else if errorCode == "202" { // Ignore errors of type "Request in progress" + if !skipLoggingPayload { + log.Printf("[DEBUG] Exit from error 202 %v", cont) + } + return nil } else { if (models.StripQuotes(imdata.Path("error.attributes.text").String()) == "" && errorCode == "403") || (errorCode == "401") { if !skipLoggingPayload { diff --git a/vendor/github.com/ciscoecosystem/aci-go-client/v2/models/vns_abs_func_conn.go b/vendor/github.com/ciscoecosystem/aci-go-client/v2/models/vns_abs_func_conn.go index ab1c1557f..78e4b3d0b 100644 --- a/vendor/github.com/ciscoecosystem/aci-go-client/v2/models/vns_abs_func_conn.go +++ b/vendor/github.com/ciscoecosystem/aci-go-client/v2/models/vns_abs_func_conn.go @@ -18,6 +18,7 @@ type FunctionConnectorAttributes struct { Name string `json:",omitempty"` Annotation string `json:",omitempty"` AttNotify string `json:",omitempty"` + ConnType string `json:",omitempty"` NameAlias string `json:",omitempty"` DeviceLIfName string `json:",omitempty"` } @@ -46,6 +47,7 @@ func (vnsAbsFuncConn *FunctionConnector) ToMap() (map[string]string, error) { A(vnsAbsFuncConnMap, "name", vnsAbsFuncConn.Name) A(vnsAbsFuncConnMap, "annotation", vnsAbsFuncConn.Annotation) A(vnsAbsFuncConnMap, "attNotify", vnsAbsFuncConn.AttNotify) + A(vnsAbsFuncConnMap, "connType", vnsAbsFuncConn.ConnType) A(vnsAbsFuncConnMap, "nameAlias", vnsAbsFuncConn.NameAlias) A(vnsAbsFuncConnMap, "deviceLIfName", vnsAbsFuncConn.DeviceLIfName) @@ -68,6 +70,7 @@ func FunctionConnectorFromContainerList(cont *container.Container, index int) *F Name: G(FunctionConnectorCont, "name"), Annotation: G(FunctionConnectorCont, "annotation"), AttNotify: G(FunctionConnectorCont, "attNotify"), + ConnType: G(FunctionConnectorCont, "connType"), NameAlias: G(FunctionConnectorCont, "nameAlias"), DeviceLIfName: G(FunctionConnectorCont, "deviceLIfName"), }, diff --git a/vendor/modules.txt b/vendor/modules.txt index fe749de7a..ebd5c9e3c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -24,7 +24,7 @@ github.com/agext/levenshtein # github.com/apparentlymart/go-textseg/v15 v15.0.0 ## explicit; go 1.16 github.com/apparentlymart/go-textseg/v15/textseg -# github.com/ciscoecosystem/aci-go-client/v2 v2.26.0 +# github.com/ciscoecosystem/aci-go-client/v2 v2.27.0 => /Users/anvjain/Terraform/ACI/aci-go-client ## explicit; go 1.12 github.com/ciscoecosystem/aci-go-client/v2/client github.com/ciscoecosystem/aci-go-client/v2/container @@ -459,3 +459,4 @@ google.golang.org/protobuf/types/known/timestamppb # gopkg.in/yaml.v2 v2.3.0 ## explicit gopkg.in/yaml.v2 +# github.com/ciscoecosystem/aci-go-client/v2 => /Users/anvjain/Terraform/ACI/aci-go-client From 967ceb4faf27dc5b6fb52a46548bcc8db1c2a01f Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Mon, 4 Mar 2024 10:18:03 -0800 Subject: [PATCH 04/10] [ignore] Fixed documentation for cloud_l4_l7_native_load_balancer by adding static_ip_address and added Type to the missing aruments in aci_connection docs. --- aci/data_source_aci_cloudlb.go | 2 +- .../cloud_l4_l7_native_load_balancer.md | 3 +- docs/data-sources/connection.md | 22 +- docs/data-sources/function_node.md | 6 +- .../cloud_l4_l7_native_load_balancer.md | 1 + docs/resources/connection.md | 25 +- docs/resources/function_node.md | 10 +- examples/l4_l7_service_graph_template/main.tf | 4 +- internal/provider/annotation_unsupported.go | 860 ------------------ internal/provider/provider.go | 22 +- ...d_l4_l7_native_load_balancer.html.markdown | 3 +- legacy-docs/docs/d/connection.html.markdown | 22 +- ...d_l4_l7_native_load_balancer.html.markdown | 1 + legacy-docs/docs/r/connection.html.markdown | 27 +- 14 files changed, 65 insertions(+), 943 deletions(-) delete mode 100644 internal/provider/annotation_unsupported.go diff --git a/aci/data_source_aci_cloudlb.go b/aci/data_source_aci_cloudlb.go index 65568871b..29cda1b5e 100644 --- a/aci/data_source_aci_cloudlb.go +++ b/aci/data_source_aci_cloudlb.go @@ -153,7 +153,7 @@ func dataSourceAciCloudL4L7LoadBalancer() *schema.Resource { "static_ip_address": &schema.Schema{ Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, + Computed: true, Set: schema.HashString, }, }), diff --git a/docs/data-sources/cloud_l4_l7_native_load_balancer.md b/docs/data-sources/cloud_l4_l7_native_load_balancer.md index e004fe1ef..cbab32513 100644 --- a/docs/data-sources/cloud_l4_l7_native_load_balancer.md +++ b/docs/data-sources/cloud_l4_l7_native_load_balancer.md @@ -70,4 +70,5 @@ data "aci_cloud_l4_l7_native_load_balancer" "example" { * `trunking` - (Read-Only) For virtual devices, if a trunking port group is to be used. Type: String. * `cloud_l4l7_load_balancer_type` - (Read-Only) Type of the Cloud L4-L7 Native Load Balancer object. Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Read-Only) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. -* `aaa_domain_dn` - (Read-Only) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. \ No newline at end of file +* `aaa_domain_dn` - (Read-Only) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. +* `static_ip_address` - (Read-Only) Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: Set of String. \ No newline at end of file diff --git a/docs/data-sources/connection.md b/docs/data-sources/connection.md index e0f94d463..5c28636ac 100644 --- a/docs/data-sources/connection.md +++ b/docs/data-sources/connection.md @@ -22,17 +22,17 @@ data "aci_connection" "check" { ## Argument Reference -- `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. -- `name` - (Required) Name of Object connection. +- `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. Type: String. +- `name` - (Required) Name of Object connection. Type: String. ## Attribute Reference -- `id` - Attribute id set to the Dn of the Connection. -- `adj_type` - Connector adjacency type. -- `annotation` - Annotation for object connection. -- `description` - Description for object connection. -- `conn_dir` - Connection direction for object connection. -- `conn_type` - Connection type for object connection. -- `direct_connect` - Direct connect for object connection. -- `name_alias` - Name alias for object connection. -- `unicast_route` - Unicast route for object connection. +- `id` - Attribute id set to the Dn of the Connection. Type: String. +- `adj_type` - Connector adjacency type. Type: String. +- `annotation` - Annotation for object connection. Type: String. +- `description` - Description for object connection. Type: String. +- `conn_dir` - Connection direction for object connection. Type: String. +- `conn_type` - Connection type for object connection. Type: String. +- `direct_connect` - Direct connect for object connection. Type: String. +- `name_alias` - Name alias for object connection. Type: String. +- `unicast_route` - Unicast route for object connection. Type: String. diff --git a/docs/data-sources/function_node.md b/docs/data-sources/function_node.md index 3fe9f8499..8380f3faf 100644 --- a/docs/data-sources/function_node.md +++ b/docs/data-sources/function_node.md @@ -53,8 +53,4 @@ data "aci_function_node" "example" { - `relation_vns_rs_node_to_l_dev` - (Read-Only) Represents the relation to Logical Device Abstraction (class vnsALDevIf). Type: String. - `relation_vns_rs_node_to_m_func` - (Read-Only) Represents the relation to Meta Function (class vnsMFunc). Type: String. - `relation_vns_rs_default_scope_to_term` - (Read-Only) Represents the relation to Terminal Abstract Class (class vnsATerm). Type: String. -- `relation_vns_rs_node_to_cloud_l_dev` - (Read-Only) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. -- `l4_l7_device_interface_consumer_connector_type` - (Read-Only) The connection type of the consumer interface. Type: String. -- `l4_l7_device_interface_provider_connector_type` - (Read-Only) The connection type of the provider interface. Type: String. -- `l4_l7_device_interface_consumer_att_notify` - (Read-Only) The consumer interface attribute notification. Type: String. -- `l4_l7_device_interface_provider_att_notify` - (Read-Only) The provider interface attribute notification. Type: String. \ No newline at end of file +- `relation_vns_rs_node_to_cloud_l_dev` - (Read-Only) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. \ No newline at end of file diff --git a/docs/resources/cloud_l4_l7_native_load_balancer.md b/docs/resources/cloud_l4_l7_native_load_balancer.md index 37199f70d..90947665e 100644 --- a/docs/resources/cloud_l4_l7_native_load_balancer.md +++ b/docs/resources/cloud_l4_l7_native_load_balancer.md @@ -96,6 +96,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Optional) Type of the Cloud L4-L7 Native Load Balancer object. Allowed values are "application", "network", and default value is "application". Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Optional) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Optional) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. +* `static_ip_address` - (Optional) Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: Set of String. ## Importing ## diff --git a/docs/resources/connection.md b/docs/resources/connection.md index f5e67ce91..d80c7588c 100644 --- a/docs/resources/connection.md +++ b/docs/resources/connection.md @@ -34,25 +34,24 @@ resource "aci_connection" "conn2" { ## Argument Reference -- `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. +- `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. Type: String. - `name` - (Required) Name of object connection. The valid connection name format is `CONX`, where X is a number starting with 0. Type: String. -- `adj_type` - (Optional) Connector adjacency type. Allowed values are "L2", "L3". Default value is "L2". -- `annotation` - (Optional) Annotation for object connection. -- `description` - (Optional) Description for object connection. -- `conn_dir` - (Optional) Connection directory for object connection. Allowed values are "consumer", "provider". Default value is "provider". -- `conn_type` - (Optional) Connection type of connection object. Allowed values are "external", "internal". Default value is "external". -- `direct_connect` - (Optional) Direct connect for object connection. Allowed values are "yes" and "no". Default value is "no". -- `name_alias` - (Optional) Name alias for object connection. -- `unicast_route` - (Optional) Unicast route for connection object. Unicast route setting should be true for L3 connections. Allowed values are "yes" and "no". Default value is "yes". - -- `relation_vns_rs_abs_copy_connection` - (Optional) List of relation to class vnsAConn. Cardinality - ONE_TO_M. Type - Set of String. -- `relation_vns_rs_abs_connection_conns` - (Optional) list of relation to class vnsAConn. Cardinality - ONE_TO_M. Type - Set of String. +- `adj_type` - (Optional) Connector adjacency type. Allowed values are "L2", "L3". Default value is "L2". Type: String. +- `annotation` - (Optional) Annotation for object connection. Type: String. +- `description` - (Optional) Description for object connection. Type: String. +- `conn_dir` - (Optional) Connection directory for object connection. Allowed values are "consumer", "provider". Default value is "provider". Type: String. +- `conn_type` - (Optional) Connection type of connection object. Allowed values are "external", "internal". Default value is "external". Type: String. +- `direct_connect` - (Optional) Direct connect for object connection. Allowed values are "yes" and "no". Default value is "no". Type: String. +- `name_alias` - (Optional) Name alias for object connection. Type: String. +- `unicast_route` - (Optional) Unicast route for connection object. Unicast route setting should be true for L3 connections. Allowed values are "yes" and "no". Default value is "yes". Type: String. + +- `relation_vns_rs_abs_copy_connection` - (Optional) List of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: Set of String. +- `relation_vns_rs_abs_connection_conns` - (Optional) list of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: Set of String. ## Attribute Reference The only attribute that this resource exports is the `id`, which is set to the Dn of the Connection. - ## Importing An existing Connection can be [imported][docs-import] into this resource via its Dn, via the following command: diff --git a/docs/resources/function_node.md b/docs/resources/function_node.md index 301331e3f..69b5730c6 100644 --- a/docs/resources/function_node.md +++ b/docs/resources/function_node.md @@ -38,17 +38,13 @@ resource "aci_function_node" "example" { share_encap = "yes" l4_l7_device_interface_consumer_name = "interface1" l4_l7_device_interface_provider_name = "interface2" - l4_l7_device_interface_consumer_connector_type = "none" - l4_l7_device_interface_provider_connector_type = "redir" - l4_l7_device_interface_consumer_att_notify = "no" - l4_l7_device_interface_provider_att_notify = "yes" } ``` ## Argument Reference - `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. Type: String. -- `name` - (Required) Name of the Function Node object. The valid function node format is `NX`, where X is a number starting with 0. Type: String. +- `name` - (Required) Name of the Function Node object. Type: String. - `annotation` - (Optional) Annotation of the Function Node object. Type: String. - `description` - (Optional) Description of the Function Node object. Type: String. - `func_template_type` - (Optional) Function Template type of the Function Node object. Allowed values: "OTHER", "FW_TRANS", "FW_ROUTED", "CLOUD_VENDOR_LB", "CLOUD_VENDOR_FW", "CLOUD_NATIVE_LB", "CLOUD_NATIVE_FW", "ADC_TWO_ARM", "ADC_ONE_ARM". Default value: "OTHER". Type: String. @@ -66,10 +62,6 @@ resource "aci_function_node" "example" { - `relation_vns_rs_node_to_m_func` - (Optional) Represents the relation to Meta Function (class vnsMFunc). Type: String. - `relation_vns_rs_default_scope_to_term` - (Optional) Represents the relation to Terminal Abstract Class (class vnsATerm). Type: String. - `relation_vns_rs_node_to_cloud_l_dev` - (Optional) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. -- `l4_l7_device_interface_consumer_connector_type` - (Optional) The connection type of the consumer interface. Allowed values: "none", "redir". Default value: "none". This argument can be set only when the function node is a "network load balancer" or "third party firewall". Type: String. -- `l4_l7_device_interface_provider_connector_type` - (Optional) The connection type of the provider interface. Allowed values: "none", "redir", "dnat", "snat", "snat_dnat". This argument can be set only when the function node is a "network load balancer" or "third party firewall". Default value: "none". Type: String. -- `l4_l7_device_interface_consumer_att_notify` - (Optional) The consumer interface attribute notification. Allowed values: "no", "yes". Default value: "no". Type: String. -- `l4_l7_device_interface_provider_att_notify` - (Optional) The provider interface attribute notification. Allowed values: "no", "yes". Default value: "no". Type: String. ## Importing diff --git a/examples/l4_l7_service_graph_template/main.tf b/examples/l4_l7_service_graph_template/main.tf index c5b68bb58..a12d44b64 100644 --- a/examples/l4_l7_service_graph_template/main.tf +++ b/examples/l4_l7_service_graph_template/main.tf @@ -76,8 +76,8 @@ resource "aci_cloud_l4_l7_native_load_balancer" "cloud_native_alb" { aci_cloud_subnet.cloud_subnet.id ] cloud_l4l7_load_balancer_type = "application" - is_static_ip = "yes" - static_ip_address = ["10.1.1.0"] + is_static_ip = "yes" + static_ip_address = ["10.1.1.0"] } # Third-Party Firewall diff --git a/internal/provider/annotation_unsupported.go b/internal/provider/annotation_unsupported.go deleted file mode 100644 index 5fea415d7..000000000 --- a/internal/provider/annotation_unsupported.go +++ /dev/null @@ -1,860 +0,0 @@ -// Code 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). - -package provider - -func UnsupportedAnnotationClasses() []string { - return []string{ - "aaaADomainRef", - "aaaAProvider", - "aaaARbacRule", - "aaaARetP", - "aaaAuthMethod", - "aaaBanner", - "aaaConfig", - "aaaDefinition", - "aaaEp", - "aaaProviderGroup", - "aaaRbacAnnotation", - "aaaRealm", - "aaaSystemUser", - "aaaUserAction", - "aclACL", - "aclL3ACE", - "actionACont", - "adcomARwi", - "adcomARwiAdvanced", - "adcomATsInfoUnit", - "adepgACont", - "adepgAElement", - "adepgAOrgUnit", - "adepgAResElement", - "adepgContE", - "adepgEntity", - "analyticsACfgSrv", - "analyticsACluster", - "analyticsFrom", - "analyticsRemoteNode", - "analyticsTarget", - "analyticsTo", - "apDockerName", - "apPluginName", - "arpAIfPol", - "authASvr", - "authASvrGroup", - "authBaseUsrAccP", - "bfdAIfP", - "bfdAIfPol", - "bfdAInstPol", - "bfdAMhIfPol", - "bfdAMhInstPol", - "bfdAMhNodePol", - "bfdAMicroBfdP", - "bfdANodeP", - "bfdAf", - "bgpAAsP", - "bgpACtxAddlPathPol", - "bgpACtxAfPol", - "bgpACtxPol", - "bgpADomainIdBase", - "bgpAExtP", - "bgpALocalAsnP", - "bgpAPeerP", - "bgpAPeerPfxPol", - "bgpARRP", - "bgpARtTarget", - "bgpARtTargetInstrP", - "bgpARtTargetP", - "bgpASiteOfOriginP", - "bgpAf", - "bgpAsnmpBgpTraps", - "callhomeADest", - "callhomeAGroup", - "callhomeASrc", - "cdpAIfPol", - "cloudAAEPg", - "cloudAAFilter", - "cloudAApicSubnet", - "cloudAApicSubnetPool", - "cloudAAwsFlowLogPol", - "cloudAAwsLogGroup", - "cloudAAwsProvider", - "cloudABaseEPg", - "cloudABdiId", - "cloudABfdP", - "cloudABfdPol", - "cloudABgpAsP", - "cloudABgpPeerP", - "cloudABrownfield", - "cloudACertStore", - "cloudACertificate", - "cloudACidr", - "cloudACloudSvcEPg", - "cloudAComputePol", - "cloudAController", - "cloudACtxProfile", - "cloudACtxUnderlayP", - "cloudADomP", - "cloudAEPSelector", - "cloudAEPSelectorDef", - "cloudAExtNetworkP", - "cloudAFrontendIPv4Addr", - "cloudAGatewayRouterP", - "cloudAGcpFlowLogPol", - "cloudAHealthProbe", - "cloudAHostBootstrapPol", - "cloudAHostIfP", - "cloudAHostRouterPol", - "cloudAIntNetworkP", - "cloudAIpSecTunnelIfP", - "cloudAIpv4AddrP", - "cloudAL3IfP", - "cloudAL3IntTunnelIfP", - "cloudAL3TunnelIfP", - "cloudALDev", - "cloudALIf", - "cloudAListener", - "cloudAListenerRule", - "cloudALoopbackIfP", - "cloudAMapping", - "cloudAMgmtPol", - "cloudANWParams", - "cloudANextHopIp", - "cloudAOspfAreaP", - "cloudAOspfIfP", - "cloudAParamPol", - "cloudAPool", - "cloudAProvResP", - "cloudAProvider", - "cloudARouterP", - "cloudARuleAction", - "cloudARuleCondition", - "cloudASelectedEP", - "cloudASubnet", - "cloudASvcEPg", - "cloudASvcPol", - "cloudATransitHubGwPol", - "cloudAVip", - "cloudAVirtualWanP", - "cloudAVpnGwPol", - "cloudAVpnNetworkP", - "cloudAVrfRouteLeakPol", - "cloudsecACapability", - "cloudsecAControl", - "cloudsecASaKeyP", - "cloudsecASaKeyPLocal", - "cloudsecASaKeyPRemote", - "cloudsecASaKeyStatus", - "cloudsecASaKeyStatusLocal", - "cloudsecASaKeyStatusRemote", - "cloudsecASpKeySt", - "cloudtemplateASubnetPool", - "commComp", - "commDefinition", - "commShell", - "commWeb", - "compAHvHealth", - "compAPltfmP", - "compAPvlanP", - "compASvcVM", - "compAVmmPltfmP", - "compAVmmSecP", - "compAccessP", - "compCont", - "compContE", - "compCtrlrP", - "compDomP", - "compElement", - "compEntity", - "compHost", - "compNameIdentEntity", - "compNic", - "compObj", - "compPHost", - "compPNic", - "compProvP", - "compUsrAccP", - "conditionCondP", - "conditionInfo", - "conditionLoggable", - "conditionRecord", - "conditionRetP", - "conditionSevAsnP", - "conditionSummary", - "configABackupP", - "coppACustomValues", - "coppAProfile", - "ctrlrDom", - "datetimeANtpAuthKey", - "datetimeANtpIFFKey", - "datetimeANtpProv", - "datetimeAPol", - "dbgACRulePCommon", - "dbgANodeInst", - "dbgacEpgCmn", - "dbgacFromEpCmn", - "dbgacFromEpgCmn", - "dbgacTenantSpaceCmn", - "dbgacToEpCmn", - "dbgacToEpgCmn", - "dbgexpExportP", - "dbgexpNodeStatus", - "dbgexpTechSupOnDBase", - "dhcpAInfraProvP", - "dhcpALbl", - "dhcpARelayP", - "dhcpAddr", - "dhcpNode", - "dhcpResp", - "dmemotltestAbsObject", - "dnsADomain", - "dnsALbl", - "dnsAProfile", - "dnsAProv", - "dnsepgADomain", - "dnsepgAMgmt", - "dnsepgASvr", - "dnsepgASvrGrp", - "dnsepgFault", - "dwdmAOptChnlIfPol", - "edmACapFlags", - "edmAOperCont", - "edmAStatsCont", - "edmCont", - "edmContE", - "edmElement", - "edmEntity", - "edmGroupP", - "edmMgrP", - "edmObj", - "eigrpAAuthIfP", - "eigrpACtxAfPol", - "eigrpAExtP", - "eigrpAIfP", - "eigrpAStubP", - "eptrkEpRslt", - "eqptALPort", - "eqptdiagpASynthObj", - "eqptdiagpCardTestSetOd", - "eqptdiagpExtChCardTsOd", - "eqptdiagpFcTsOd", - "eqptdiagpFpTsOd", - "eqptdiagpHealthPol", - "eqptdiagpLcTsOd", - "eqptdiagpLpTsOd", - "eqptdiagpPol", - "eqptdiagpPortTestSetBt", - "eqptdiagpPortTestSetHl", - "eqptdiagpPortTestSetOd", - "eqptdiagpSupCTsOd", - "eqptdiagpSysCTsOd", - "eqptdiagpTestSet", - "eqptdiagpTestSetBoot", - "eqptdiagpTestSetHealth", - "eqptdiagpTestSetOd", - "eventARetP", - "extdevSDWanASlaPol", - "extnwAInstPSubnet", - "extnwALIfP", - "extnwALNodeP", - "extnwDomP", - "extnwEPg", - "extnwOut", - "fabricACardPGrp", - "fabricACardS", - "fabricALink", - "fabricANode", - "fabricANodeBlk", - "fabricANodePEp", - "fabricANodePGrp", - "fabricANodeS", - "fabricAONodeS", - "fabricAOOSReln", - "fabricAPathIssues", - "fabricAPathS", - "fabricAPodBlk", - "fabricAPodS", - "fabricAPolGrp", - "fabricAPortBlk", - "fabricAPortPGrp", - "fabricAPortS", - "fabricAProfile", - "fabricAProtPol", - "fabricASubPortBlk", - "fabricCardP", - "fabricCardS", - "fabricComp", - "fabricDef", - "fabricDom", - "fabricInfrExP", - "fabricInfrP", - "fabricIntfPol", - "fabricL1IfPol", - "fabricL2BDPol", - "fabricL2DomPol", - "fabricL2IfPol", - "fabricL2InstPol", - "fabricL2PortSecurityPol", - "fabricL2ProtoComp", - "fabricL2ProtoPol", - "fabricL3CtxPol", - "fabricL3DomPol", - "fabricL3IfPol", - "fabricL3InstPol", - "fabricL3ProtoComp", - "fabricL3ProtoPol", - "fabricL4IfPol", - "fabricLeAPortPGrp", - "fabricMaintPol", - "fabricNodeGrp", - "fabricNodeP", - "fabricNodeS", - "fabricNodeToPathOverridePolicy", - "fabricNodeToPolicy", - "fabricPodGrp", - "fabricPol", - "fabricPolGrp", - "fabricPolicyGrpToMonitoring", - "fabricPortP", - "fabricPortS", - "fabricProfile", - "fabricProtoComp", - "fabricProtoConsFrom", - "fabricProtoConsTo", - "fabricProtoDomPol", - "fabricProtoIfPol", - "fabricProtoInstPol", - "fabricProtoPol", - "fabricQinqIfPol", - "fabricSelector", - "fabricSpAPortPGrp", - "fabricUtilInstPol", - "fabricVxlanInstPol", - "faultARetP", - "faultARsToRemote", - "faultAThrValue", - "faultInfo", - "fcAPinningLbl", - "fcAPinningP", - "fcprARs", - "fileARemoteHost", - "fileARemotePath", - "firmwareAFwP", - "firmwareAFwStatusCont", - "firmwareARunning", - "firmwareSource", - "frmwrkARelDelCont", - "frmwrkARelDelControl", - "fvAACrtrn", - "fvAAKeyChainPol", - "fvAAKeyPol", - "fvAAREpPUpdate", - "fvABD", - "fvABDPol", - "fvAClassifier", - "fvACont", - "fvACrRule", - "fvACrtrn", - "fvACtx", - "fvACtxRtSummPol", - "fvADeplCont", - "fvADnsAttr", - "fvADomP", - "fvADyAttr", - "fvAEPSelector", - "fvAEPSelectorDef", - "fvAEPgPathAtt", - "fvAEpAnycast", - "fvAEpDef", - "fvAEpNlb", - "fvAEpRetPol", - "fvAEpTag", - "fvAEpTaskAggr", - "fvAExtRoutableRemoteSitePodSubnet", - "fvAExtRoutes", - "fvAFBRGroup", - "fvAFBRMember", - "fvAFBRoute", - "fvAFabricExpRtctrlP", - "fvAFabricExtConnP", - "fvAIdAttr", - "fvAIntersiteConnP", - "fvAIntersiteConnPDef", - "fvAIntraVrfFabricImpRtctrlP", - "fvAIpAttr", - "fvAKeyChainPol", - "fvAKeyPol", - "fvAMacAttr", - "fvANode", - "fvAPeeringP", - "fvAPodConnP", - "fvAProtoAttr", - "fvAREpPCtrct", - "fvARogueExceptionMac", - "fvARouteDeployP", - "fvARsToRemote", - "fvARsToRemoteFC", - "fvARtSummSubnet", - "fvASCrtrn", - "fvASDWanPrefixTaskAggr", - "fvASiteConnP", - "fvAStAttr", - "fvAStCEp", - "fvAStIp", - "fvATg", - "fvAToBD", - "fvATp", - "fvAUsegAssocBD", - "fvAVip", - "fvAVmAttr", - "fvAttr", - "fvCEPg", - "fvComp", - "fvDef", - "fvDom", - "fvEPg", - "fvEPgToCollection", - "fvEPgToInterface", - "fvEp", - "fvFrom", - "fvL2Dom", - "fvL3Dom", - "fvNp", - "fvNwEp", - "fvPEp", - "fvRtScopeFrom", - "fvSyntheticIp", - "fvTo", - "fvUp", - "fvnsAAddrBlk", - "fvnsAAddrInstP", - "fvnsAEncapBlk", - "fvnsAInstP", - "fvnsAVlanInstP", - "fvnsAVsanInstP", - "fvnsAVxlanInstP", - "genericsARule", - "haHaTest", - "hcloudAExtPfx", - "hcloudAIntPfx", - "hcloudALeakedPfx", - "hcloudASvcResBase", - "hcloudATgStats", - "hcloudRouterStateOper", - "healthAInst", - "healthARetP", - "hostprotANamespace", - "hostprotASubj", - "hsrpAGroupP", - "hsrpAGroupPol", - "hsrpAIfP", - "hsrpAIfPol", - "hsrpASecVip", - "hvsContE", - "hvsNode", - "hvsUsegContE", - "iaclAProfile", - "igmpAIfP", - "igmpASnoopAccessGroup", - "igmpASnoopPol", - "igmpASnoopStaticGroup", - "infraAAccBndlGrp", - "infraAAccGrp", - "infraACEPg", - "infraACEp", - "infraADomP", - "infraAFcAccBndlGrp", - "infraAFunc", - "infraAIpP", - "infraANode", - "infraANodeP", - "infraANodeS", - "infraAONodeS", - "infraAPEPg", - "infraAPEp", - "infraAPathS", - "infraAccBaseGrp", - "infraAccGrp", - "infraDomP", - "infraDomainToNs", - "infraEPg", - "infraExP", - "infraFcAccGrp", - "infraFexBlk", - "infraFexGrp", - "infraGeNode", - "infraGeSnNode", - "infraLbl", - "infraNodeGrp", - "infraNodeS", - "infraPodGrp", - "infraPolGrp", - "infraPortP", - "infraPortS", - "infraProfile", - "infraSpAccGrp", - "infraToAInstP", - "ipANexthopEpP", - "ipANexthopP", - "ipARouteP", - "ipmcACtxPol", - "ipmcAIfPol", - "ipmcARepPol", - "ipmcASSMXlateP", - "ipmcAStRepPol", - "ipmcAStateLPol", - "ipmcsnoopMcSrc", - "ipmcsnoopRtrIf", - "ipmcsnoopTgtIf", - "ipsecAIsakmpPhase1Pol", - "ipsecAIsakmpPhase2Pol", - "l2AInstPol", - "l2extADomP", - "l2extAIfP", - "l2extAInstPSubnet", - "l2extALNodeP", - "l3extAConsLbl", - "l3extADefaultRouteLeakP", - "l3extADomP", - "l3extAFabricExtRoutingP", - "l3extAIfP", - "l3extAInstPSubnet", - "l3extAIp", - "l3extALNodeP", - "l3extAMember", - "l3extAProvLbl", - "l3extARogueExceptionMac", - "l3extARogueExceptionMacGroup", - "l3extARouteTagPol", - "l4AVxlanInstPol", - "lacpAEnhancedLagPol", - "lacpALagPol", - "leakAPrefix", - "leakARouteCont", - "leakASubnet", - "lldpAIfPol", - "macsecAAIfPol", - "macsecAAKeyChainPol", - "macsecAAKeyPol", - "macsecAAParamPol", - "macsecAIfPol", - "macsecAKeyChainPol", - "macsecAKeyPol", - "macsecAParamPol", - "maintAMaintP", - "maintUserNotif", - "mcpAIfPol", - "mdpAClassId", - "mdpADomP", - "mdpADomainPeeringPol", - "mdpAEntity", - "mdpANodeP", - "mdpAPeeringDomain", - "mdpAService", - "mdpATenant", - "mgmtAInstPSubnet", - "mgmtAIp", - "mgmtAZone", - "mldASnoopAccessGroup", - "mldASnoopPol", - "mldASnoopStaticGroup", - "moASubj", - "moModifiable", - "moOwnable", - "moResolvable", - "moTopProps", - "monATarget", - "monExportP", - "monGroup", - "monPol", - "monProtoP", - "monSecAuthP", - "monSrc", - "monSubj", - "monTarget", - "mplsAExtP", - "mplsAIfP", - "mplsALabelPol", - "mplsANodeSidP", - "mplsASrgbLabelPol", - "namingNamedIdentifiedObject", - "namingNamedObject", - "ndAIfPol", - "ndAPfxPol", - "netflowAExporterPol", - "netflowAFabExporterPol", - "netflowAMonitorPol", - "netflowARecordPol", - "netflowARsInterfaceToMonitor", - "netflowARsMonitorToExporter", - "netflowARsMonitorToRecord", - "netflowAVmmExporterPol", - "nwsAFwPol", - "nwsASrc", - "nwsASyslogSrc", - "oamExec", - "orchsElement", - "orchsEntity", - "ospfACtxPol", - "ospfAExtP", - "ospfAIfP", - "pconsRef", - "pimAIfP", - "pingAExec", - "pkiDefinition", - "pkiItem", - "plannerADomainTmpl", - "plannerAEpg", - "plannerAEpgDomain", - "plannerAEpgFilter", - "plannerAObject", - "plannerATmpl", - "plannerIPs", - "poeAIfPol", - "polAConfIssues", - "polADependentOn", - "polAObjToPolReln", - "polAPrToPol", - "polAttTgt", - "polComp", - "polCompl", - "polComplElem", - "polConsElem", - "polConsIf", - "polConsLbl", - "polCont", - "polCtrlr", - "polDef", - "polDefRoot", - "polDom", - "polIf", - "polInstr", - "polLbl", - "polNFromRef", - "polNToRef", - "polNs", - "polObj", - "polProvIf", - "polProvLbl", - "polRelnHolder", - "poolElement", - "poolPool", - "poolPoolMember", - "poolPoolable", - "ptpAACfg", - "ptpACfg", - "ptpAProfile", - "qosABuffer", - "qosACong", - "qosADot1PClass", - "qosADppPol", - "qosADscpClass", - "qosADscpTrans", - "qosAMplsEgressRule", - "qosAMplsIngressRule", - "qosAQueue", - "qosASched", - "qosAUburst", - "qosClassification", - "qosMplsMarking", - "relnFrom", - "relnInst", - "relnTaskRef", - "relnTo", - "resolutionARsToRemote", - "rtctrlAAttrP", - "rtctrlAMatchAsPathRegexTerm", - "rtctrlAMatchCommFactor", - "rtctrlAMatchCommRegexTerm", - "rtctrlAMatchCommTerm", - "rtctrlAMatchIpRule", - "rtctrlAMatchRtType", - "rtctrlAMatchRule", - "rtctrlASetASPath", - "rtctrlASetASPathASN", - "rtctrlASetComm", - "rtctrlASetDamp", - "rtctrlASetNh", - "rtctrlASetNhUnchanged", - "rtctrlASetOspfFwdAddr", - "rtctrlASetOspfNssa", - "rtctrlASetPolicyTag", - "rtctrlASetPref", - "rtctrlASetRedistMultipath", - "rtctrlASetRtMetric", - "rtctrlASetRtMetricType", - "rtctrlASetRule", - "rtctrlASetTag", - "rtctrlASetWeight", - "rtctrlASubnet", - "rtdmcAASMPatPol", - "rtdmcAAutoRPPol", - "rtdmcABDFilter", - "rtdmcABDPol", - "rtdmcABSRFilter", - "rtdmcABSRPPol", - "rtdmcABidirPatPol", - "rtdmcACSWEntry", - "rtdmcACSWPol", - "rtdmcACtxPol", - "rtdmcAExtP", - "rtdmcAFilterPol", - "rtdmcAIfPol", - "rtdmcAIfPolCont", - "rtdmcAInterVRFEntry", - "rtdmcAInterVRFPol", - "rtdmcAJPFilterPol", - "rtdmcAMAFilter", - "rtdmcANbrFilterPol", - "rtdmcAPatPol", - "rtdmcARPGrpRangePol", - "rtdmcARPPol", - "rtdmcARegTrPol", - "rtdmcAResPol", - "rtdmcARtMapEntry", - "rtdmcARtMapPol", - "rtdmcASGRangeExpPol", - "rtdmcASSMPatPol", - "rtdmcASSMRangePol", - "rtdmcASharedRangePol", - "rtdmcAStaticRPEntry", - "rtdmcAStaticRPPol", - "ruleDefinition", - "ruleItem", - "ruleRequirement", - "ruleSizeRequirement", - "snmpAClientGrpP", - "snmpAClientP", - "snmpACommunityP", - "snmpACtrlrInst", - "snmpACtxP", - "snmpAPol", - "snmpATrapFwdServerP", - "snmpAUserP", - "snmpUser", - "spanACEpDef", - "spanADest", - "spanASpanLbl", - "spanASrc", - "spanASrcGrp", - "spanAToCEp", - "spanAVDest", - "spanAVDestGrp", - "spanAVSrc", - "spanAVSrcGrp", - "statsAALbStats", - "statsAColl", - "statsAGcpNWStatsObj", - "statsANWStatsObj", - "statsANlbStats", - "statsAThrP", - "statsATunnel", - "statsDebugItem", - "statsItem", - "stpAIfPol", - "svccoreACore", - "svccorePol", - "synceAAIfPol", - "synceAIfPol", - "syntheticAContext", - "syntheticATestObj", - "syntheticCTestObj", - "syntheticObject", - "syntheticTLTestObj", - "sysdebugFile", - "sysdebugLogBehavior", - "sysdebugRepository", - "sysfileEp", - "sysfileInstance", - "sysfileRepository", - "tagASelector", - "tagAnnotation", - "tagTag", - "taskExec", - "telemetryAFlowServers", - "telemetryAFteEvents", - "telemetryAFteEventsExt", - "telemetryAFteEventsTcpFlags", - "telemetryARemoteServer", - "telemetryAServer", - "telemetryAServerP", - "telemetryAServerPol", - "telemetryAStreamEnable", - "throttlerASub", - "topRoot", - "tracerouteAExec", - "traceroutepTrP", - "trigATriggeredWindow", - "trigExecutable", - "trigInst", - "trigSchedWindow", - "trigSchedWindowP", - "trigSingleTriggerable", - "trigTriggerable", - "trigWindow", - "usegAUsegEPg", - "vmmACapInfo", - "vmmACapObj", - "vmmAUplinkP", - "vmmAUplinkPCont", - "vmmCFaultInfo", - "vmmEpgAggr", - "vmmInjectedObject", - "vnsACCfg", - "vnsACCfgRel", - "vnsAConn", - "vnsAConnection", - "vnsAEPpInfo", - "vnsAFolder", - "vnsAFuncConn", - "vnsAFuncNode", - "vnsAGraph", - "vnsAL4L7ServiceFault", - "vnsALDev", - "vnsALDevCtx", - "vnsALDevIf", - "vnsALDevLIf", - "vnsALIf", - "vnsALIfCtx", - "vnsAMgmt", - "vnsANode", - "vnsAParam", - "vnsATerm", - "vnsATermConn", - "vnsATermNode", - "vnsAVRoutingNetworks", - "vnsAbsTermNode", - "vnsDevItem", - "vnsLBReq", - "vnsNATReq", - "vnsOrchReq", - "vnsOrchResp", - "vsanARsVsanPathAtt", - "vsanARtVsanPathAtt", - "vsvcAConsLbl", - "vsvcAProvLbl", - "vzABrCP", - "vzACollection", - "vzACompLbl", - "vzACtrct", - "vzAFiltEntry", - "vzAFiltPZEntry", - "vzAFilter", - "vzAFilterable", - "vzAFilterableUnit", - "vzAIf", - "vzALbl", - "vzARuleOwner", - "vzASTerm", - "vzASubj", - "vzATerm", - "vzAnyToCollection", - "vzAnyToInterface", - "vzInterfaceToCollection", - "vzSubjectToFilter", - "vzToRFltP", - "xcvrOpticsFabIfPol", - "xcvrOpticsIfPol", - } -} diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 28585b501..3131d128b 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -147,7 +147,7 @@ func (p *AciProvider) Configure(ctx context.Context, req provider.ConfigureReque isInsecure := stringToBool(resp, "insecure", getStringAttribute(data.IsInsecure, "ACI_INSECURE"), true) validateRelationDn := stringToBool(resp, "insecure", getStringAttribute(data.ValidateRelationDn, "ACI_VAL_REL_DN"), true) maxRetries := stringToInt(resp, "retries", getStringAttribute(data.MaxRetries, "ACI_RETRIES"), 2) - setGlobalAnnotation(data.Annotation, "ACI_ANNOTATION") + annotation := getStringAttribute(data.Annotation, "ACI_ANNOTATION") if username == "" { resp.Diagnostics.AddError( @@ -190,6 +190,12 @@ func (p *AciProvider) Configure(ctx context.Context, req provider.ConfigureReque aciClient = client.GetClient(url, username, client.PrivateKey(privateKey), client.AdminCert(certName), client.Insecure(isInsecure), client.ProxyUrl(proxyUrl), client.ProxyCreds(proxyCreds), client.ValidateRelationDn(validateRelationDn), client.MaxRetries(maxRetries)) } + if annotation == "" { + globalAnnotation = "orchestrator:terraform" + } else { + globalAnnotation = annotation + } + resp.DataSourceData = aciClient resp.ResourceData = aciClient } @@ -236,20 +242,6 @@ func New(version string) func() provider.Provider { } } -func setGlobalAnnotation(attribute basetypes.StringValue, envKey string) { - - if attribute.IsNull() { - attributeValue, found := os.LookupEnv(envKey) - if found { - globalAnnotation = attributeValue - } else { - globalAnnotation = "orchestrator:terraform" - } - } else { - globalAnnotation = attribute.ValueString() - } -} - func getStringAttribute(attribute basetypes.StringValue, envKey string) string { if attribute.IsNull() { diff --git a/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown b/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown index e004fe1ef..cbab32513 100644 --- a/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown +++ b/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown @@ -70,4 +70,5 @@ data "aci_cloud_l4_l7_native_load_balancer" "example" { * `trunking` - (Read-Only) For virtual devices, if a trunking port group is to be used. Type: String. * `cloud_l4l7_load_balancer_type` - (Read-Only) Type of the Cloud L4-L7 Native Load Balancer object. Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Read-Only) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. -* `aaa_domain_dn` - (Read-Only) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. \ No newline at end of file +* `aaa_domain_dn` - (Read-Only) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. +* `static_ip_address` - (Read-Only) Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: Set of String. \ No newline at end of file diff --git a/legacy-docs/docs/d/connection.html.markdown b/legacy-docs/docs/d/connection.html.markdown index e0f94d463..5c28636ac 100644 --- a/legacy-docs/docs/d/connection.html.markdown +++ b/legacy-docs/docs/d/connection.html.markdown @@ -22,17 +22,17 @@ data "aci_connection" "check" { ## Argument Reference -- `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. -- `name` - (Required) Name of Object connection. +- `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. Type: String. +- `name` - (Required) Name of Object connection. Type: String. ## Attribute Reference -- `id` - Attribute id set to the Dn of the Connection. -- `adj_type` - Connector adjacency type. -- `annotation` - Annotation for object connection. -- `description` - Description for object connection. -- `conn_dir` - Connection direction for object connection. -- `conn_type` - Connection type for object connection. -- `direct_connect` - Direct connect for object connection. -- `name_alias` - Name alias for object connection. -- `unicast_route` - Unicast route for object connection. +- `id` - Attribute id set to the Dn of the Connection. Type: String. +- `adj_type` - Connector adjacency type. Type: String. +- `annotation` - Annotation for object connection. Type: String. +- `description` - Description for object connection. Type: String. +- `conn_dir` - Connection direction for object connection. Type: String. +- `conn_type` - Connection type for object connection. Type: String. +- `direct_connect` - Direct connect for object connection. Type: String. +- `name_alias` - Name alias for object connection. Type: String. +- `unicast_route` - Unicast route for object connection. Type: String. diff --git a/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown b/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown index 37199f70d..90947665e 100644 --- a/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown +++ b/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown @@ -96,6 +96,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Optional) Type of the Cloud L4-L7 Native Load Balancer object. Allowed values are "application", "network", and default value is "application". Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Optional) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Optional) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. +* `static_ip_address` - (Optional) Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: Set of String. ## Importing ## diff --git a/legacy-docs/docs/r/connection.html.markdown b/legacy-docs/docs/r/connection.html.markdown index f55d2146f..d80c7588c 100644 --- a/legacy-docs/docs/r/connection.html.markdown +++ b/legacy-docs/docs/r/connection.html.markdown @@ -34,25 +34,24 @@ resource "aci_connection" "conn2" { ## Argument Reference -- `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. -- `name` - (Required) Name of object connection. -- `adj_type` - (Optional) Connector adjacency type. Allowed values are "L2", "L3". Default value is "L2". -- `annotation` - (Optional) Annotation for object connection. -- `description` - (Optional) Description for object connection. -- `conn_dir` - (Optional) Connection directory for object connection. Allowed values are "consumer", "provider". Default value is "provider". -- `conn_type` - (Optional) Connection type of connection object. Allowed values are "external", "internal". Default value is "external". -- `direct_connect` - (Optional) Direct connect for object connection. Allowed values are "yes" and "no". Default value is "no". -- `name_alias` - (Optional) Name alias for object connection. -- `unicast_route` - (Optional) Unicast route for connection object. Unicast route setting should be true for L3 connections. Allowed values are "yes" and "no". Default value is "yes". - -- `relation_vns_rs_abs_copy_connection` - (Optional) List of relation to class vnsAConn. Cardinality - ONE_TO_M. Type - Set of String. -- `relation_vns_rs_abs_connection_conns` - (Optional) list of relation to class vnsAConn. Cardinality - ONE_TO_M. Type - Set of String. +- `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. Type: String. +- `name` - (Required) Name of object connection. The valid connection name format is `CONX`, where X is a number starting with 0. Type: String. +- `adj_type` - (Optional) Connector adjacency type. Allowed values are "L2", "L3". Default value is "L2". Type: String. +- `annotation` - (Optional) Annotation for object connection. Type: String. +- `description` - (Optional) Description for object connection. Type: String. +- `conn_dir` - (Optional) Connection directory for object connection. Allowed values are "consumer", "provider". Default value is "provider". Type: String. +- `conn_type` - (Optional) Connection type of connection object. Allowed values are "external", "internal". Default value is "external". Type: String. +- `direct_connect` - (Optional) Direct connect for object connection. Allowed values are "yes" and "no". Default value is "no". Type: String. +- `name_alias` - (Optional) Name alias for object connection. Type: String. +- `unicast_route` - (Optional) Unicast route for connection object. Unicast route setting should be true for L3 connections. Allowed values are "yes" and "no". Default value is "yes". Type: String. + +- `relation_vns_rs_abs_copy_connection` - (Optional) List of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: Set of String. +- `relation_vns_rs_abs_connection_conns` - (Optional) list of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: Set of String. ## Attribute Reference The only attribute that this resource exports is the `id`, which is set to the Dn of the Connection. - ## Importing An existing Connection can be [imported][docs-import] into this resource via its Dn, via the following command: From 7092a18c22ceccdf867a50a67099b004b23bdeec Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Tue, 5 Mar 2024 10:22:26 -0800 Subject: [PATCH 05/10] [ignore] Added annotation_unsupported.go file back and fixed go.mod and go.sum. --- go.mod | 2 - go.sum | 2 + internal/provider/annotation_unsupported.go | 860 ++++++++++++++++++++ vendor/modules.txt | 3 +- 4 files changed, 863 insertions(+), 4 deletions(-) create mode 100644 internal/provider/annotation_unsupported.go diff --git a/go.mod b/go.mod index db6ecddd0..4d9f1dcc5 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,5 @@ module github.com/CiscoDevNet/terraform-provider-aci/v2 -replace github.com/ciscoecosystem/aci-go-client/v2 => /Users/anvjain/Terraform/ACI/aci-go-client - go 1.18 require ( diff --git a/go.sum b/go.sum index d7dcbc7b6..4e647869f 100644 --- a/go.sum +++ b/go.sum @@ -33,6 +33,8 @@ github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZ github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/ciscoecosystem/aci-go-client/v2 v2.27.0 h1:2fjlZX5QOxyxM78aDkyTjZUG8t+hnZp+KYY198SUbCI= +github.com/ciscoecosystem/aci-go-client/v2 v2.27.0/go.mod h1:0uk5hiHANgXo+0h+Z8dFBriB7hHnI0PSGVUm7/20bt4= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= diff --git a/internal/provider/annotation_unsupported.go b/internal/provider/annotation_unsupported.go new file mode 100644 index 000000000..5fea415d7 --- /dev/null +++ b/internal/provider/annotation_unsupported.go @@ -0,0 +1,860 @@ +// Code 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). + +package provider + +func UnsupportedAnnotationClasses() []string { + return []string{ + "aaaADomainRef", + "aaaAProvider", + "aaaARbacRule", + "aaaARetP", + "aaaAuthMethod", + "aaaBanner", + "aaaConfig", + "aaaDefinition", + "aaaEp", + "aaaProviderGroup", + "aaaRbacAnnotation", + "aaaRealm", + "aaaSystemUser", + "aaaUserAction", + "aclACL", + "aclL3ACE", + "actionACont", + "adcomARwi", + "adcomARwiAdvanced", + "adcomATsInfoUnit", + "adepgACont", + "adepgAElement", + "adepgAOrgUnit", + "adepgAResElement", + "adepgContE", + "adepgEntity", + "analyticsACfgSrv", + "analyticsACluster", + "analyticsFrom", + "analyticsRemoteNode", + "analyticsTarget", + "analyticsTo", + "apDockerName", + "apPluginName", + "arpAIfPol", + "authASvr", + "authASvrGroup", + "authBaseUsrAccP", + "bfdAIfP", + "bfdAIfPol", + "bfdAInstPol", + "bfdAMhIfPol", + "bfdAMhInstPol", + "bfdAMhNodePol", + "bfdAMicroBfdP", + "bfdANodeP", + "bfdAf", + "bgpAAsP", + "bgpACtxAddlPathPol", + "bgpACtxAfPol", + "bgpACtxPol", + "bgpADomainIdBase", + "bgpAExtP", + "bgpALocalAsnP", + "bgpAPeerP", + "bgpAPeerPfxPol", + "bgpARRP", + "bgpARtTarget", + "bgpARtTargetInstrP", + "bgpARtTargetP", + "bgpASiteOfOriginP", + "bgpAf", + "bgpAsnmpBgpTraps", + "callhomeADest", + "callhomeAGroup", + "callhomeASrc", + "cdpAIfPol", + "cloudAAEPg", + "cloudAAFilter", + "cloudAApicSubnet", + "cloudAApicSubnetPool", + "cloudAAwsFlowLogPol", + "cloudAAwsLogGroup", + "cloudAAwsProvider", + "cloudABaseEPg", + "cloudABdiId", + "cloudABfdP", + "cloudABfdPol", + "cloudABgpAsP", + "cloudABgpPeerP", + "cloudABrownfield", + "cloudACertStore", + "cloudACertificate", + "cloudACidr", + "cloudACloudSvcEPg", + "cloudAComputePol", + "cloudAController", + "cloudACtxProfile", + "cloudACtxUnderlayP", + "cloudADomP", + "cloudAEPSelector", + "cloudAEPSelectorDef", + "cloudAExtNetworkP", + "cloudAFrontendIPv4Addr", + "cloudAGatewayRouterP", + "cloudAGcpFlowLogPol", + "cloudAHealthProbe", + "cloudAHostBootstrapPol", + "cloudAHostIfP", + "cloudAHostRouterPol", + "cloudAIntNetworkP", + "cloudAIpSecTunnelIfP", + "cloudAIpv4AddrP", + "cloudAL3IfP", + "cloudAL3IntTunnelIfP", + "cloudAL3TunnelIfP", + "cloudALDev", + "cloudALIf", + "cloudAListener", + "cloudAListenerRule", + "cloudALoopbackIfP", + "cloudAMapping", + "cloudAMgmtPol", + "cloudANWParams", + "cloudANextHopIp", + "cloudAOspfAreaP", + "cloudAOspfIfP", + "cloudAParamPol", + "cloudAPool", + "cloudAProvResP", + "cloudAProvider", + "cloudARouterP", + "cloudARuleAction", + "cloudARuleCondition", + "cloudASelectedEP", + "cloudASubnet", + "cloudASvcEPg", + "cloudASvcPol", + "cloudATransitHubGwPol", + "cloudAVip", + "cloudAVirtualWanP", + "cloudAVpnGwPol", + "cloudAVpnNetworkP", + "cloudAVrfRouteLeakPol", + "cloudsecACapability", + "cloudsecAControl", + "cloudsecASaKeyP", + "cloudsecASaKeyPLocal", + "cloudsecASaKeyPRemote", + "cloudsecASaKeyStatus", + "cloudsecASaKeyStatusLocal", + "cloudsecASaKeyStatusRemote", + "cloudsecASpKeySt", + "cloudtemplateASubnetPool", + "commComp", + "commDefinition", + "commShell", + "commWeb", + "compAHvHealth", + "compAPltfmP", + "compAPvlanP", + "compASvcVM", + "compAVmmPltfmP", + "compAVmmSecP", + "compAccessP", + "compCont", + "compContE", + "compCtrlrP", + "compDomP", + "compElement", + "compEntity", + "compHost", + "compNameIdentEntity", + "compNic", + "compObj", + "compPHost", + "compPNic", + "compProvP", + "compUsrAccP", + "conditionCondP", + "conditionInfo", + "conditionLoggable", + "conditionRecord", + "conditionRetP", + "conditionSevAsnP", + "conditionSummary", + "configABackupP", + "coppACustomValues", + "coppAProfile", + "ctrlrDom", + "datetimeANtpAuthKey", + "datetimeANtpIFFKey", + "datetimeANtpProv", + "datetimeAPol", + "dbgACRulePCommon", + "dbgANodeInst", + "dbgacEpgCmn", + "dbgacFromEpCmn", + "dbgacFromEpgCmn", + "dbgacTenantSpaceCmn", + "dbgacToEpCmn", + "dbgacToEpgCmn", + "dbgexpExportP", + "dbgexpNodeStatus", + "dbgexpTechSupOnDBase", + "dhcpAInfraProvP", + "dhcpALbl", + "dhcpARelayP", + "dhcpAddr", + "dhcpNode", + "dhcpResp", + "dmemotltestAbsObject", + "dnsADomain", + "dnsALbl", + "dnsAProfile", + "dnsAProv", + "dnsepgADomain", + "dnsepgAMgmt", + "dnsepgASvr", + "dnsepgASvrGrp", + "dnsepgFault", + "dwdmAOptChnlIfPol", + "edmACapFlags", + "edmAOperCont", + "edmAStatsCont", + "edmCont", + "edmContE", + "edmElement", + "edmEntity", + "edmGroupP", + "edmMgrP", + "edmObj", + "eigrpAAuthIfP", + "eigrpACtxAfPol", + "eigrpAExtP", + "eigrpAIfP", + "eigrpAStubP", + "eptrkEpRslt", + "eqptALPort", + "eqptdiagpASynthObj", + "eqptdiagpCardTestSetOd", + "eqptdiagpExtChCardTsOd", + "eqptdiagpFcTsOd", + "eqptdiagpFpTsOd", + "eqptdiagpHealthPol", + "eqptdiagpLcTsOd", + "eqptdiagpLpTsOd", + "eqptdiagpPol", + "eqptdiagpPortTestSetBt", + "eqptdiagpPortTestSetHl", + "eqptdiagpPortTestSetOd", + "eqptdiagpSupCTsOd", + "eqptdiagpSysCTsOd", + "eqptdiagpTestSet", + "eqptdiagpTestSetBoot", + "eqptdiagpTestSetHealth", + "eqptdiagpTestSetOd", + "eventARetP", + "extdevSDWanASlaPol", + "extnwAInstPSubnet", + "extnwALIfP", + "extnwALNodeP", + "extnwDomP", + "extnwEPg", + "extnwOut", + "fabricACardPGrp", + "fabricACardS", + "fabricALink", + "fabricANode", + "fabricANodeBlk", + "fabricANodePEp", + "fabricANodePGrp", + "fabricANodeS", + "fabricAONodeS", + "fabricAOOSReln", + "fabricAPathIssues", + "fabricAPathS", + "fabricAPodBlk", + "fabricAPodS", + "fabricAPolGrp", + "fabricAPortBlk", + "fabricAPortPGrp", + "fabricAPortS", + "fabricAProfile", + "fabricAProtPol", + "fabricASubPortBlk", + "fabricCardP", + "fabricCardS", + "fabricComp", + "fabricDef", + "fabricDom", + "fabricInfrExP", + "fabricInfrP", + "fabricIntfPol", + "fabricL1IfPol", + "fabricL2BDPol", + "fabricL2DomPol", + "fabricL2IfPol", + "fabricL2InstPol", + "fabricL2PortSecurityPol", + "fabricL2ProtoComp", + "fabricL2ProtoPol", + "fabricL3CtxPol", + "fabricL3DomPol", + "fabricL3IfPol", + "fabricL3InstPol", + "fabricL3ProtoComp", + "fabricL3ProtoPol", + "fabricL4IfPol", + "fabricLeAPortPGrp", + "fabricMaintPol", + "fabricNodeGrp", + "fabricNodeP", + "fabricNodeS", + "fabricNodeToPathOverridePolicy", + "fabricNodeToPolicy", + "fabricPodGrp", + "fabricPol", + "fabricPolGrp", + "fabricPolicyGrpToMonitoring", + "fabricPortP", + "fabricPortS", + "fabricProfile", + "fabricProtoComp", + "fabricProtoConsFrom", + "fabricProtoConsTo", + "fabricProtoDomPol", + "fabricProtoIfPol", + "fabricProtoInstPol", + "fabricProtoPol", + "fabricQinqIfPol", + "fabricSelector", + "fabricSpAPortPGrp", + "fabricUtilInstPol", + "fabricVxlanInstPol", + "faultARetP", + "faultARsToRemote", + "faultAThrValue", + "faultInfo", + "fcAPinningLbl", + "fcAPinningP", + "fcprARs", + "fileARemoteHost", + "fileARemotePath", + "firmwareAFwP", + "firmwareAFwStatusCont", + "firmwareARunning", + "firmwareSource", + "frmwrkARelDelCont", + "frmwrkARelDelControl", + "fvAACrtrn", + "fvAAKeyChainPol", + "fvAAKeyPol", + "fvAAREpPUpdate", + "fvABD", + "fvABDPol", + "fvAClassifier", + "fvACont", + "fvACrRule", + "fvACrtrn", + "fvACtx", + "fvACtxRtSummPol", + "fvADeplCont", + "fvADnsAttr", + "fvADomP", + "fvADyAttr", + "fvAEPSelector", + "fvAEPSelectorDef", + "fvAEPgPathAtt", + "fvAEpAnycast", + "fvAEpDef", + "fvAEpNlb", + "fvAEpRetPol", + "fvAEpTag", + "fvAEpTaskAggr", + "fvAExtRoutableRemoteSitePodSubnet", + "fvAExtRoutes", + "fvAFBRGroup", + "fvAFBRMember", + "fvAFBRoute", + "fvAFabricExpRtctrlP", + "fvAFabricExtConnP", + "fvAIdAttr", + "fvAIntersiteConnP", + "fvAIntersiteConnPDef", + "fvAIntraVrfFabricImpRtctrlP", + "fvAIpAttr", + "fvAKeyChainPol", + "fvAKeyPol", + "fvAMacAttr", + "fvANode", + "fvAPeeringP", + "fvAPodConnP", + "fvAProtoAttr", + "fvAREpPCtrct", + "fvARogueExceptionMac", + "fvARouteDeployP", + "fvARsToRemote", + "fvARsToRemoteFC", + "fvARtSummSubnet", + "fvASCrtrn", + "fvASDWanPrefixTaskAggr", + "fvASiteConnP", + "fvAStAttr", + "fvAStCEp", + "fvAStIp", + "fvATg", + "fvAToBD", + "fvATp", + "fvAUsegAssocBD", + "fvAVip", + "fvAVmAttr", + "fvAttr", + "fvCEPg", + "fvComp", + "fvDef", + "fvDom", + "fvEPg", + "fvEPgToCollection", + "fvEPgToInterface", + "fvEp", + "fvFrom", + "fvL2Dom", + "fvL3Dom", + "fvNp", + "fvNwEp", + "fvPEp", + "fvRtScopeFrom", + "fvSyntheticIp", + "fvTo", + "fvUp", + "fvnsAAddrBlk", + "fvnsAAddrInstP", + "fvnsAEncapBlk", + "fvnsAInstP", + "fvnsAVlanInstP", + "fvnsAVsanInstP", + "fvnsAVxlanInstP", + "genericsARule", + "haHaTest", + "hcloudAExtPfx", + "hcloudAIntPfx", + "hcloudALeakedPfx", + "hcloudASvcResBase", + "hcloudATgStats", + "hcloudRouterStateOper", + "healthAInst", + "healthARetP", + "hostprotANamespace", + "hostprotASubj", + "hsrpAGroupP", + "hsrpAGroupPol", + "hsrpAIfP", + "hsrpAIfPol", + "hsrpASecVip", + "hvsContE", + "hvsNode", + "hvsUsegContE", + "iaclAProfile", + "igmpAIfP", + "igmpASnoopAccessGroup", + "igmpASnoopPol", + "igmpASnoopStaticGroup", + "infraAAccBndlGrp", + "infraAAccGrp", + "infraACEPg", + "infraACEp", + "infraADomP", + "infraAFcAccBndlGrp", + "infraAFunc", + "infraAIpP", + "infraANode", + "infraANodeP", + "infraANodeS", + "infraAONodeS", + "infraAPEPg", + "infraAPEp", + "infraAPathS", + "infraAccBaseGrp", + "infraAccGrp", + "infraDomP", + "infraDomainToNs", + "infraEPg", + "infraExP", + "infraFcAccGrp", + "infraFexBlk", + "infraFexGrp", + "infraGeNode", + "infraGeSnNode", + "infraLbl", + "infraNodeGrp", + "infraNodeS", + "infraPodGrp", + "infraPolGrp", + "infraPortP", + "infraPortS", + "infraProfile", + "infraSpAccGrp", + "infraToAInstP", + "ipANexthopEpP", + "ipANexthopP", + "ipARouteP", + "ipmcACtxPol", + "ipmcAIfPol", + "ipmcARepPol", + "ipmcASSMXlateP", + "ipmcAStRepPol", + "ipmcAStateLPol", + "ipmcsnoopMcSrc", + "ipmcsnoopRtrIf", + "ipmcsnoopTgtIf", + "ipsecAIsakmpPhase1Pol", + "ipsecAIsakmpPhase2Pol", + "l2AInstPol", + "l2extADomP", + "l2extAIfP", + "l2extAInstPSubnet", + "l2extALNodeP", + "l3extAConsLbl", + "l3extADefaultRouteLeakP", + "l3extADomP", + "l3extAFabricExtRoutingP", + "l3extAIfP", + "l3extAInstPSubnet", + "l3extAIp", + "l3extALNodeP", + "l3extAMember", + "l3extAProvLbl", + "l3extARogueExceptionMac", + "l3extARogueExceptionMacGroup", + "l3extARouteTagPol", + "l4AVxlanInstPol", + "lacpAEnhancedLagPol", + "lacpALagPol", + "leakAPrefix", + "leakARouteCont", + "leakASubnet", + "lldpAIfPol", + "macsecAAIfPol", + "macsecAAKeyChainPol", + "macsecAAKeyPol", + "macsecAAParamPol", + "macsecAIfPol", + "macsecAKeyChainPol", + "macsecAKeyPol", + "macsecAParamPol", + "maintAMaintP", + "maintUserNotif", + "mcpAIfPol", + "mdpAClassId", + "mdpADomP", + "mdpADomainPeeringPol", + "mdpAEntity", + "mdpANodeP", + "mdpAPeeringDomain", + "mdpAService", + "mdpATenant", + "mgmtAInstPSubnet", + "mgmtAIp", + "mgmtAZone", + "mldASnoopAccessGroup", + "mldASnoopPol", + "mldASnoopStaticGroup", + "moASubj", + "moModifiable", + "moOwnable", + "moResolvable", + "moTopProps", + "monATarget", + "monExportP", + "monGroup", + "monPol", + "monProtoP", + "monSecAuthP", + "monSrc", + "monSubj", + "monTarget", + "mplsAExtP", + "mplsAIfP", + "mplsALabelPol", + "mplsANodeSidP", + "mplsASrgbLabelPol", + "namingNamedIdentifiedObject", + "namingNamedObject", + "ndAIfPol", + "ndAPfxPol", + "netflowAExporterPol", + "netflowAFabExporterPol", + "netflowAMonitorPol", + "netflowARecordPol", + "netflowARsInterfaceToMonitor", + "netflowARsMonitorToExporter", + "netflowARsMonitorToRecord", + "netflowAVmmExporterPol", + "nwsAFwPol", + "nwsASrc", + "nwsASyslogSrc", + "oamExec", + "orchsElement", + "orchsEntity", + "ospfACtxPol", + "ospfAExtP", + "ospfAIfP", + "pconsRef", + "pimAIfP", + "pingAExec", + "pkiDefinition", + "pkiItem", + "plannerADomainTmpl", + "plannerAEpg", + "plannerAEpgDomain", + "plannerAEpgFilter", + "plannerAObject", + "plannerATmpl", + "plannerIPs", + "poeAIfPol", + "polAConfIssues", + "polADependentOn", + "polAObjToPolReln", + "polAPrToPol", + "polAttTgt", + "polComp", + "polCompl", + "polComplElem", + "polConsElem", + "polConsIf", + "polConsLbl", + "polCont", + "polCtrlr", + "polDef", + "polDefRoot", + "polDom", + "polIf", + "polInstr", + "polLbl", + "polNFromRef", + "polNToRef", + "polNs", + "polObj", + "polProvIf", + "polProvLbl", + "polRelnHolder", + "poolElement", + "poolPool", + "poolPoolMember", + "poolPoolable", + "ptpAACfg", + "ptpACfg", + "ptpAProfile", + "qosABuffer", + "qosACong", + "qosADot1PClass", + "qosADppPol", + "qosADscpClass", + "qosADscpTrans", + "qosAMplsEgressRule", + "qosAMplsIngressRule", + "qosAQueue", + "qosASched", + "qosAUburst", + "qosClassification", + "qosMplsMarking", + "relnFrom", + "relnInst", + "relnTaskRef", + "relnTo", + "resolutionARsToRemote", + "rtctrlAAttrP", + "rtctrlAMatchAsPathRegexTerm", + "rtctrlAMatchCommFactor", + "rtctrlAMatchCommRegexTerm", + "rtctrlAMatchCommTerm", + "rtctrlAMatchIpRule", + "rtctrlAMatchRtType", + "rtctrlAMatchRule", + "rtctrlASetASPath", + "rtctrlASetASPathASN", + "rtctrlASetComm", + "rtctrlASetDamp", + "rtctrlASetNh", + "rtctrlASetNhUnchanged", + "rtctrlASetOspfFwdAddr", + "rtctrlASetOspfNssa", + "rtctrlASetPolicyTag", + "rtctrlASetPref", + "rtctrlASetRedistMultipath", + "rtctrlASetRtMetric", + "rtctrlASetRtMetricType", + "rtctrlASetRule", + "rtctrlASetTag", + "rtctrlASetWeight", + "rtctrlASubnet", + "rtdmcAASMPatPol", + "rtdmcAAutoRPPol", + "rtdmcABDFilter", + "rtdmcABDPol", + "rtdmcABSRFilter", + "rtdmcABSRPPol", + "rtdmcABidirPatPol", + "rtdmcACSWEntry", + "rtdmcACSWPol", + "rtdmcACtxPol", + "rtdmcAExtP", + "rtdmcAFilterPol", + "rtdmcAIfPol", + "rtdmcAIfPolCont", + "rtdmcAInterVRFEntry", + "rtdmcAInterVRFPol", + "rtdmcAJPFilterPol", + "rtdmcAMAFilter", + "rtdmcANbrFilterPol", + "rtdmcAPatPol", + "rtdmcARPGrpRangePol", + "rtdmcARPPol", + "rtdmcARegTrPol", + "rtdmcAResPol", + "rtdmcARtMapEntry", + "rtdmcARtMapPol", + "rtdmcASGRangeExpPol", + "rtdmcASSMPatPol", + "rtdmcASSMRangePol", + "rtdmcASharedRangePol", + "rtdmcAStaticRPEntry", + "rtdmcAStaticRPPol", + "ruleDefinition", + "ruleItem", + "ruleRequirement", + "ruleSizeRequirement", + "snmpAClientGrpP", + "snmpAClientP", + "snmpACommunityP", + "snmpACtrlrInst", + "snmpACtxP", + "snmpAPol", + "snmpATrapFwdServerP", + "snmpAUserP", + "snmpUser", + "spanACEpDef", + "spanADest", + "spanASpanLbl", + "spanASrc", + "spanASrcGrp", + "spanAToCEp", + "spanAVDest", + "spanAVDestGrp", + "spanAVSrc", + "spanAVSrcGrp", + "statsAALbStats", + "statsAColl", + "statsAGcpNWStatsObj", + "statsANWStatsObj", + "statsANlbStats", + "statsAThrP", + "statsATunnel", + "statsDebugItem", + "statsItem", + "stpAIfPol", + "svccoreACore", + "svccorePol", + "synceAAIfPol", + "synceAIfPol", + "syntheticAContext", + "syntheticATestObj", + "syntheticCTestObj", + "syntheticObject", + "syntheticTLTestObj", + "sysdebugFile", + "sysdebugLogBehavior", + "sysdebugRepository", + "sysfileEp", + "sysfileInstance", + "sysfileRepository", + "tagASelector", + "tagAnnotation", + "tagTag", + "taskExec", + "telemetryAFlowServers", + "telemetryAFteEvents", + "telemetryAFteEventsExt", + "telemetryAFteEventsTcpFlags", + "telemetryARemoteServer", + "telemetryAServer", + "telemetryAServerP", + "telemetryAServerPol", + "telemetryAStreamEnable", + "throttlerASub", + "topRoot", + "tracerouteAExec", + "traceroutepTrP", + "trigATriggeredWindow", + "trigExecutable", + "trigInst", + "trigSchedWindow", + "trigSchedWindowP", + "trigSingleTriggerable", + "trigTriggerable", + "trigWindow", + "usegAUsegEPg", + "vmmACapInfo", + "vmmACapObj", + "vmmAUplinkP", + "vmmAUplinkPCont", + "vmmCFaultInfo", + "vmmEpgAggr", + "vmmInjectedObject", + "vnsACCfg", + "vnsACCfgRel", + "vnsAConn", + "vnsAConnection", + "vnsAEPpInfo", + "vnsAFolder", + "vnsAFuncConn", + "vnsAFuncNode", + "vnsAGraph", + "vnsAL4L7ServiceFault", + "vnsALDev", + "vnsALDevCtx", + "vnsALDevIf", + "vnsALDevLIf", + "vnsALIf", + "vnsALIfCtx", + "vnsAMgmt", + "vnsANode", + "vnsAParam", + "vnsATerm", + "vnsATermConn", + "vnsATermNode", + "vnsAVRoutingNetworks", + "vnsAbsTermNode", + "vnsDevItem", + "vnsLBReq", + "vnsNATReq", + "vnsOrchReq", + "vnsOrchResp", + "vsanARsVsanPathAtt", + "vsanARtVsanPathAtt", + "vsvcAConsLbl", + "vsvcAProvLbl", + "vzABrCP", + "vzACollection", + "vzACompLbl", + "vzACtrct", + "vzAFiltEntry", + "vzAFiltPZEntry", + "vzAFilter", + "vzAFilterable", + "vzAFilterableUnit", + "vzAIf", + "vzALbl", + "vzARuleOwner", + "vzASTerm", + "vzASubj", + "vzATerm", + "vzAnyToCollection", + "vzAnyToInterface", + "vzInterfaceToCollection", + "vzSubjectToFilter", + "vzToRFltP", + "xcvrOpticsFabIfPol", + "xcvrOpticsIfPol", + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index ebd5c9e3c..3c340da1d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -24,7 +24,7 @@ github.com/agext/levenshtein # github.com/apparentlymart/go-textseg/v15 v15.0.0 ## explicit; go 1.16 github.com/apparentlymart/go-textseg/v15/textseg -# github.com/ciscoecosystem/aci-go-client/v2 v2.27.0 => /Users/anvjain/Terraform/ACI/aci-go-client +# github.com/ciscoecosystem/aci-go-client/v2 v2.27.0 ## explicit; go 1.12 github.com/ciscoecosystem/aci-go-client/v2/client github.com/ciscoecosystem/aci-go-client/v2/container @@ -459,4 +459,3 @@ google.golang.org/protobuf/types/known/timestamppb # gopkg.in/yaml.v2 v2.3.0 ## explicit gopkg.in/yaml.v2 -# github.com/ciscoecosystem/aci-go-client/v2 => /Users/anvjain/Terraform/ACI/aci-go-client From 0cbc4e6d19b406684c55d922fb9bca9defc8e68e Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Wed, 6 Mar 2024 11:42:16 -0800 Subject: [PATCH 06/10] [ignore] Rebased to recent master and fixed type in documentation. --- .../cloud_l4_l7_native_load_balancer.md | 2 +- .../cloud_l4_l7_native_load_balancer.md | 3 +-- docs/resources/connection.md | 4 ++-- internal/provider/provider.go | 22 +++++++++++++------ ...d_l4_l7_native_load_balancer.html.markdown | 2 +- ...d_l4_l7_native_load_balancer.html.markdown | 3 +-- legacy-docs/docs/r/connection.html.markdown | 4 ++-- 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/docs/data-sources/cloud_l4_l7_native_load_balancer.md b/docs/data-sources/cloud_l4_l7_native_load_balancer.md index cbab32513..ac154c457 100644 --- a/docs/data-sources/cloud_l4_l7_native_load_balancer.md +++ b/docs/data-sources/cloud_l4_l7_native_load_balancer.md @@ -71,4 +71,4 @@ data "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Read-Only) Type of the Cloud L4-L7 Native Load Balancer object. Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Read-Only) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Read-Only) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Read-Only) Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: Set of String. \ No newline at end of file +* `static_ip_address` - (Read-Only) A list of unique Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: List. \ No newline at end of file diff --git a/docs/resources/cloud_l4_l7_native_load_balancer.md b/docs/resources/cloud_l4_l7_native_load_balancer.md index 90947665e..4115bdb43 100644 --- a/docs/resources/cloud_l4_l7_native_load_balancer.md +++ b/docs/resources/cloud_l4_l7_native_load_balancer.md @@ -96,8 +96,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Optional) Type of the Cloud L4-L7 Native Load Balancer object. Allowed values are "application", "network", and default value is "application". Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Optional) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Optional) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Optional) Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: Set of String. - +* `static_ip_address` - (Optional) A list of unique Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: List. ## Importing ## diff --git a/docs/resources/connection.md b/docs/resources/connection.md index d80c7588c..3229639f7 100644 --- a/docs/resources/connection.md +++ b/docs/resources/connection.md @@ -45,8 +45,8 @@ resource "aci_connection" "conn2" { - `name_alias` - (Optional) Name alias for object connection. Type: String. - `unicast_route` - (Optional) Unicast route for connection object. Unicast route setting should be true for L3 connections. Allowed values are "yes" and "no". Default value is "yes". Type: String. -- `relation_vns_rs_abs_copy_connection` - (Optional) List of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: Set of String. -- `relation_vns_rs_abs_connection_conns` - (Optional) list of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: Set of String. +- `relation_vns_rs_abs_copy_connection` - (Optional) A list of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: List. +- `relation_vns_rs_abs_connection_conns` - (Optional) A list of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: List. ## Attribute Reference diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 3131d128b..28585b501 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -147,7 +147,7 @@ func (p *AciProvider) Configure(ctx context.Context, req provider.ConfigureReque isInsecure := stringToBool(resp, "insecure", getStringAttribute(data.IsInsecure, "ACI_INSECURE"), true) validateRelationDn := stringToBool(resp, "insecure", getStringAttribute(data.ValidateRelationDn, "ACI_VAL_REL_DN"), true) maxRetries := stringToInt(resp, "retries", getStringAttribute(data.MaxRetries, "ACI_RETRIES"), 2) - annotation := getStringAttribute(data.Annotation, "ACI_ANNOTATION") + setGlobalAnnotation(data.Annotation, "ACI_ANNOTATION") if username == "" { resp.Diagnostics.AddError( @@ -190,12 +190,6 @@ func (p *AciProvider) Configure(ctx context.Context, req provider.ConfigureReque aciClient = client.GetClient(url, username, client.PrivateKey(privateKey), client.AdminCert(certName), client.Insecure(isInsecure), client.ProxyUrl(proxyUrl), client.ProxyCreds(proxyCreds), client.ValidateRelationDn(validateRelationDn), client.MaxRetries(maxRetries)) } - if annotation == "" { - globalAnnotation = "orchestrator:terraform" - } else { - globalAnnotation = annotation - } - resp.DataSourceData = aciClient resp.ResourceData = aciClient } @@ -242,6 +236,20 @@ func New(version string) func() provider.Provider { } } +func setGlobalAnnotation(attribute basetypes.StringValue, envKey string) { + + if attribute.IsNull() { + attributeValue, found := os.LookupEnv(envKey) + if found { + globalAnnotation = attributeValue + } else { + globalAnnotation = "orchestrator:terraform" + } + } else { + globalAnnotation = attribute.ValueString() + } +} + func getStringAttribute(attribute basetypes.StringValue, envKey string) string { if attribute.IsNull() { diff --git a/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown b/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown index cbab32513..ac154c457 100644 --- a/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown +++ b/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown @@ -71,4 +71,4 @@ data "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Read-Only) Type of the Cloud L4-L7 Native Load Balancer object. Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Read-Only) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Read-Only) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Read-Only) Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: Set of String. \ No newline at end of file +* `static_ip_address` - (Read-Only) A list of unique Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: List. \ No newline at end of file diff --git a/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown b/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown index 90947665e..4115bdb43 100644 --- a/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown +++ b/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown @@ -96,8 +96,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Optional) Type of the Cloud L4-L7 Native Load Balancer object. Allowed values are "application", "network", and default value is "application". Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Optional) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Optional) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Optional) Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: Set of String. - +* `static_ip_address` - (Optional) A list of unique Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: List. ## Importing ## diff --git a/legacy-docs/docs/r/connection.html.markdown b/legacy-docs/docs/r/connection.html.markdown index d80c7588c..3229639f7 100644 --- a/legacy-docs/docs/r/connection.html.markdown +++ b/legacy-docs/docs/r/connection.html.markdown @@ -45,8 +45,8 @@ resource "aci_connection" "conn2" { - `name_alias` - (Optional) Name alias for object connection. Type: String. - `unicast_route` - (Optional) Unicast route for connection object. Unicast route setting should be true for L3 connections. Allowed values are "yes" and "no". Default value is "yes". Type: String. -- `relation_vns_rs_abs_copy_connection` - (Optional) List of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: Set of String. -- `relation_vns_rs_abs_connection_conns` - (Optional) list of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: Set of String. +- `relation_vns_rs_abs_copy_connection` - (Optional) A list of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: List. +- `relation_vns_rs_abs_connection_conns` - (Optional) A list of relation to class vnsAConn. Cardinality - ONE_TO_M. Type: List. ## Attribute Reference From e3a9315d109374b8fd8b9445cddb56327dd322a8 Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Thu, 7 Mar 2024 13:42:41 -0800 Subject: [PATCH 07/10] [ignore] Change att_notify attribute name and added the attribute in docs. --- aci/data_source_aci_vnsabsnode.go | 38 ++++----- aci/resource_aci_vnsabsnode.go | 80 +++++++++---------- .../cloud_l4_l7_native_load_balancer.md | 2 +- docs/data-sources/function_node.md | 10 ++- .../cloud_l4_l7_native_load_balancer.md | 2 +- docs/resources/function_node.md | 8 +- examples/function_node/main.tf | 22 ++--- ...d_l4_l7_native_load_balancer.html.markdown | 2 +- .../docs/d/function_node.html.markdown | 10 ++- ...d_l4_l7_native_load_balancer.html.markdown | 2 +- .../docs/r/function_node.html.markdown | 8 +- 11 files changed, 96 insertions(+), 88 deletions(-) diff --git a/aci/data_source_aci_vnsabsnode.go b/aci/data_source_aci_vnsabsnode.go index 7dc5fd3ca..f96b35aba 100644 --- a/aci/data_source_aci_vnsabsnode.go +++ b/aci/data_source_aci_vnsabsnode.go @@ -25,14 +25,6 @@ func dataSourceAciFunctionNode() *schema.Resource { Type: schema.TypeString, Required: true, }, - "l4_l7_device_interface_consumer_name": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - "l4_l7_device_interface_provider_name": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, "annotation": &schema.Schema{ Type: schema.TypeString, Computed: true, @@ -65,14 +57,6 @@ func dataSourceAciFunctionNode() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "conn_consumer_dn": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - "conn_provider_dn": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, "share_encap": &schema.Schema{ Type: schema.TypeString, Computed: true, @@ -97,19 +81,35 @@ func dataSourceAciFunctionNode() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "l4_l7_device_interface_consumer_name": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "conn_consumer_dn": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, "l4_l7_device_interface_consumer_connector_type": &schema.Schema{ Type: schema.TypeString, Computed: true, }, - "l4_l7_device_interface_provider_connector_type": &schema.Schema{ + "l4_l7_device_interface_consumer_attachment_notification": &schema.Schema{ Type: schema.TypeString, Computed: true, }, - "l4_l7_device_interface_consumer_att_notify": &schema.Schema{ + "l4_l7_device_interface_provider_name": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "conn_provider_dn": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "l4_l7_device_interface_provider_connector_type": &schema.Schema{ Type: schema.TypeString, Computed: true, }, - "l4_l7_device_interface_provider_att_notify": &schema.Schema{ + "l4_l7_device_interface_provider_attachment_notification": &schema.Schema{ Type: schema.TypeString, Computed: true, }, diff --git a/aci/resource_aci_vnsabsnode.go b/aci/resource_aci_vnsabsnode.go index 08b9cd2c0..f0235696d 100644 --- a/aci/resource_aci_vnsabsnode.go +++ b/aci/resource_aci_vnsabsnode.go @@ -31,28 +31,16 @@ func resourceAciFunctionNode() *schema.Resource { Required: true, ForceNew: true, }, - "name": &schema.Schema{ Type: schema.TypeString, Required: true, ForceNew: true, }, - "l4_l7_device_interface_consumer_name": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "l4_l7_device_interface_provider_name": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - }, "annotation": &schema.Schema{ Type: schema.TypeString, Optional: true, Computed: true, }, - "func_template_type": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -69,7 +57,6 @@ func resourceAciFunctionNode() *schema.Resource { "ADC_ONE_ARM", }, false), }, - "func_type": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -118,25 +105,11 @@ func resourceAciFunctionNode() *schema.Resource { "unspecified", }, false), }, - "sequence_number": &schema.Schema{ Type: schema.TypeString, Optional: true, Computed: true, }, - - "conn_consumer_dn": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "conn_provider_dn": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "share_encap": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -146,7 +119,6 @@ func resourceAciFunctionNode() *schema.Resource { "no", }, false), }, - "relation_vns_rs_node_to_abs_func_prof": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -167,6 +139,16 @@ func resourceAciFunctionNode() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "l4_l7_device_interface_consumer_name": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "conn_consumer_dn": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "l4_l7_device_interface_consumer_connector_type": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -176,28 +158,38 @@ func resourceAciFunctionNode() *schema.Resource { "redir", }, false), }, - "l4_l7_device_interface_provider_connector_type": &schema.Schema{ + "l4_l7_device_interface_consumer_attachment_notification": &schema.Schema{ Type: schema.TypeString, Optional: true, Computed: true, ValidateFunc: validation.StringInSlice([]string{ - "none", - "redir", - "dnat", - "snat", - "snat_dnat", + "no", + "yes", }, false), }, - "l4_l7_device_interface_consumer_att_notify": &schema.Schema{ + "l4_l7_device_interface_provider_name": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "conn_provider_dn": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "l4_l7_device_interface_provider_connector_type": &schema.Schema{ Type: schema.TypeString, Optional: true, Computed: true, ValidateFunc: validation.StringInSlice([]string{ - "no", - "yes", + "none", + "redir", + "dnat", + "snat", + "snat_dnat", }, false), }, - "l4_l7_device_interface_provider_att_notify": &schema.Schema{ + "l4_l7_device_interface_provider_attachment_notification": &schema.Schema{ Type: schema.TypeString, Optional: true, Computed: true, @@ -266,7 +258,7 @@ func getAndSetFunctionNodeRelationalAttributes(client *client.Client, dn string, d.Set("conn_consumer_dn", vnsAbsFuncConn.DistinguishedName) d.Set("l4_l7_device_interface_consumer_name", vnsAbsFuncConn.DeviceLIfName) d.Set("l4_l7_device_interface_consumer_connector_type", vnsAbsFuncConn.ConnType) - d.Set("l4_l7_device_interface_consumer_att_notify", vnsAbsFuncConn.AttNotify) + d.Set("l4_l7_device_interface_consumer_attachment_notification", vnsAbsFuncConn.AttNotify) // Provider Part provDn := fmt.Sprintf("%s/AbsFConn-provider", dn) @@ -281,7 +273,7 @@ func getAndSetFunctionNodeRelationalAttributes(client *client.Client, dn string, d.Set("conn_provider_dn", vnsAbsFuncConn.DistinguishedName) d.Set("l4_l7_device_interface_provider_name", vnsAbsFuncConn.DeviceLIfName) d.Set("l4_l7_device_interface_provider_connector_type", vnsAbsFuncConn.ConnType) - d.Set("l4_l7_device_interface_provider_att_notify", vnsAbsFuncConn.AttNotify) + d.Set("l4_l7_device_interface_provider_attachment_notification", vnsAbsFuncConn.AttNotify) vnsRsNodeToAbsFuncProfData, err := client.ReadRelationvnsRsNodeToAbsFuncProfFromFunctionNode(dn) if err != nil { @@ -399,7 +391,7 @@ func resourceAciFunctionNodeCreate(ctx context.Context, d *schema.ResourceData, vnsAbsFuncConnAttr := models.FunctionConnectorAttributes{} vnsAbsFuncConnAttr.Annotation = "{}" vnsAbsFuncConnAttr.DeviceLIfName = d.Get("l4_l7_device_interface_consumer_name").(string) - vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_consumer_att_notify").(string) + vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_consumer_attachment_notification").(string) vnsAbsFuncConnAttr.ConnType = d.Get("l4_l7_device_interface_consumer_connector_type").(string) vnsAbsFuncConn := models.NewFunctionConnector(fmt.Sprintf("AbsFConn-%s", "consumer"), vnsAbsNode.DistinguishedName, "", vnsAbsFuncConnAttr) err = aciClient.Save(vnsAbsFuncConn) @@ -409,7 +401,7 @@ func resourceAciFunctionNodeCreate(ctx context.Context, d *schema.ResourceData, d.Set("conn_consumer_dn", vnsAbsFuncConn.DistinguishedName) vnsAbsFuncConnAttr.DeviceLIfName = d.Get("l4_l7_device_interface_provider_name").(string) - vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_provider_att_notify").(string) + vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_provider_attachment_notification").(string) vnsAbsFuncConnAttr.ConnType = d.Get("l4_l7_device_interface_provider_connector_type").(string) vnsAbsFuncConn = models.NewFunctionConnector(fmt.Sprintf("AbsFConn-%s", "provider"), vnsAbsNode.DistinguishedName, "", vnsAbsFuncConnAttr) err = aciClient.Save(vnsAbsFuncConn) @@ -551,7 +543,7 @@ func resourceAciFunctionNodeUpdate(ctx context.Context, d *schema.ResourceData, vnsAbsFuncConnAttr := models.FunctionConnectorAttributes{} vnsAbsFuncConnAttr.Annotation = "{}" vnsAbsFuncConnAttr.DeviceLIfName = d.Get("l4_l7_device_interface_consumer_name").(string) - vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_consumer_att_notify").(string) + vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_consumer_attachment_notification").(string) vnsAbsFuncConnAttr.ConnType = d.Get("l4_l7_device_interface_consumer_connector_type").(string) vnsAbsFuncConn := models.NewFunctionConnector(fmt.Sprintf("AbsFConn-%s", "consumer"), vnsAbsNode.DistinguishedName, "", vnsAbsFuncConnAttr) err = aciClient.Save(vnsAbsFuncConn) @@ -565,7 +557,7 @@ func resourceAciFunctionNodeUpdate(ctx context.Context, d *schema.ResourceData, vnsAbsFuncConnAttr := models.FunctionConnectorAttributes{} vnsAbsFuncConnAttr.Annotation = "{}" vnsAbsFuncConnAttr.DeviceLIfName = d.Get("l4_l7_device_interface_provider_name").(string) - vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_provider_att_notify").(string) + vnsAbsFuncConnAttr.AttNotify = d.Get("l4_l7_device_interface_provider_attachment_notification").(string) vnsAbsFuncConnAttr.ConnType = d.Get("l4_l7_device_interface_provider_connector_type").(string) vnsAbsFuncConn := models.NewFunctionConnector(fmt.Sprintf("AbsFConn-%s", "provider"), vnsAbsNode.DistinguishedName, "", vnsAbsFuncConnAttr) err = aciClient.Save(vnsAbsFuncConn) diff --git a/docs/data-sources/cloud_l4_l7_native_load_balancer.md b/docs/data-sources/cloud_l4_l7_native_load_balancer.md index ac154c457..ea5aaf25a 100644 --- a/docs/data-sources/cloud_l4_l7_native_load_balancer.md +++ b/docs/data-sources/cloud_l4_l7_native_load_balancer.md @@ -71,4 +71,4 @@ data "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Read-Only) Type of the Cloud L4-L7 Native Load Balancer object. Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Read-Only) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Read-Only) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Read-Only) A list of unique Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: List. \ No newline at end of file +* `static_ip_address` - (Read-Only) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. \ No newline at end of file diff --git a/docs/data-sources/function_node.md b/docs/data-sources/function_node.md index 8380f3faf..75b8753ae 100644 --- a/docs/data-sources/function_node.md +++ b/docs/data-sources/function_node.md @@ -47,10 +47,14 @@ data "aci_function_node" "example" { - `routing_mode` - (Read-Only) Routing mode of the Function Node object. Type: String. - `sequence_number` - (Read-Only) Internal property incremented when aaa user logs in. Type: String. - `share_encap` - (Read-Only) Enables encap sharing on node. Type: String. -- `l4_l7_device_interface_consumer_name` - (Read-Only) The device interface is used to map with a service graph Function Node Connector consumer object. Type: String. -- `l4_l7_device_interface_provider_name` - (Read-Only) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. - `relation_vns_rs_node_to_abs_func_prof` - (Read-Only) Represents the relation to L4-L7 Services Function Profile (class vnsAbsFuncProf). Type: String. - `relation_vns_rs_node_to_l_dev` - (Read-Only) Represents the relation to Logical Device Abstraction (class vnsALDevIf). Type: String. - `relation_vns_rs_node_to_m_func` - (Read-Only) Represents the relation to Meta Function (class vnsMFunc). Type: String. - `relation_vns_rs_default_scope_to_term` - (Read-Only) Represents the relation to Terminal Abstract Class (class vnsATerm). Type: String. -- `relation_vns_rs_node_to_cloud_l_dev` - (Read-Only) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. \ No newline at end of file +- `relation_vns_rs_node_to_cloud_l_dev` - (Read-Only) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. +- `l4_l7_device_interface_consumer_name` - (Read-Only) The device interface is used to map with a service graph Function Node Connector consumer object. Type: String. +- `l4_l7_device_interface_consumer_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector consumer object. Type: String. +- `l4_l7_device_interface_consumer_attachment_notification` - (Read-Only) Represents the consumer attachment notification. Type: String. +- `l4_l7_device_interface_provider_name` - (Read-Only) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. +- `l4_l7_device_interface_provider_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector provider object. Type: String. +- `l4_l7_device_interface_provider_attachment_notification` - (Read-Only) Represents the provider attachment notification. Type: String. \ No newline at end of file diff --git a/docs/resources/cloud_l4_l7_native_load_balancer.md b/docs/resources/cloud_l4_l7_native_load_balancer.md index 4115bdb43..9f1a07415 100644 --- a/docs/resources/cloud_l4_l7_native_load_balancer.md +++ b/docs/resources/cloud_l4_l7_native_load_balancer.md @@ -96,7 +96,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Optional) Type of the Cloud L4-L7 Native Load Balancer object. Allowed values are "application", "network", and default value is "application". Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Optional) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Optional) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Optional) A list of unique Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: List. +* `static_ip_address` - (Optional) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. ## Importing ## diff --git a/docs/resources/function_node.md b/docs/resources/function_node.md index 69b5730c6..a3875c4f5 100644 --- a/docs/resources/function_node.md +++ b/docs/resources/function_node.md @@ -55,13 +55,17 @@ resource "aci_function_node" "example" { - `routing_mode` - (Optional) Routing mode of the Function Node object. Allowed values: "Redirect", "unspecified". Default value: "unspecified". Type: String. - `sequence_number` - (Optional) Internal property incremented when aaa user logs in. Type: String. - `share_encap` - (Optional) Enables encap sharing on node. Allowed values: "yes", "no". Default value: "no". Type: String. -- `l4_l7_device_interface_consumer_name` - (Optional) The device interface is used to map with a service graph Function Node Connector consumer object. Type: String. -- `l4_l7_device_interface_provider_name` - (Optional) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. - `relation_vns_rs_node_to_abs_func_prof` - (Optional) Represents the relation to L4-L7 Services Function Profile (class vnsAbsFuncProf). Type: String. - `relation_vns_rs_node_to_l_dev` - (Optional) Represents the relation to Logical Device Abstraction (class vnsALDevIf). Type: String. - `relation_vns_rs_node_to_m_func` - (Optional) Represents the relation to Meta Function (class vnsMFunc). Type: String. - `relation_vns_rs_default_scope_to_term` - (Optional) Represents the relation to Terminal Abstract Class (class vnsATerm). Type: String. - `relation_vns_rs_node_to_cloud_l_dev` - (Optional) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. +- `l4_l7_device_interface_consumer_name` - (Optional) The device interface is used to map with a service graph Function Node Connector consumer object. Type: String. +- `l4_l7_device_interface_consumer_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector consumer object. Allowed values: "none", "redir". Default value: "none". Type: String. +- `l4_l7_device_interface_consumer_attachment_notification` - (Read-Only) Represents the consumer attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. +- `l4_l7_device_interface_provider_name` - (Optional) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. +- `l4_l7_device_interface_provider_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector provider object. Allowed values: "none", "redir", "dnat", "snat", "snat_dnat". Default value: "none". Type: String. +- `l4_l7_device_interface_provider_attachment_notification` - (Read-Only) Represents the provider attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. ## Importing diff --git a/examples/function_node/main.tf b/examples/function_node/main.tf index 7eab5343a..3aea88e9d 100644 --- a/examples/function_node/main.tf +++ b/examples/function_node/main.tf @@ -162,17 +162,17 @@ resource "aci_function_node" "tf_nlb2" { } resource "aci_function_node" "tf_fw2" { # does not get configured - l4_l7_service_graph_template_dn = aci_function_node.tf_nlb2.l4_l7_service_graph_template_dn - name = "N1" - func_template_type = "FW_ROUTED" - relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_pa_fw.id - l4_l7_device_interface_consumer_name = "trust" - l4_l7_device_interface_provider_name = "untrust" - l4_l7_device_interface_consumer_connector_type = "redir" - l4_l7_device_interface_provider_connector_type = "snat" - l4_l7_device_interface_consumer_att_notify = "no" - l4_l7_device_interface_provider_att_notify = "yes" - managed = "no" + l4_l7_service_graph_template_dn = aci_function_node.tf_nlb2.l4_l7_service_graph_template_dn + name = "N1" + func_template_type = "FW_ROUTED" + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_pa_fw.id + l4_l7_device_interface_consumer_name = "trust" + l4_l7_device_interface_provider_name = "untrust" + l4_l7_device_interface_consumer_connector_type = "redir" + l4_l7_device_interface_provider_connector_type = "snat" + l4_l7_device_interface_consumer_attachment_notification = "no" + l4_l7_device_interface_provider_attachment_notification = "yes" + managed = "no" } # Create L4-L7 Service Graph tf_sg2 connection with template T1 and the first node N0. diff --git a/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown b/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown index ac154c457..ea5aaf25a 100644 --- a/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown +++ b/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown @@ -71,4 +71,4 @@ data "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Read-Only) Type of the Cloud L4-L7 Native Load Balancer object. Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Read-Only) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Read-Only) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Read-Only) A list of unique Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: List. \ No newline at end of file +* `static_ip_address` - (Read-Only) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. \ No newline at end of file diff --git a/legacy-docs/docs/d/function_node.html.markdown b/legacy-docs/docs/d/function_node.html.markdown index 8380f3faf..75b8753ae 100644 --- a/legacy-docs/docs/d/function_node.html.markdown +++ b/legacy-docs/docs/d/function_node.html.markdown @@ -47,10 +47,14 @@ data "aci_function_node" "example" { - `routing_mode` - (Read-Only) Routing mode of the Function Node object. Type: String. - `sequence_number` - (Read-Only) Internal property incremented when aaa user logs in. Type: String. - `share_encap` - (Read-Only) Enables encap sharing on node. Type: String. -- `l4_l7_device_interface_consumer_name` - (Read-Only) The device interface is used to map with a service graph Function Node Connector consumer object. Type: String. -- `l4_l7_device_interface_provider_name` - (Read-Only) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. - `relation_vns_rs_node_to_abs_func_prof` - (Read-Only) Represents the relation to L4-L7 Services Function Profile (class vnsAbsFuncProf). Type: String. - `relation_vns_rs_node_to_l_dev` - (Read-Only) Represents the relation to Logical Device Abstraction (class vnsALDevIf). Type: String. - `relation_vns_rs_node_to_m_func` - (Read-Only) Represents the relation to Meta Function (class vnsMFunc). Type: String. - `relation_vns_rs_default_scope_to_term` - (Read-Only) Represents the relation to Terminal Abstract Class (class vnsATerm). Type: String. -- `relation_vns_rs_node_to_cloud_l_dev` - (Read-Only) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. \ No newline at end of file +- `relation_vns_rs_node_to_cloud_l_dev` - (Read-Only) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. +- `l4_l7_device_interface_consumer_name` - (Read-Only) The device interface is used to map with a service graph Function Node Connector consumer object. Type: String. +- `l4_l7_device_interface_consumer_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector consumer object. Type: String. +- `l4_l7_device_interface_consumer_attachment_notification` - (Read-Only) Represents the consumer attachment notification. Type: String. +- `l4_l7_device_interface_provider_name` - (Read-Only) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. +- `l4_l7_device_interface_provider_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector provider object. Type: String. +- `l4_l7_device_interface_provider_attachment_notification` - (Read-Only) Represents the provider attachment notification. Type: String. \ No newline at end of file diff --git a/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown b/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown index 4115bdb43..9f1a07415 100644 --- a/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown +++ b/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown @@ -96,7 +96,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Optional) Type of the Cloud L4-L7 Native Load Balancer object. Allowed values are "application", "network", and default value is "application". Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Optional) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Optional) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Optional) A list of unique Static IP Address of the Cloud L4-L7 Native Load Balancer object. Type: List. +* `static_ip_address` - (Optional) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. ## Importing ## diff --git a/legacy-docs/docs/r/function_node.html.markdown b/legacy-docs/docs/r/function_node.html.markdown index 69b5730c6..a3875c4f5 100644 --- a/legacy-docs/docs/r/function_node.html.markdown +++ b/legacy-docs/docs/r/function_node.html.markdown @@ -55,13 +55,17 @@ resource "aci_function_node" "example" { - `routing_mode` - (Optional) Routing mode of the Function Node object. Allowed values: "Redirect", "unspecified". Default value: "unspecified". Type: String. - `sequence_number` - (Optional) Internal property incremented when aaa user logs in. Type: String. - `share_encap` - (Optional) Enables encap sharing on node. Allowed values: "yes", "no". Default value: "no". Type: String. -- `l4_l7_device_interface_consumer_name` - (Optional) The device interface is used to map with a service graph Function Node Connector consumer object. Type: String. -- `l4_l7_device_interface_provider_name` - (Optional) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. - `relation_vns_rs_node_to_abs_func_prof` - (Optional) Represents the relation to L4-L7 Services Function Profile (class vnsAbsFuncProf). Type: String. - `relation_vns_rs_node_to_l_dev` - (Optional) Represents the relation to Logical Device Abstraction (class vnsALDevIf). Type: String. - `relation_vns_rs_node_to_m_func` - (Optional) Represents the relation to Meta Function (class vnsMFunc). Type: String. - `relation_vns_rs_default_scope_to_term` - (Optional) Represents the relation to Terminal Abstract Class (class vnsATerm). Type: String. - `relation_vns_rs_node_to_cloud_l_dev` - (Optional) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. +- `l4_l7_device_interface_consumer_name` - (Optional) The device interface is used to map with a service graph Function Node Connector consumer object. Type: String. +- `l4_l7_device_interface_consumer_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector consumer object. Allowed values: "none", "redir". Default value: "none". Type: String. +- `l4_l7_device_interface_consumer_attachment_notification` - (Read-Only) Represents the consumer attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. +- `l4_l7_device_interface_provider_name` - (Optional) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. +- `l4_l7_device_interface_provider_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector provider object. Allowed values: "none", "redir", "dnat", "snat", "snat_dnat". Default value: "none". Type: String. +- `l4_l7_device_interface_provider_attachment_notification` - (Read-Only) Represents the provider attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. ## Importing From 7af55babe72b96a8a14d42ff4819c77096369a9f Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Mon, 11 Mar 2024 10:58:23 -0700 Subject: [PATCH 08/10] [ignore] changed argument name from static_ip_address to static_ip_addresses. --- aci/data_source_aci_cloudlb.go | 2 +- aci/resource_aci_cloudlb.go | 10 +++++----- docs/data-sources/cloud_l4_l7_native_load_balancer.md | 4 ++-- docs/resources/cloud_l4_l7_native_load_balancer.md | 4 ++-- examples/function_node/main.tf | 2 +- examples/l4_l7_service_graph_template/main.tf | 2 +- .../d/cloud_l4_l7_native_load_balancer.html.markdown | 4 ++-- .../r/cloud_l4_l7_native_load_balancer.html.markdown | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/aci/data_source_aci_cloudlb.go b/aci/data_source_aci_cloudlb.go index 29cda1b5e..cf65fd750 100644 --- a/aci/data_source_aci_cloudlb.go +++ b/aci/data_source_aci_cloudlb.go @@ -150,7 +150,7 @@ func dataSourceAciCloudL4L7LoadBalancer() *schema.Resource { Computed: true, Set: schema.HashString, }, - "static_ip_address": &schema.Schema{ + "static_ip_addresses": &schema.Schema{ Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, Computed: true, diff --git a/aci/resource_aci_cloudlb.go b/aci/resource_aci_cloudlb.go index 496019b19..ff33b7110 100644 --- a/aci/resource_aci_cloudlb.go +++ b/aci/resource_aci_cloudlb.go @@ -278,7 +278,7 @@ func resourceAciCloudL4L7LoadBalancer() *schema.Resource { Optional: true, Set: schema.HashString, }, - "static_ip_address": &schema.Schema{ + "static_ip_addresses": &schema.Schema{ Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, @@ -431,7 +431,7 @@ func getAndSetRemoteCloudL4L7LoadBalancerAttributes(client *client.Client, dn st } } d.Set("relation_cloud_rs_ldev_to_cloud_subnet", cloudLBChildSubnetList) - d.Set("static_ip_address", cloudLBChildStaticIPList) + d.Set("static_ip_addresses", cloudLBChildStaticIPList) d.Set("aaa_domain_dn", cloudLBChildAaaDomainList) d.SetId(cloudLBDistinguishedName) @@ -482,7 +482,7 @@ func resourceAciCloudL4L7LoadBalancerCreate(ctx context.Context, d *schema.Resou cloudLBChildList = append(cloudLBChildList, mapListOfAaaDomainAttrs("created", toStringList(aaaDomainDn.(*schema.Set).List()))...) } - if staticIPAddress, ok := d.GetOk("static_ip_address"); ok { + if staticIPAddress, ok := d.GetOk("static_ip_addresses"); ok { cloudLBChildList = append(cloudLBChildList, mapCloudFrontendIPv4AddrAttrs(annotation, "created", toStringList(staticIPAddress.(*schema.Set).List()))) } @@ -547,8 +547,8 @@ func resourceAciCloudL4L7LoadBalancerUpdate(ctx context.Context, d *schema.Resou cloudLBChildList = append(cloudLBChildList, mapCloudRsLDevToCloudSubnetAttrs(annotation, "created, modified", relToCreate)...) } - if d.HasChange("static_ip_address") { - oldRel, newRel := d.GetChange("static_ip_address") + if d.HasChange("static_ip_addresses") { + oldRel, newRel := d.GetChange("static_ip_addresses") oldRelSet := oldRel.(*schema.Set) newRelSet := newRel.(*schema.Set) relToDelete := toStringList(oldRelSet.Difference(newRelSet).List()) diff --git a/docs/data-sources/cloud_l4_l7_native_load_balancer.md b/docs/data-sources/cloud_l4_l7_native_load_balancer.md index ea5aaf25a..55df2ef80 100644 --- a/docs/data-sources/cloud_l4_l7_native_load_balancer.md +++ b/docs/data-sources/cloud_l4_l7_native_load_balancer.md @@ -52,7 +52,7 @@ data "aci_cloud_l4_l7_native_load_balancer" "example" { * `instance_count` - (Read-Only) Instance Count of the Cloud L4-L7 Native Load Balancer object. Type: String. * `is_copy` - (Read-Only) Enables the device to be a copy device. Type: String. * `is_instantiation` - (Read-Only) Enables Instantiation of the Cloud L4-L7 Native Load Balancer object. Type: String. -* `is_static_ip` - (Read-Only) Enables Static IP of the Cloud L4-L7 Native Load Balancer object. Type: String. +* `is_static_ip` - (Read-Only) Enables static IP of the Cloud L4-L7 Native Load Balancer object. Type: String. * `l4l7_device_application_security_group` - (Read-Only) Naming for the Third Party Device Application Security Group of the Cloud L4-L7 Native Load Balancer object. Type: String. * `l4l7_third_party_device` - (Read-Only) Naming for the Third Party Device of the Cloud L4-L7 Native Load Balancer object. Type: String. * `managed` - (Read-Only) Enables the device to be a managed device. Type: String. @@ -71,4 +71,4 @@ data "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Read-Only) Type of the Cloud L4-L7 Native Load Balancer object. Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Read-Only) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Read-Only) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Read-Only) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. \ No newline at end of file +* `static_ip_addresses` - (Read-Only) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. \ No newline at end of file diff --git a/docs/resources/cloud_l4_l7_native_load_balancer.md b/docs/resources/cloud_l4_l7_native_load_balancer.md index 9f1a07415..d541fbb19 100644 --- a/docs/resources/cloud_l4_l7_native_load_balancer.md +++ b/docs/resources/cloud_l4_l7_native_load_balancer.md @@ -77,7 +77,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "example" { * `instance_count` - (Optional) Instance Count of the Cloud L4-L7 Native Load Balancer object. Default value is "2". Type: String. * `is_copy` - (Optional) Enables the device to be a copy device. Allowed values are "no", "yes", and default value is "no". Type: String. * `is_instantiation` - (Optional) Enables Instantiation of the Cloud L4-L7 Native Load Balancer object. Allowed values are "no", "yes", and default value is "no". Type: String. -* `is_static_ip` - (Optional) Enables Static IP of the Cloud L4-L7 Native Load Balancer object. Allowed values are "no", "yes", and default value is "no". Type: String. +* `is_static_ip` - (Optional) Enables static IP of the Cloud L4-L7 Native Load Balancer object. Allowed values are "no", "yes", and default value is "no". Type: String. * `l4l7_device_application_security_group` - (Optional) Naming for the Third Party Device Application Security Group of the Cloud L4-L7 Native Load Balancer object. Type: String. * `l4l7_third_party_device` - (Optional) Naming for the Third Party Device of the Cloud L4-L7 Native Load Balancer object. Type: String. * `managed` - (Optional) Enables the device to be a managed device. Allowed values are "no", "yes", and default value is "yes". Type: String. @@ -96,7 +96,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Optional) Type of the Cloud L4-L7 Native Load Balancer object. Allowed values are "application", "network", and default value is "application". Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Optional) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Optional) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Optional) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. +* `static_ip_addresses` - (Optional) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. ## Importing ## diff --git a/examples/function_node/main.tf b/examples/function_node/main.tf index 3aea88e9d..fa2aeb912 100644 --- a/examples/function_node/main.tf +++ b/examples/function_node/main.tf @@ -66,7 +66,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "cloud_nlb" { relation_cloud_rs_ldev_to_cloud_subnet = [data.aci_cloud_subnet.cs1.id] allow_all = "yes" is_static_ip = "yes" - static_ip_address = ["10.20.0.0"] + static_ip_addresses = ["10.20.0.0"] scheme = "internal" cloud_l4l7_load_balancer_type = "network" } diff --git a/examples/l4_l7_service_graph_template/main.tf b/examples/l4_l7_service_graph_template/main.tf index a12d44b64..c604305a5 100644 --- a/examples/l4_l7_service_graph_template/main.tf +++ b/examples/l4_l7_service_graph_template/main.tf @@ -77,7 +77,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "cloud_native_alb" { ] cloud_l4l7_load_balancer_type = "application" is_static_ip = "yes" - static_ip_address = ["10.1.1.0"] + static_ip_addresses = ["10.1.1.0"] } # Third-Party Firewall diff --git a/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown b/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown index ea5aaf25a..55df2ef80 100644 --- a/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown +++ b/legacy-docs/docs/d/cloud_l4_l7_native_load_balancer.html.markdown @@ -52,7 +52,7 @@ data "aci_cloud_l4_l7_native_load_balancer" "example" { * `instance_count` - (Read-Only) Instance Count of the Cloud L4-L7 Native Load Balancer object. Type: String. * `is_copy` - (Read-Only) Enables the device to be a copy device. Type: String. * `is_instantiation` - (Read-Only) Enables Instantiation of the Cloud L4-L7 Native Load Balancer object. Type: String. -* `is_static_ip` - (Read-Only) Enables Static IP of the Cloud L4-L7 Native Load Balancer object. Type: String. +* `is_static_ip` - (Read-Only) Enables static IP of the Cloud L4-L7 Native Load Balancer object. Type: String. * `l4l7_device_application_security_group` - (Read-Only) Naming for the Third Party Device Application Security Group of the Cloud L4-L7 Native Load Balancer object. Type: String. * `l4l7_third_party_device` - (Read-Only) Naming for the Third Party Device of the Cloud L4-L7 Native Load Balancer object. Type: String. * `managed` - (Read-Only) Enables the device to be a managed device. Type: String. @@ -71,4 +71,4 @@ data "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Read-Only) Type of the Cloud L4-L7 Native Load Balancer object. Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Read-Only) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Read-Only) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Read-Only) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. \ No newline at end of file +* `static_ip_addresses` - (Read-Only) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. \ No newline at end of file diff --git a/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown b/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown index 9f1a07415..d541fbb19 100644 --- a/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown +++ b/legacy-docs/docs/r/cloud_l4_l7_native_load_balancer.html.markdown @@ -77,7 +77,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "example" { * `instance_count` - (Optional) Instance Count of the Cloud L4-L7 Native Load Balancer object. Default value is "2". Type: String. * `is_copy` - (Optional) Enables the device to be a copy device. Allowed values are "no", "yes", and default value is "no". Type: String. * `is_instantiation` - (Optional) Enables Instantiation of the Cloud L4-L7 Native Load Balancer object. Allowed values are "no", "yes", and default value is "no". Type: String. -* `is_static_ip` - (Optional) Enables Static IP of the Cloud L4-L7 Native Load Balancer object. Allowed values are "no", "yes", and default value is "no". Type: String. +* `is_static_ip` - (Optional) Enables static IP of the Cloud L4-L7 Native Load Balancer object. Allowed values are "no", "yes", and default value is "no". Type: String. * `l4l7_device_application_security_group` - (Optional) Naming for the Third Party Device Application Security Group of the Cloud L4-L7 Native Load Balancer object. Type: String. * `l4l7_third_party_device` - (Optional) Naming for the Third Party Device of the Cloud L4-L7 Native Load Balancer object. Type: String. * `managed` - (Optional) Enables the device to be a managed device. Allowed values are "no", "yes", and default value is "yes". Type: String. @@ -96,7 +96,7 @@ resource "aci_cloud_l4_l7_native_load_balancer" "example" { * `cloud_l4l7_load_balancer_type` - (Optional) Type of the Cloud L4-L7 Native Load Balancer object. Allowed values are "application", "network", and default value is "application". Type: String. * `relation_cloud_rs_ldev_to_cloud_subnet` - (Optional) Represents the relation to a Relation from Cloud LDev to Cloud Subnet (class cloudSubnet). Type: List. * `aaa_domain_dn` - (Optional) Represents the relation to a Relation from AAA Domain to Cloud L4L7 Native Load Balancer (class aaaRbacAnnotation). Type: List. -* `static_ip_address` - (Optional) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. +* `static_ip_addresses` - (Optional) A list of unique static IP addresses of the Cloud L4-L7 Native Load Balancer object. Type: List. ## Importing ## From 33f266c6d1d9bae7cdba3c07c892d79a3b0c92b2 Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Tue, 12 Mar 2024 12:52:46 -0700 Subject: [PATCH 09/10] [ignore] Changed names in main.tf and added attribute references in functio_node docs. --- docs/data-sources/function_node.md | 4 +- docs/resources/connection.md | 4 +- docs/resources/function_node.md | 16 ++- examples/function_node/main.tf | 98 +++++++++++-------- .../docs/d/function_node.html.markdown | 4 +- legacy-docs/docs/r/connection.html.markdown | 4 +- .../docs/r/function_node.html.markdown | 15 ++- 7 files changed, 93 insertions(+), 52 deletions(-) diff --git a/docs/data-sources/function_node.md b/docs/data-sources/function_node.md index 75b8753ae..5e582f3a0 100644 --- a/docs/data-sources/function_node.md +++ b/docs/data-sources/function_node.md @@ -57,4 +57,6 @@ data "aci_function_node" "example" { - `l4_l7_device_interface_consumer_attachment_notification` - (Read-Only) Represents the consumer attachment notification. Type: String. - `l4_l7_device_interface_provider_name` - (Read-Only) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. - `l4_l7_device_interface_provider_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector provider object. Type: String. -- `l4_l7_device_interface_provider_attachment_notification` - (Read-Only) Represents the provider attachment notification. Type: String. \ No newline at end of file +- `l4_l7_device_interface_provider_attachment_notification` - (Read-Only) Represents the provider attachment notification. Type: String. +- `conn_consumer_dn` - (Read-Only) Distinguished name of the Function Node consumer connector. Type: String. +- `conn_provider_dn` - (Read-Only) Distinguished name of the Function Node provider connector. Type: String. \ No newline at end of file diff --git a/docs/resources/connection.md b/docs/resources/connection.md index 3229639f7..0bccfeb5a 100644 --- a/docs/resources/connection.md +++ b/docs/resources/connection.md @@ -35,7 +35,9 @@ resource "aci_connection" "conn2" { ## Argument Reference - `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. Type: String. -- `name` - (Required) Name of object connection. The valid connection name format is `CONX`, where X is a number starting with 0. Type: String. +- `name` - (Required) Name of object connection. Type: String. + - The valid connection name format for cloud APICs is `CONX`, where X is a number starting with 0. + - The valid connection name format for on-prem APICs is `CX`, where X is a number starting with 1. - `adj_type` - (Optional) Connector adjacency type. Allowed values are "L2", "L3". Default value is "L2". Type: String. - `annotation` - (Optional) Annotation for object connection. Type: String. - `description` - (Optional) Description for object connection. Type: String. diff --git a/docs/resources/function_node.md b/docs/resources/function_node.md index a3875c4f5..da8a24455 100644 --- a/docs/resources/function_node.md +++ b/docs/resources/function_node.md @@ -45,6 +45,9 @@ resource "aci_function_node" "example" { - `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. Type: String. - `name` - (Required) Name of the Function Node object. Type: String. + - The valid function node name format for cloud APICs is `NX`, where X is a number starting with 0. + - The valid function node name format for on-prem APICs is `NX`, where X is a number starting with 1. + - The valid function node - copy name format for on-prem APICs is `CPX`, where X is a number starting with 1. - `annotation` - (Optional) Annotation of the Function Node object. Type: String. - `description` - (Optional) Description of the Function Node object. Type: String. - `func_template_type` - (Optional) Function Template type of the Function Node object. Allowed values: "OTHER", "FW_TRANS", "FW_ROUTED", "CLOUD_VENDOR_LB", "CLOUD_VENDOR_FW", "CLOUD_NATIVE_LB", "CLOUD_NATIVE_FW", "ADC_TWO_ARM", "ADC_ONE_ARM". Default value: "OTHER". Type: String. @@ -61,11 +64,16 @@ resource "aci_function_node" "example" { - `relation_vns_rs_default_scope_to_term` - (Optional) Represents the relation to Terminal Abstract Class (class vnsATerm). Type: String. - `relation_vns_rs_node_to_cloud_l_dev` - (Optional) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. - `l4_l7_device_interface_consumer_name` - (Optional) The device interface is used to map with a service graph Function Node Connector consumer object. Type: String. -- `l4_l7_device_interface_consumer_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector consumer object. Allowed values: "none", "redir". Default value: "none". Type: String. -- `l4_l7_device_interface_consumer_attachment_notification` - (Read-Only) Represents the consumer attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. +- `l4_l7_device_interface_consumer_connector_type` - (Optional) The device interface connector type used to map with a service graph Function Node Connector consumer object. Allowed values: "none", "redir". Default value: "none". Type: String. +- `l4_l7_device_interface_consumer_attachment_notification` - (Optional) Represents the consumer attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. - `l4_l7_device_interface_provider_name` - (Optional) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. -- `l4_l7_device_interface_provider_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector provider object. Allowed values: "none", "redir", "dnat", "snat", "snat_dnat". Default value: "none". Type: String. -- `l4_l7_device_interface_provider_attachment_notification` - (Read-Only) Represents the provider attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. +- `l4_l7_device_interface_provider_connector_type` - (Optional) The device interface connector type used to map with a service graph Function Node Connector provider object. Allowed values: "none", "redir", "dnat", "snat", "snat_dnat". Default value: "none". Type: String. +- `l4_l7_device_interface_provider_attachment_notification` - (Optional) Represents the provider attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. + +## Attribute Reference +- `conn_consumer_dn` - (Read-Only) Distinguished name of the Function Node consumer connector. Type: String. +- `conn_provider_dn` - (Read-Only) Distinguished name of the Function Node provider connector. Type: String. + ## Importing diff --git a/examples/function_node/main.tf b/examples/function_node/main.tf index fa2aeb912..1c037a57d 100644 --- a/examples/function_node/main.tf +++ b/examples/function_node/main.tf @@ -1,3 +1,4 @@ +# terraform plan for cloud APICs terraform { required_providers { aci = { @@ -36,7 +37,7 @@ data "aci_cloud_subnet" "cs1" { # Create Logical Firewall Representation (3rd party example) -resource "aci_cloud_l4_l7_third_party_device" "third_pa_fw" { +resource "aci_cloud_l4_l7_third_party_device" "third_party_fw" { tenant_dn = data.aci_tenant.tf_tenant.id name = "tf_third_party_fw" relation_cloud_rs_ldev_to_ctx = data.aci_vrf.tf_vrf.id @@ -71,14 +72,21 @@ resource "aci_cloud_l4_l7_native_load_balancer" "cloud_nlb" { cloud_l4l7_load_balancer_type = "network" } -resource "aci_l4_l7_service_graph_template" "tf_sg" { +# 1. Create first L4-L7 Service Graph Template 'sg1' with type cloud +# Create two nodes with basic parameters +# - The first node 'N0' with type ADC_ONE_ARM and relation to the cloud native load balancer +# - The second node 'N1' with type FW_ROUTED and relation to the 3rd party firewall +# Create the connection between the templates ('T1 - consumer' and 'T2 - provider') and nodes ('N0' and 'N1'). + +resource "aci_l4_l7_service_graph_template" "sg1" { tenant_dn = data.aci_tenant.tf_tenant.id name = "tf_sg_1" l4_l7_service_graph_template_type = "cloud" } -resource "aci_function_node" "tf_nlb" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id +# Create a function node with type ADC_ONE_ARM and relation to the cloud native load balancer +resource "aci_function_node" "function_node_nlb" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.sg1.id name = "N0" func_template_type = "ADC_ONE_ARM" relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_native_load_balancer.cloud_nlb.id @@ -88,19 +96,20 @@ resource "aci_function_node" "tf_nlb" { sequence_number = "0" } -resource "aci_function_node" "tf_fw" { # does not get configured - l4_l7_service_graph_template_dn = aci_function_node.tf_nlb.l4_l7_service_graph_template_dn +# Create a function node with type FW_ROUTED and relation to the 3rd party firewall +resource "aci_function_node" "function_node_fw" { + l4_l7_service_graph_template_dn = aci_function_node.function_node_nlb.l4_l7_service_graph_template_dn name = "N1" func_template_type = "FW_ROUTED" - relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_pa_fw.id + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_party_fw.id l4_l7_device_interface_consumer_name = "trust" l4_l7_device_interface_provider_name = "untrust" managed = "no" } # Create L4-L7 Service Graph connection with template T1 and the first node N0. -resource "aci_connection" "t1-n0" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id +resource "aci_connection" "sg1_t1-n0" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.sg1.id name = "CON0" adj_type = "L3" conn_dir = "provider" @@ -108,14 +117,14 @@ resource "aci_connection" "t1-n0" { direct_connect = "no" unicast_route = "yes" relation_vns_rs_abs_connection_conns = [ - aci_l4_l7_service_graph_template.tf_sg.term_cons_dn, - aci_function_node.tf_nlb.conn_consumer_dn + aci_l4_l7_service_graph_template.sg1.term_cons_dn, + aci_function_node.function_node_nlb.conn_consumer_dn ] } # Create L4-L7 Service Graph connection with current node N0 and next node N1. -resource "aci_connection" "n0-n1" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id +resource "aci_connection" "sg1_n0-n1" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.sg1.id name = "CON1" adj_type = "L3" conn_dir = "provider" @@ -123,14 +132,14 @@ resource "aci_connection" "n0-n1" { direct_connect = "no" unicast_route = "yes" relation_vns_rs_abs_connection_conns = [ - aci_function_node.tf_nlb.conn_provider_dn, - aci_function_node.tf_fw.conn_consumer_dn + aci_function_node.function_node_nlb.conn_provider_dn, + aci_function_node.function_node_fw.conn_consumer_dn ] } # Create L4-L7 Service Graph connection with the last node N1 and template T2. -resource "aci_connection" "n1-t1" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg.id +resource "aci_connection" "sg1_n1-t1" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.sg1.id name = "CON2" adj_type = "L3" conn_dir = "provider" @@ -138,20 +147,27 @@ resource "aci_connection" "n1-t1" { direct_connect = "no" unicast_route = "yes" relation_vns_rs_abs_connection_conns = [ - aci_function_node.tf_fw.conn_provider_dn, - aci_l4_l7_service_graph_template.tf_sg.term_prov_dn + aci_function_node.function_node_fw.conn_provider_dn, + aci_l4_l7_service_graph_template.sg1.term_prov_dn ] } +# 2. Create second L4-L7 Service Graph Template 'sg2' with type cloud +# Create two nodes with additional parameters +# - The first node 'N0' with type ADC_ONE_ARM and relation to the cloud native load balancer +# - The second node 'N1' with type FW_ROUTED and relation to the 3rd party firewall +# Create the connection between the templates ('T1 - consumer' and 'T2 - provider') and nodes ('N0' and 'N1'). -resource "aci_l4_l7_service_graph_template" "tf_sg2" { +resource "aci_l4_l7_service_graph_template" "sg2" { tenant_dn = data.aci_tenant.tf_tenant.id name = "tf_sg_2" l4_l7_service_graph_template_type = "cloud" } -resource "aci_function_node" "tf_nlb2" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id +# Create a function node with type ADC_ONE_ARM and relation to the cloud native load balancer +# Additional parameters are added to the function node to demonstrate the different options available. +resource "aci_function_node" "function_node_nlb2" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.sg2.id name = "N0" func_template_type = "ADC_ONE_ARM" routing_mode = "Redirect" @@ -161,11 +177,13 @@ resource "aci_function_node" "tf_nlb2" { l4_l7_device_interface_provider_connector_type = "redir" } -resource "aci_function_node" "tf_fw2" { # does not get configured - l4_l7_service_graph_template_dn = aci_function_node.tf_nlb2.l4_l7_service_graph_template_dn +# Create a function node with type FW_ROUTED and relation to the 3rd party firewall +# Additional parameters are added to the function node to demonstrate the different options available. +resource "aci_function_node" "function_node_fw2" { + l4_l7_service_graph_template_dn = aci_function_node.function_node_nlb2.l4_l7_service_graph_template_dn name = "N1" func_template_type = "FW_ROUTED" - relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_pa_fw.id + relation_vns_rs_node_to_cloud_l_dev = aci_cloud_l4_l7_third_party_device.third_party_fw.id l4_l7_device_interface_consumer_name = "trust" l4_l7_device_interface_provider_name = "untrust" l4_l7_device_interface_consumer_connector_type = "redir" @@ -175,9 +193,9 @@ resource "aci_function_node" "tf_fw2" { # does not get configured managed = "no" } -# Create L4-L7 Service Graph tf_sg2 connection with template T1 and the first node N0. -resource "aci_connection" "t1-n0-2" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id +# Create L4-L7 Service Graph sg2 connection with template T1 and the first node N0. +resource "aci_connection" "sg2_t1-n0" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.sg2.id name = "CON0" adj_type = "L3" conn_dir = "provider" @@ -185,14 +203,14 @@ resource "aci_connection" "t1-n0-2" { direct_connect = "no" unicast_route = "yes" relation_vns_rs_abs_connection_conns = [ - aci_l4_l7_service_graph_template.tf_sg2.term_cons_dn, - aci_function_node.tf_nlb2.conn_consumer_dn + aci_l4_l7_service_graph_template.sg2.term_cons_dn, + aci_function_node.function_node_nlb2.conn_consumer_dn ] } -# Create L4-L7 Service Graph tf_sg2 connection with current node N0 and next node N1. -resource "aci_connection" "n0-n1-2" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id +# Create L4-L7 Service Graph sg2 connection with current node N0 and next node N1. +resource "aci_connection" "sg2_n0-n1" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.sg2.id name = "CON1" adj_type = "L3" conn_dir = "provider" @@ -200,14 +218,14 @@ resource "aci_connection" "n0-n1-2" { direct_connect = "no" unicast_route = "yes" relation_vns_rs_abs_connection_conns = [ - aci_function_node.tf_nlb2.conn_provider_dn, - aci_function_node.tf_fw2.conn_consumer_dn + aci_function_node.function_node_nlb2.conn_provider_dn, + aci_function_node.function_node_fw2.conn_consumer_dn ] } -# Create L4-L7 Service Graph tf_sg2 connection with the last node N1 and template T2. -resource "aci_connection" "n1-t1-2" { - l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.tf_sg2.id +# Create L4-L7 Service Graph sg2 connection with the last node N1 and template T2. +resource "aci_connection" "sg2_n1-t1" { + l4_l7_service_graph_template_dn = aci_l4_l7_service_graph_template.sg2.id name = "CON2" adj_type = "L3" conn_dir = "provider" @@ -215,7 +233,7 @@ resource "aci_connection" "n1-t1-2" { direct_connect = "no" unicast_route = "yes" relation_vns_rs_abs_connection_conns = [ - aci_function_node.tf_fw2.conn_provider_dn, - aci_l4_l7_service_graph_template.tf_sg2.term_prov_dn + aci_function_node.function_node_fw2.conn_provider_dn, + aci_l4_l7_service_graph_template.sg2.term_prov_dn ] } diff --git a/legacy-docs/docs/d/function_node.html.markdown b/legacy-docs/docs/d/function_node.html.markdown index 75b8753ae..5e582f3a0 100644 --- a/legacy-docs/docs/d/function_node.html.markdown +++ b/legacy-docs/docs/d/function_node.html.markdown @@ -57,4 +57,6 @@ data "aci_function_node" "example" { - `l4_l7_device_interface_consumer_attachment_notification` - (Read-Only) Represents the consumer attachment notification. Type: String. - `l4_l7_device_interface_provider_name` - (Read-Only) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. - `l4_l7_device_interface_provider_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector provider object. Type: String. -- `l4_l7_device_interface_provider_attachment_notification` - (Read-Only) Represents the provider attachment notification. Type: String. \ No newline at end of file +- `l4_l7_device_interface_provider_attachment_notification` - (Read-Only) Represents the provider attachment notification. Type: String. +- `conn_consumer_dn` - (Read-Only) Distinguished name of the Function Node consumer connector. Type: String. +- `conn_provider_dn` - (Read-Only) Distinguished name of the Function Node provider connector. Type: String. \ No newline at end of file diff --git a/legacy-docs/docs/r/connection.html.markdown b/legacy-docs/docs/r/connection.html.markdown index 3229639f7..0bccfeb5a 100644 --- a/legacy-docs/docs/r/connection.html.markdown +++ b/legacy-docs/docs/r/connection.html.markdown @@ -35,7 +35,9 @@ resource "aci_connection" "conn2" { ## Argument Reference - `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. Type: String. -- `name` - (Required) Name of object connection. The valid connection name format is `CONX`, where X is a number starting with 0. Type: String. +- `name` - (Required) Name of object connection. Type: String. + - The valid connection name format for cloud APICs is `CONX`, where X is a number starting with 0. + - The valid connection name format for on-prem APICs is `CX`, where X is a number starting with 1. - `adj_type` - (Optional) Connector adjacency type. Allowed values are "L2", "L3". Default value is "L2". Type: String. - `annotation` - (Optional) Annotation for object connection. Type: String. - `description` - (Optional) Description for object connection. Type: String. diff --git a/legacy-docs/docs/r/function_node.html.markdown b/legacy-docs/docs/r/function_node.html.markdown index a3875c4f5..f1fd25394 100644 --- a/legacy-docs/docs/r/function_node.html.markdown +++ b/legacy-docs/docs/r/function_node.html.markdown @@ -45,6 +45,9 @@ resource "aci_function_node" "example" { - `l4_l7_service_graph_template_dn` - (Required) Distinguished name of parent L4-L7 Service Graph Template object. Type: String. - `name` - (Required) Name of the Function Node object. Type: String. + - The valid function node name format for cloud APICs is `NX`, where X is a number starting with 0. + - The valid function node name format for on-prem APICs is `NX`, where X is a number starting with 1. + - The valid function node - copy name format for on-prem APICs is `CPX`, where X is a number starting with 1. - `annotation` - (Optional) Annotation of the Function Node object. Type: String. - `description` - (Optional) Description of the Function Node object. Type: String. - `func_template_type` - (Optional) Function Template type of the Function Node object. Allowed values: "OTHER", "FW_TRANS", "FW_ROUTED", "CLOUD_VENDOR_LB", "CLOUD_VENDOR_FW", "CLOUD_NATIVE_LB", "CLOUD_NATIVE_FW", "ADC_TWO_ARM", "ADC_ONE_ARM". Default value: "OTHER". Type: String. @@ -61,11 +64,15 @@ resource "aci_function_node" "example" { - `relation_vns_rs_default_scope_to_term` - (Optional) Represents the relation to Terminal Abstract Class (class vnsATerm). Type: String. - `relation_vns_rs_node_to_cloud_l_dev` - (Optional) Represents the relation to Cloud L4-L7 Abstract Devices (class cloudALDev). Type: String. - `l4_l7_device_interface_consumer_name` - (Optional) The device interface is used to map with a service graph Function Node Connector consumer object. Type: String. -- `l4_l7_device_interface_consumer_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector consumer object. Allowed values: "none", "redir". Default value: "none". Type: String. -- `l4_l7_device_interface_consumer_attachment_notification` - (Read-Only) Represents the consumer attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. +- `l4_l7_device_interface_consumer_connector_type` - (Optional) The device interface connector type used to map with a service graph Function Node Connector consumer object. Allowed values: "none", "redir". Default value: "none". Type: String. +- `l4_l7_device_interface_consumer_attachment_notification` - (Optional) Represents the consumer attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. - `l4_l7_device_interface_provider_name` - (Optional) The device interface is used to map with a service graph Function Node Connector provider object. Type: String. -- `l4_l7_device_interface_provider_connector_type` - (Read-Only) The device interface connector type used to map with a service graph Function Node Connector provider object. Allowed values: "none", "redir", "dnat", "snat", "snat_dnat". Default value: "none". Type: String. -- `l4_l7_device_interface_provider_attachment_notification` - (Read-Only) Represents the provider attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. +- `l4_l7_device_interface_provider_connector_type` - (Optional) The device interface connector type used to map with a service graph Function Node Connector provider object. Allowed values: "none", "redir", "dnat", "snat", "snat_dnat". Default value: "none". Type: String. +- `l4_l7_device_interface_provider_attachment_notification` - (Optional) Represents the provider attachment notification. Allowed values: "yes", "no". Default value: "no". Type: String. + +## Attribute Reference +- `conn_consumer_dn` - (Read-Only) Distinguished name of the Function Node consumer connector. Type: String. +- `conn_provider_dn` - (Read-Only) Distinguished name of the Function Node provider connector. Type: String. ## Importing From fc3853f9caa2949aec85db2a5277b01f8b42728f Mon Sep 17 00:00:00 2001 From: anvitha-jain Date: Wed, 20 Mar 2024 10:10:41 -0700 Subject: [PATCH 10/10] [ignore] Fixed documentation and comments. --- docs/resources/function_node.md | 2 +- examples/function_node/main.tf | 9 ++++++--- legacy-docs/docs/r/function_node.html.markdown | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/resources/function_node.md b/docs/resources/function_node.md index da8a24455..ae043cc75 100644 --- a/docs/resources/function_node.md +++ b/docs/resources/function_node.md @@ -47,7 +47,7 @@ resource "aci_function_node" "example" { - `name` - (Required) Name of the Function Node object. Type: String. - The valid function node name format for cloud APICs is `NX`, where X is a number starting with 0. - The valid function node name format for on-prem APICs is `NX`, where X is a number starting with 1. - - The valid function node - copy name format for on-prem APICs is `CPX`, where X is a number starting with 1. + - The valid copy function node name format for on-premises APICs is `CPX`, where X is a number starting with 1. - `annotation` - (Optional) Annotation of the Function Node object. Type: String. - `description` - (Optional) Description of the Function Node object. Type: String. - `func_template_type` - (Optional) Function Template type of the Function Node object. Allowed values: "OTHER", "FW_TRANS", "FW_ROUTED", "CLOUD_VENDOR_LB", "CLOUD_VENDOR_FW", "CLOUD_NATIVE_LB", "CLOUD_NATIVE_FW", "ADC_TWO_ARM", "ADC_ONE_ARM". Default value: "OTHER". Type: String. diff --git a/examples/function_node/main.tf b/examples/function_node/main.tf index 1c037a57d..0bcfb16bd 100644 --- a/examples/function_node/main.tf +++ b/examples/function_node/main.tf @@ -17,6 +17,7 @@ provider "aci" { data "aci_tenant" "tf_tenant" { name = "tf_ansible_test" } + data "aci_vrf" "tf_vrf" { tenant_dn = data.aci_tenant.tf_tenant.id name = "tf_vrf" @@ -26,10 +27,12 @@ data "aci_cloud_context_profile" "ccp1" { tenant_dn = data.aci_tenant.tf_tenant.id name = "tf_ccp" } + data "aci_cloud_cidr_pool" "cidr1" { cloud_context_profile_dn = data.aci_cloud_context_profile.ccp1.id addr = "10.20.0.0/25" } + data "aci_cloud_subnet" "cs1" { cloud_cidr_pool_dn = data.aci_cloud_cidr_pool.cidr1.id ip = "10.20.0.0/25" @@ -67,13 +70,13 @@ resource "aci_cloud_l4_l7_native_load_balancer" "cloud_nlb" { relation_cloud_rs_ldev_to_cloud_subnet = [data.aci_cloud_subnet.cs1.id] allow_all = "yes" is_static_ip = "yes" - static_ip_addresses = ["10.20.0.0"] + static_ip_addresses = ["10.20.0.0"] scheme = "internal" cloud_l4l7_load_balancer_type = "network" } # 1. Create first L4-L7 Service Graph Template 'sg1' with type cloud -# Create two nodes with basic parameters +# Add two nodes with basic parameters # - The first node 'N0' with type ADC_ONE_ARM and relation to the cloud native load balancer # - The second node 'N1' with type FW_ROUTED and relation to the 3rd party firewall # Create the connection between the templates ('T1 - consumer' and 'T2 - provider') and nodes ('N0' and 'N1'). @@ -153,7 +156,7 @@ resource "aci_connection" "sg1_n1-t1" { } # 2. Create second L4-L7 Service Graph Template 'sg2' with type cloud -# Create two nodes with additional parameters +# Add two nodes with additional parameters # - The first node 'N0' with type ADC_ONE_ARM and relation to the cloud native load balancer # - The second node 'N1' with type FW_ROUTED and relation to the 3rd party firewall # Create the connection between the templates ('T1 - consumer' and 'T2 - provider') and nodes ('N0' and 'N1'). diff --git a/legacy-docs/docs/r/function_node.html.markdown b/legacy-docs/docs/r/function_node.html.markdown index f1fd25394..630036891 100644 --- a/legacy-docs/docs/r/function_node.html.markdown +++ b/legacy-docs/docs/r/function_node.html.markdown @@ -47,7 +47,7 @@ resource "aci_function_node" "example" { - `name` - (Required) Name of the Function Node object. Type: String. - The valid function node name format for cloud APICs is `NX`, where X is a number starting with 0. - The valid function node name format for on-prem APICs is `NX`, where X is a number starting with 1. - - The valid function node - copy name format for on-prem APICs is `CPX`, where X is a number starting with 1. + - The valid copy function node name format for on-premises APICs is `CPX`, where X is a number starting with 1. - `annotation` - (Optional) Annotation of the Function Node object. Type: String. - `description` - (Optional) Description of the Function Node object. Type: String. - `func_template_type` - (Optional) Function Template type of the Function Node object. Allowed values: "OTHER", "FW_TRANS", "FW_ROUTED", "CLOUD_VENDOR_LB", "CLOUD_VENDOR_FW", "CLOUD_NATIVE_LB", "CLOUD_NATIVE_FW", "ADC_TWO_ARM", "ADC_ONE_ARM". Default value: "OTHER". Type: String.