diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 47c9dccac..81756fa97 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -76,12 +76,13 @@ jobs: terraform_version: '1.7.*' terraform_wrapper: false - name: Terraform Acceptance Test (APIC ${{ matrix.apic_host.name }}) - run: go test github.com/CiscoDevNet/terraform-provider-aci/v2/internal/provider -v -timeout 300m -coverprofile=coverage.out -covermode=atomic + run: go test github.com/CiscoDevNet/terraform-provider-aci/v2/internal/provider -v -timeout 300m -race -coverprofile=coverage.out -covermode=atomic env: TF_ACC: '1' TF_ACC_STATE_LINEAGE: '1' ACI_VAL_REL_DN: false ACI_URL: ${{ matrix.apic_host.url }} + GOMAXPROCS: '1' - name: Upload coverage to Codecov # Upload Coverage on latest only if: ${{ matrix.apic_host.name == 'v6.0'}} diff --git a/docs/resources/communication_policy.md b/docs/resources/communication_policy.md index fe9f46f99..4cf8e4d9c 100644 --- a/docs/resources/communication_policy.md +++ b/docs/resources/communication_policy.md @@ -55,44 +55,94 @@ resource "aci_communication_policy" "full_example" { strict_security_on_apic_oob_subnet = "no" http_ssl_configuration = [ { - access_control_allow_credential = "disabled" - access_control_allow_origins = "access_control_allow_origins_1" - admin_st = "disabled" - annotation = "annotation_1" - cli_only_mode = "disabled" - client_cert_auth_state = "disabled" - description = "description_1" - dh_param = "1024" - global_throttle_rate = "global_throttle_rate_1" - global_throttle_st = "disabled" - global_throttle_unit = "global_throttle_unit_1" - max_request_status_count = "max_request_status_count_1" - name = "name_1" - name_alias = "name_alias_1" - node_exporter = "disabled" - port = "port_1" - referer = "referer_1" - server_header = "disabled" - ssl_protocols = "TLSv1" - throttle_rate = "throttle_rate_1" - throttle_st = "disabled" - visore_access = "disabled" + access_control_allow_credential = "access_control_allow_credential_0" + access_control_allow_origins = "access_control_allow_origins_0" + admin_st = "admin_st_0" + annotation = "annotation_0" + cli_only_mode = "cli_only_mode_0" + client_cert_auth_state = "client_cert_auth_state_0" + description = "description_0" + dh_param = "dh_param_0" + global_throttle_rate = "global_throttle_rate_0" + global_throttle_st = "global_throttle_st_0" + global_throttle_unit = "global_throttle_unit_0" + max_request_status_count = "max_request_status_count_0" + name = "name_0" + name_alias = "name_alias_0" + node_exporter = "node_exporter_0" + port = "port_0" + referer = "referer_0" + server_header = "server_header_0" + ssl_protocols = "ssl_protocols_0" + throttle_rate = "throttle_rate_0" + throttle_st = "throttle_st_0" + visore_access = "visore_access_0" + tp = [ + { + annotation = "annotation_0" + target_dn = "target_dn_0" + annotations = [ + { + key = "key_0" + value = "value_0" + } + ] + tags = [ + { + key = "key_0" + value = "value_0" + } + ] + } + ] + key_ring = [ + { + annotation = "annotation_0" + tn_pki_key_ring_name = aci_.example.name + annotations = [ + { + key = "key_0" + value = "value_0" + } + ] + tags = [ + { + key = "key_0" + value = "value_0" + } + ] + } + ] + annotations = [ + { + key = "key_0" + value = "value_0" + } + ] + tags = [ + { + key = "key_0" + value = "value_0" + } + ] } ] annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the Communication Policy resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_communication_policy) folder. diff --git a/docs/resources/endpoint_tag_ip.md b/docs/resources/endpoint_tag_ip.md index acf7b1069..152e339d8 100644 --- a/docs/resources/endpoint_tag_ip.md +++ b/docs/resources/endpoint_tag_ip.md @@ -58,17 +58,19 @@ resource "aci_endpoint_tag_ip" "full_example_tenant" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the Endpoint Tag Ip resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_endpoint_tag_ip) folder. diff --git a/docs/resources/endpoint_tag_mac.md b/docs/resources/endpoint_tag_mac.md index 0103f6d61..b277f791e 100644 --- a/docs/resources/endpoint_tag_mac.md +++ b/docs/resources/endpoint_tag_mac.md @@ -58,17 +58,19 @@ resource "aci_endpoint_tag_mac" "full_example_tenant" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the Endpoint Tag Mac resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_endpoint_tag_mac) folder. diff --git a/docs/resources/external_management_network_instance_profile.md b/docs/resources/external_management_network_instance_profile.md index 97d1ab8aa..0a5ca8a2e 100644 --- a/docs/resources/external_management_network_instance_profile.md +++ b/docs/resources/external_management_network_instance_profile.md @@ -53,25 +53,39 @@ resource "aci_external_management_network_instance_profile" "full_example" { priority = "level1" relation_to_consumed_out_of_band_contracts = [ { - annotation = "annotation_1" - priority = "level1" + annotation = "annotation_0" + priority = "priority_0" out_of_band_contract_name = aci_out_of_band_contract.example.name + annotations = [ + { + key = "key_0" + value = "value_0" + } + ] + tags = [ + { + key = "key_0" + value = "value_0" + } + ] } ] annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the External Management Network Instance Profile resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_external_management_network_instance_profile) folder. diff --git a/docs/resources/external_management_network_subnet.md b/docs/resources/external_management_network_subnet.md index 214c57d1c..0a70f4d37 100644 --- a/docs/resources/external_management_network_subnet.md +++ b/docs/resources/external_management_network_subnet.md @@ -56,17 +56,19 @@ resource "aci_external_management_network_subnet" "full_example_external_managem annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the External Management Network Subnet resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_external_management_network_subnet) folder. diff --git a/docs/resources/l3out_consumer_label.md b/docs/resources/l3out_consumer_label.md index 383a70423..e4de2e417 100644 --- a/docs/resources/l3out_consumer_label.md +++ b/docs/resources/l3out_consumer_label.md @@ -61,17 +61,19 @@ resource "aci_l3out_consumer_label" "full_example_l3_outside" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the L3out Consumer Label resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_l3out_consumer_label) folder. diff --git a/docs/resources/l3out_provider_label.md b/docs/resources/l3out_provider_label.md index 865924d62..945d58418 100644 --- a/docs/resources/l3out_provider_label.md +++ b/docs/resources/l3out_provider_label.md @@ -58,17 +58,19 @@ resource "aci_l3out_provider_label" "full_example_l3_outside" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the L3out Provider Label resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_l3out_provider_label) folder. diff --git a/docs/resources/l3out_redistribute_policy.md b/docs/resources/l3out_redistribute_policy.md index 665ddc4e7..8d9ea3b8d 100644 --- a/docs/resources/l3out_redistribute_policy.md +++ b/docs/resources/l3out_redistribute_policy.md @@ -55,17 +55,19 @@ resource "aci_l3out_redistribute_policy" "full_example_l3_outside" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the L3out Redistribute Policy resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_l3out_redistribute_policy) folder. diff --git a/docs/resources/out_of_band_contract.md b/docs/resources/out_of_band_contract.md index 627d93bc9..70afb7665 100644 --- a/docs/resources/out_of_band_contract.md +++ b/docs/resources/out_of_band_contract.md @@ -59,17 +59,19 @@ resource "aci_out_of_band_contract" "full_example" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the Out Of Band Contract resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_out_of_band_contract) folder. diff --git a/docs/resources/pim_route_map_entry.md b/docs/resources/pim_route_map_entry.md index fc23f5d3d..0c1823ca2 100644 --- a/docs/resources/pim_route_map_entry.md +++ b/docs/resources/pim_route_map_entry.md @@ -60,17 +60,19 @@ resource "aci_pim_route_map_entry" "full_example_pim_route_map_policy" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the Pim Route Map Entry resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_pim_route_map_entry) folder. diff --git a/docs/resources/pim_route_map_policy.md b/docs/resources/pim_route_map_policy.md index 2ea77b74c..3d5aaf799 100644 --- a/docs/resources/pim_route_map_policy.md +++ b/docs/resources/pim_route_map_policy.md @@ -57,17 +57,19 @@ resource "aci_pim_route_map_policy" "full_example_tenant" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the Pim Route Map Policy resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_pim_route_map_policy) folder. diff --git a/docs/resources/relation_to_consumed_out_of_band_contract.md b/docs/resources/relation_to_consumed_out_of_band_contract.md index df95f927a..199529a42 100644 --- a/docs/resources/relation_to_consumed_out_of_band_contract.md +++ b/docs/resources/relation_to_consumed_out_of_band_contract.md @@ -54,17 +54,19 @@ resource "aci_relation_to_consumed_out_of_band_contract" "full_example_external_ annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the Relation To Consumed Out Of Band Contract resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_relation_to_consumed_out_of_band_contract) folder. diff --git a/docs/resources/relation_to_fallback_route_group.md b/docs/resources/relation_to_fallback_route_group.md index e42087d3a..3b37cdb78 100644 --- a/docs/resources/relation_to_fallback_route_group.md +++ b/docs/resources/relation_to_fallback_route_group.md @@ -53,17 +53,19 @@ resource "aci_relation_to_fallback_route_group" "full_example_l3_outside" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the Relation To Fallback Route Group resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_relation_to_fallback_route_group) folder. diff --git a/docs/resources/vrf_fallback_route_group.md b/docs/resources/vrf_fallback_route_group.md index ff5874641..a191f6e95 100644 --- a/docs/resources/vrf_fallback_route_group.md +++ b/docs/resources/vrf_fallback_route_group.md @@ -54,27 +54,41 @@ resource "aci_vrf_fallback_route_group" "full_example_vrf" { name_alias = "name_alias" vrf_fallback_route_group_members = [ { - annotation = "annotation_1" - description = "description_1" - name = "name_1" - name_alias = "name_alias_1" + annotation = "annotation_0" + description = "description_0" + name = "name_0" + name_alias = "name_alias_0" fallback_member = "2.2.2.2" + annotations = [ + { + key = "key_0" + value = "value_0" + } + ] + tags = [ + { + key = "key_0" + value = "value_0" + } + ] } ] annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the VRF Fallback Route Group resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_vrf_fallback_route_group) folder. diff --git a/docs/resources/vrf_fallback_route_group_member.md b/docs/resources/vrf_fallback_route_group_member.md index 704b9825e..57b883ef5 100644 --- a/docs/resources/vrf_fallback_route_group_member.md +++ b/docs/resources/vrf_fallback_route_group_member.md @@ -57,17 +57,19 @@ resource "aci_vrf_fallback_route_group_member" "full_example_vrf_fallback_route_ annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + ``` All examples for the VRF Fallback Route Group Member resource can be found in the [examples](https://github.com/CiscoDevNet/terraform-provider-aci/tree/master/examples/resources/aci_vrf_fallback_route_group_member) folder. diff --git a/examples/resources/aci_communication_policy/resource-all-attributes.tf b/examples/resources/aci_communication_policy/resource-all-attributes.tf index 3f8bc491c..32094fb89 100644 --- a/examples/resources/aci_communication_policy/resource-all-attributes.tf +++ b/examples/resources/aci_communication_policy/resource-all-attributes.tf @@ -9,40 +9,90 @@ resource "aci_communication_policy" "full_example" { strict_security_on_apic_oob_subnet = "no" http_ssl_configuration = [ { - access_control_allow_credential = "disabled" - access_control_allow_origins = "access_control_allow_origins_1" - admin_st = "disabled" - annotation = "annotation_1" - cli_only_mode = "disabled" - client_cert_auth_state = "disabled" - description = "description_1" - dh_param = "1024" - global_throttle_rate = "global_throttle_rate_1" - global_throttle_st = "disabled" - global_throttle_unit = "global_throttle_unit_1" - max_request_status_count = "max_request_status_count_1" - name = "name_1" - name_alias = "name_alias_1" - node_exporter = "disabled" - port = "port_1" - referer = "referer_1" - server_header = "disabled" - ssl_protocols = "TLSv1" - throttle_rate = "throttle_rate_1" - throttle_st = "disabled" - visore_access = "disabled" + access_control_allow_credential = "access_control_allow_credential_0" + access_control_allow_origins = "access_control_allow_origins_0" + admin_st = "admin_st_0" + annotation = "annotation_0" + cli_only_mode = "cli_only_mode_0" + client_cert_auth_state = "client_cert_auth_state_0" + description = "description_0" + dh_param = "dh_param_0" + global_throttle_rate = "global_throttle_rate_0" + global_throttle_st = "global_throttle_st_0" + global_throttle_unit = "global_throttle_unit_0" + max_request_status_count = "max_request_status_count_0" + name = "name_0" + name_alias = "name_alias_0" + node_exporter = "node_exporter_0" + port = "port_0" + referer = "referer_0" + server_header = "server_header_0" + ssl_protocols = "ssl_protocols_0" + throttle_rate = "throttle_rate_0" + throttle_st = "throttle_st_0" + visore_access = "visore_access_0" + tp = [ + { + annotation = "annotation_0" + target_dn = "target_dn_0" + annotations = [ + { + key = "key_0" + value = "value_0" + } + ] + tags = [ + { + key = "key_0" + value = "value_0" + } + ] + } + ] + key_ring = [ + { + annotation = "annotation_0" + tn_pki_key_ring_name = aci_.example.name + annotations = [ + { + key = "key_0" + value = "value_0" + } + ] + tags = [ + { + key = "key_0" + value = "value_0" + } + ] + } + ] + annotations = [ + { + key = "key_0" + value = "value_0" + } + ] + tags = [ + { + key = "key_0" + value = "value_0" + } + ] } ] annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_endpoint_tag_ip/resource-all-attributes.tf b/examples/resources/aci_endpoint_tag_ip/resource-all-attributes.tf index 847c24241..15be8440a 100644 --- a/examples/resources/aci_endpoint_tag_ip/resource-all-attributes.tf +++ b/examples/resources/aci_endpoint_tag_ip/resource-all-attributes.tf @@ -10,13 +10,15 @@ resource "aci_endpoint_tag_ip" "full_example_tenant" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_endpoint_tag_mac/resource-all-attributes.tf b/examples/resources/aci_endpoint_tag_mac/resource-all-attributes.tf index cb5fcf1f3..0e05f3da5 100644 --- a/examples/resources/aci_endpoint_tag_mac/resource-all-attributes.tf +++ b/examples/resources/aci_endpoint_tag_mac/resource-all-attributes.tf @@ -10,13 +10,15 @@ resource "aci_endpoint_tag_mac" "full_example_tenant" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_external_management_network_instance_profile/resource-all-attributes.tf b/examples/resources/aci_external_management_network_instance_profile/resource-all-attributes.tf index 55b9ca15a..08fbd7ab5 100644 --- a/examples/resources/aci_external_management_network_instance_profile/resource-all-attributes.tf +++ b/examples/resources/aci_external_management_network_instance_profile/resource-all-attributes.tf @@ -7,21 +7,35 @@ resource "aci_external_management_network_instance_profile" "full_example" { priority = "level1" relation_to_consumed_out_of_band_contracts = [ { - annotation = "annotation_1" - priority = "level1" + annotation = "annotation_0" + priority = "priority_0" out_of_band_contract_name = aci_out_of_band_contract.example.name + annotations = [ + { + key = "key_0" + value = "value_0" + } + ] + tags = [ + { + key = "key_0" + value = "value_0" + } + ] } ] annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_external_management_network_subnet/resource-all-attributes.tf b/examples/resources/aci_external_management_network_subnet/resource-all-attributes.tf index 95e868212..9a61375e6 100644 --- a/examples/resources/aci_external_management_network_subnet/resource-all-attributes.tf +++ b/examples/resources/aci_external_management_network_subnet/resource-all-attributes.tf @@ -9,13 +9,15 @@ resource "aci_external_management_network_subnet" "full_example_external_managem annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_l3out_consumer_label/resource-all-attributes.tf b/examples/resources/aci_l3out_consumer_label/resource-all-attributes.tf index 09a5c84eb..0bd087084 100644 --- a/examples/resources/aci_l3out_consumer_label/resource-all-attributes.tf +++ b/examples/resources/aci_l3out_consumer_label/resource-all-attributes.tf @@ -12,13 +12,15 @@ resource "aci_l3out_consumer_label" "full_example_l3_outside" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_l3out_provider_label/resource-all-attributes.tf b/examples/resources/aci_l3out_provider_label/resource-all-attributes.tf index 25cc8e025..b148031e6 100644 --- a/examples/resources/aci_l3out_provider_label/resource-all-attributes.tf +++ b/examples/resources/aci_l3out_provider_label/resource-all-attributes.tf @@ -11,13 +11,15 @@ resource "aci_l3out_provider_label" "full_example_l3_outside" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_l3out_redistribute_policy/resource-all-attributes.tf b/examples/resources/aci_l3out_redistribute_policy/resource-all-attributes.tf index 65ac30034..bf6d6a9b3 100644 --- a/examples/resources/aci_l3out_redistribute_policy/resource-all-attributes.tf +++ b/examples/resources/aci_l3out_redistribute_policy/resource-all-attributes.tf @@ -7,13 +7,15 @@ resource "aci_l3out_redistribute_policy" "full_example_l3_outside" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_out_of_band_contract/resource-all-attributes.tf b/examples/resources/aci_out_of_band_contract/resource-all-attributes.tf index 293499941..dfd1224ba 100644 --- a/examples/resources/aci_out_of_band_contract/resource-all-attributes.tf +++ b/examples/resources/aci_out_of_band_contract/resource-all-attributes.tf @@ -13,13 +13,15 @@ resource "aci_out_of_band_contract" "full_example" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_pim_route_map_entry/resource-all-attributes.tf b/examples/resources/aci_pim_route_map_entry/resource-all-attributes.tf index c3e6636ed..108aa62a0 100644 --- a/examples/resources/aci_pim_route_map_entry/resource-all-attributes.tf +++ b/examples/resources/aci_pim_route_map_entry/resource-all-attributes.tf @@ -13,13 +13,15 @@ resource "aci_pim_route_map_entry" "full_example_pim_route_map_policy" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_pim_route_map_policy/resource-all-attributes.tf b/examples/resources/aci_pim_route_map_policy/resource-all-attributes.tf index 76766aaf0..fc24f1c92 100644 --- a/examples/resources/aci_pim_route_map_policy/resource-all-attributes.tf +++ b/examples/resources/aci_pim_route_map_policy/resource-all-attributes.tf @@ -10,13 +10,15 @@ resource "aci_pim_route_map_policy" "full_example_tenant" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_relation_to_consumed_out_of_band_contract/resource-all-attributes.tf b/examples/resources/aci_relation_to_consumed_out_of_band_contract/resource-all-attributes.tf index da51cd5a4..a9c2b98b0 100644 --- a/examples/resources/aci_relation_to_consumed_out_of_band_contract/resource-all-attributes.tf +++ b/examples/resources/aci_relation_to_consumed_out_of_band_contract/resource-all-attributes.tf @@ -7,13 +7,15 @@ resource "aci_relation_to_consumed_out_of_band_contract" "full_example_external_ annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_relation_to_fallback_route_group/resource-all-attributes.tf b/examples/resources/aci_relation_to_fallback_route_group/resource-all-attributes.tf index 34cbde73b..9f68572bb 100644 --- a/examples/resources/aci_relation_to_fallback_route_group/resource-all-attributes.tf +++ b/examples/resources/aci_relation_to_fallback_route_group/resource-all-attributes.tf @@ -6,13 +6,15 @@ resource "aci_relation_to_fallback_route_group" "full_example_l3_outside" { annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_vrf_fallback_route_group/resource-all-attributes.tf b/examples/resources/aci_vrf_fallback_route_group/resource-all-attributes.tf index b62d8fdf0..3970fc89b 100644 --- a/examples/resources/aci_vrf_fallback_route_group/resource-all-attributes.tf +++ b/examples/resources/aci_vrf_fallback_route_group/resource-all-attributes.tf @@ -7,23 +7,37 @@ resource "aci_vrf_fallback_route_group" "full_example_vrf" { name_alias = "name_alias" vrf_fallback_route_group_members = [ { - annotation = "annotation_1" - description = "description_1" - name = "name_1" - name_alias = "name_alias_1" + annotation = "annotation_0" + description = "description_0" + name = "name_0" + name_alias = "name_alias_0" fallback_member = "2.2.2.2" + annotations = [ + { + key = "key_0" + value = "value_0" + } + ] + tags = [ + { + key = "key_0" + value = "value_0" + } + ] } ] annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/examples/resources/aci_vrf_fallback_route_group_member/resource-all-attributes.tf b/examples/resources/aci_vrf_fallback_route_group_member/resource-all-attributes.tf index bea43151d..051c77dfe 100644 --- a/examples/resources/aci_vrf_fallback_route_group_member/resource-all-attributes.tf +++ b/examples/resources/aci_vrf_fallback_route_group_member/resource-all-attributes.tf @@ -9,13 +9,15 @@ resource "aci_vrf_fallback_route_group_member" "full_example_vrf_fallback_route_ annotations = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] tags = [ { key = "key_0" - value = "value_1" + value = "value_0" } ] } + + diff --git a/gen/templates/resource_example_all_attributes.tf.tmpl b/gen/templates/resource_example_all_attributes.tf.tmpl index 861ed8d1a..154f67622 100644 --- a/gen/templates/resource_example_all_attributes.tf.tmpl +++ b/gen/templates/resource_example_all_attributes.tf.tmpl @@ -10,14 +10,8 @@ resource "aci_{{$.ResourceName}}" "full_example_{{getResourceName $key $.Definit {{- else}} {{overwriteProperty .PkgName .SnakeCaseName $.Definitions}} = "{{lookupTestValue .PkgName .SnakeCaseName $.TestVars $.Definitions}}" {{- end}}{{- end}} - {{- range $key, $value := $.Children}}{{$ChildResourceName := .ResourceName}} - {{$ChildResourceName}} = [ - { {{- range .Properties}}{{- if ne .NamedPropertyClass ""}} - {{overwriteProperty .PkgName .SnakeCaseName $.Definitions}} = aci_{{getResourceName .NamedPropertyClass $.Definitions}}.example.name - {{- else}} - {{overwriteProperty .PkgName .SnakeCaseName $.Definitions}} = "{{lookupChildTestValue .PkgName $ChildResourceName .SnakeCaseName $.TestVars 0 $.Definitions}}"{{- end}}{{ end}} - } - ] + {{- range $key, $value := $.Children}} + {{- template "childResourcesAndProperties" . }} {{- end}} } {{ end}} @@ -30,14 +24,23 @@ resource "aci_{{$.ResourceName}}" "full_example" { {{- else}} {{overwriteProperty .PkgName .SnakeCaseName $.Definitions}} = "{{lookupTestValue .PkgName .SnakeCaseName $.TestVars $.Definitions}}" {{- end}}{{- end}} - {{- range $key, $value := $.Children}}{{$ChildResourceName := .ResourceName}} + {{- range $key, $value := $.Children}} + {{- template "childResourcesAndProperties" . }} + {{- end}} +} +{{ end}} + +{{/* A sub template for including nested children in the examples. */}} +{{- define "childResourcesAndProperties" -}} +{{- $ChildResourceName := .ResourceName }} {{$ChildResourceName}} = [ { {{- range .Properties}}{{- if ne .NamedPropertyClass ""}} {{overwriteProperty .PkgName .SnakeCaseName $.Definitions}} = aci_{{getResourceName .NamedPropertyClass $.Definitions}}.example.name {{- else}} {{overwriteProperty .PkgName .SnakeCaseName $.Definitions}} = "{{lookupChildTestValue .PkgName $ChildResourceName .SnakeCaseName $.TestVars 0 $.Definitions}}"{{- end}}{{ end}} + {{- range $key, $value := $.Children}} + {{- template "childResourcesAndProperties" . }} + {{- end}} } ] - {{- end}} -} -{{ end}} \ No newline at end of file +{{- end}} \ No newline at end of file