diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateway_test.go b/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateway_test.go index 3bf8afd2aa..2a37efe704 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateway_test.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateway_test.go @@ -33,6 +33,29 @@ func TestAccIBMISVirtualEndpointGatewayDataSource_basic(t *testing.T) { }, }) } +func TestAccIBMISVirtualEndpointGatewayDataSource_AllowDnsResolutionBinding(t *testing.T) { + resName := "data.ibm_is_virtual_endpoint_gateway.data_test" + vpcname1 := fmt.Sprintf("tfvpngw-vpc-%d", acctest.RandIntRange(10, 100)) + enable_hub := false + allowbinding := true + name1 := fmt.Sprintf("tfvpngw-createname-%d", acctest.RandIntRange(10, 100)) + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckisVirtualEndpointGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISVirtualEndpointGatewayAllowDnsResolutionBindingDataSourceConfig(vpcname1, name1, enable_hub, allowbinding), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr( + resName, "name", name1), + resource.TestCheckResourceAttr( + resName, "allow_dns_resolution_binding", fmt.Sprintf("%t", allowbinding)), + ), + }, + }, + }) +} func testAccCheckIBMISVirtualEndpointGatewayDataSourceConfig(vpcname1, subnetname1, name1 string) string { // status filter defaults to empty @@ -41,6 +64,13 @@ func testAccCheckIBMISVirtualEndpointGatewayDataSourceConfig(vpcname1, subnetnam name = ibm_is_virtual_endpoint_gateway.endpoint_gateway.name }`) } +func testAccCheckIBMISVirtualEndpointGatewayAllowDnsResolutionBindingDataSourceConfig(vpcname1, name1 string, enable_hub, allowbinding bool) string { + // status filter defaults to empty + return testAccCheckisVirtualEndpointGatewayConfigAllowDnsResolutionBinding(vpcname1, name1, enable_hub, allowbinding) + fmt.Sprintf(` + data "ibm_is_virtual_endpoint_gateway" "data_test" { + name = ibm_is_virtual_endpoint_gateway.endpoint_gateway.name + }`) +} // service endpoints func TestAccIBMISVirtualEndpointGatewayDataSource_service_endpoints(t *testing.T) { diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateways_test.go b/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateways_test.go index 712401fdf0..6bf123de9d 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateways_test.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_endpoint_gateways_test.go @@ -33,6 +33,29 @@ func TestAccIBMISVirtualEndpointGatewaysDataSource_basic(t *testing.T) { }, }) } +func TestAccIBMISVirtualEndpointGatewaysDataSource_AllowDnsResolutionBinding(t *testing.T) { + // t.Skip() + resName := "data.ibm_is_virtual_endpoint_gateways.test1" + vpcname1 := fmt.Sprintf("tfvpngw-vpc-%d", acctest.RandIntRange(10, 100)) + name1 := fmt.Sprintf("tfvpngw-createname-%d", acctest.RandIntRange(10, 100)) + enable_hub := false + allowbinding := true + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISVirtualEndpointGatewaysAllowDnsResolutionBindingDataSourceConfig(vpcname1, name1, enable_hub, allowbinding), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet( + resName, "virtual_endpoint_gateways.0.name"), + resource.TestCheckResourceAttrSet( + resName, "virtual_endpoint_gateways.0.allow_dns_resolution_binding"), + ), + }, + }, + }) +} func testAccCheckIBMISVirtualEndpointGatewaysDataSourceConfig(vpcname1, subnetname1, name1 string) string { // status filter defaults to empty @@ -41,6 +64,13 @@ func testAccCheckIBMISVirtualEndpointGatewaysDataSourceConfig(vpcname1, subnetna depends_on = [ibm_is_virtual_endpoint_gateway.endpoint_gateway] }`) } +func testAccCheckIBMISVirtualEndpointGatewaysAllowDnsResolutionBindingDataSourceConfig(vpcname1, name1 string, enable_hub, allowbinding bool) string { + // status filter defaults to empty + return testAccCheckisVirtualEndpointGatewayConfigAllowDnsResolutionBinding(vpcname1, name1, enable_hub, allowbinding) + fmt.Sprintf(` + data "ibm_is_virtual_endpoint_gateways" "test1" { + depends_on = [ibm_is_virtual_endpoint_gateway.endpoint_gateway] + }`) +} // service endpoints diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding.go b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding.go index e6c90e2975..abd955fd57 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding.go @@ -25,7 +25,7 @@ func DataSourceIBMIsVPCDnsResolutionBinding() *schema.Resource { Required: true, Description: "The VPC identifier.", }, - "id": &schema.Schema{ + "identifier": &schema.Schema{ Type: schema.TypeString, Required: true, Description: "The DNS resolution binding identifier.", @@ -230,7 +230,7 @@ func dataSourceIBMIsVPCDnsResolutionBindingRead(context context.Context, d *sche getVPCDnsResolutionBindingOptions := &vpcv1.GetVPCDnsResolutionBindingOptions{} getVPCDnsResolutionBindingOptions.SetVPCID(d.Get("vpc_id").(string)) - getVPCDnsResolutionBindingOptions.SetID(d.Get("id").(string)) + getVPCDnsResolutionBindingOptions.SetID(d.Get("identifier").(string)) vpcdnsResolutionBinding, response, err := sess.GetVPCDnsResolutionBindingWithContext(context, getVPCDnsResolutionBindingOptions) if err != nil { diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding_test.go index b48778e98f..6faa8b52bc 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_binding_test.go @@ -7,18 +7,24 @@ import ( "fmt" "testing" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) func TestAccIBMIsVPCDnsResolutionBindingDataSourceBasic(t *testing.T) { + vpcname1 := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + enable_hub1 := true + vpcname2 := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + bindingname := fmt.Sprintf("tf-vpc-dns-binding-%d", acctest.RandIntRange(10, 100)) + enable_hub2 := false resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccCheckIBMIsVPCDnsResolutionBindingDataSourceConfigBasic(), + Config: testAccCheckIBMIsVPCDnsResolutionBindingDataSourceConfigBasic(vpcname1, vpcname2, bindingname, enable_hub1, enable_hub2), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "id"), resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "vpc_id"), @@ -36,11 +42,11 @@ func TestAccIBMIsVPCDnsResolutionBindingDataSourceBasic(t *testing.T) { }) } -func testAccCheckIBMIsVPCDnsResolutionBindingDataSourceConfigBasic() string { - return fmt.Sprintf(` +func testAccCheckIBMIsVPCDnsResolutionBindingDataSourceConfigBasic(vpcname1, vpcname2, bindingname string, enable_hub1, enable_hub2 bool) string { + return testAccCheckIBMIsVPCDnsResolutionBindingResourceConfigBasic(vpcname1, vpcname2, bindingname, enable_hub1, enable_hub2) + fmt.Sprintf(` data "ibm_is_vpc_dns_resolution_binding" "is_vpc_dns_resolution_binding_instance" { - vpc_id = "vpc_id" - id = "id" + vpc_id = ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding.vpc_id + identifier = "id" } `) } diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings.go b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings.go index ccac01bdcd..64d86577ef 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings.go @@ -297,6 +297,7 @@ func dataSourceIBMIsVPCDnsResolutionBindingsRead(context context.Context, d *sch l[isVPCDnsResolutionBindingLifecycleState] = dns.LifecycleState l[isVPCDnsResolutionBindingName] = dns.Name + l[isVPCDnsResolutionBindingHref] = dns.Href l[isVPCDnsResolutionBindingResourceType] = dns.ResourceType diff --git a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings_test.go b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings_test.go index 50925e4fcb..da4dff088b 100644 --- a/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings_test.go +++ b/ibm/service/vpc/data_source_ibm_is_vpc_dns_resolution_bindings_test.go @@ -7,24 +7,28 @@ import ( "fmt" "testing" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) func TestAccIBMIsVPCDnsResolutionBindingsDataSourceBasic(t *testing.T) { + vpcname1 := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + enable_hub1 := true + vpcname2 := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + bindingname := fmt.Sprintf("tf-vpc-dns-binding-%d", acctest.RandIntRange(10, 100)) + enable_hub2 := false resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccCheckIBMIsVPCDnsResolutionBindingsDataSourceConfigBasic(), + Config: testAccCheckIBMIsVPCDnsResolutionBindingsDataSourceConfigBasic(vpcname1, vpcname2, bindingname, enable_hub1, enable_hub2), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_bindings.is_vpc_dns_resolution_bindings", "dns_resolution_bindings.0.id"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_bindings.is_vpc_dns_resolution_bindings", "dns_resolution_bindings.0.vpc_id"), + resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_bindings.is_vpc_dns_resolution_bindings", "vpc_id"), resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_bindings.is_vpc_dns_resolution_bindings", "dns_resolution_bindings.0.id"), resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_bindings.is_vpc_dns_resolution_bindings", "dns_resolution_bindings.0.created_at"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_bindings.is_vpc_dns_resolution_bindings", "dns_resolution_bindings.0.endpoint_gateways.#"), resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_bindings.is_vpc_dns_resolution_bindings", "dns_resolution_bindings.0.href"), resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_bindings.is_vpc_dns_resolution_bindings", "dns_resolution_bindings.0.lifecycle_state"), resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_bindings.is_vpc_dns_resolution_bindings", "dns_resolution_bindings.0.name"), @@ -36,11 +40,10 @@ func TestAccIBMIsVPCDnsResolutionBindingsDataSourceBasic(t *testing.T) { }) } -func testAccCheckIBMIsVPCDnsResolutionBindingsDataSourceConfigBasic() string { - return fmt.Sprintf(` +func testAccCheckIBMIsVPCDnsResolutionBindingsDataSourceConfigBasic(vpcname1, vpcname2, bindingname string, enable_hub1, enable_hub2 bool) string { + return testAccCheckIBMIsVPCDnsResolutionBindingResourceConfigBasic(vpcname1, vpcname2, bindingname, enable_hub1, enable_hub2) + fmt.Sprintf(` data "ibm_is_vpc_dns_resolution_bindings" "is_vpc_dns_resolution_bindings" { - vpc_id = "vpc_id" - id = "id" + vpc_id = ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding.vpc_id } `) } diff --git a/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_test.go b/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_test.go index 478b857dee..e0687d2f59 100644 --- a/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_test.go +++ b/ibm/service/vpc/resource_ibm_is_virtual_endpoint_gateway_test.go @@ -39,7 +39,7 @@ func TestAccIBMISVirtualEndpointGateway_Basic(t *testing.T) { func TestAccIBMISVirtualEndpointGateway_AllowDnsResolutionBinding(t *testing.T) { var endpointGateway string vpcname1 := fmt.Sprintf("tfvpngw-vpc-%d", acctest.RandIntRange(10, 100)) - subnetname1 := fmt.Sprintf("tfvpngw-subnet-%d", acctest.RandIntRange(10, 100)) + enable_hub := false name1 := fmt.Sprintf("tfvpngw-createname-%d", acctest.RandIntRange(10, 100)) name := "ibm_is_virtual_endpoint_gateway.endpoint_gateway" allowDnsResolutionBindingTrue := true @@ -49,17 +49,19 @@ func TestAccIBMISVirtualEndpointGateway_AllowDnsResolutionBinding(t *testing.T) Providers: acc.TestAccProviders, Steps: []resource.TestStep{ { - Config: testAccCheckisVirtualEndpointGatewayConfigAllowDnsResolutionBinding(vpcname1, subnetname1, name1, allowDnsResolutionBindingTrue), + Config: testAccCheckisVirtualEndpointGatewayConfigAllowDnsResolutionBinding(vpcname1, name1, enable_hub, allowDnsResolutionBindingTrue), Check: resource.ComposeTestCheckFunc( testAccCheckisVirtualEndpointGatewayExists(name, &endpointGateway), resource.TestCheckResourceAttr(name, "name", name1), + resource.TestCheckResourceAttr(name, "allow_dns_resolution_binding", fmt.Sprintf("%t", allowDnsResolutionBindingTrue)), ), }, { - Config: testAccCheckisVirtualEndpointGatewayConfigAllowDnsResolutionBinding(vpcname1, subnetname1, name1, allowDnsResolutionBindingFalse), + Config: testAccCheckisVirtualEndpointGatewayConfigAllowDnsResolutionBinding(vpcname1, name1, enable_hub, allowDnsResolutionBindingFalse), Check: resource.ComposeTestCheckFunc( testAccCheckisVirtualEndpointGatewayExists(name, &endpointGateway), resource.TestCheckResourceAttr(name, "name", name1), + resource.TestCheckResourceAttr(name, "allow_dns_resolution_binding", fmt.Sprintf("%t", allowDnsResolutionBindingFalse)), ), }, }, @@ -283,32 +285,23 @@ func testAccCheckisVirtualEndpointGatewayConfigBasic(vpcname1, subnetname1, name }`, vpcname1, subnetname1, acc.ISZoneName, acc.ISCIDR, name1) } -func testAccCheckisVirtualEndpointGatewayConfigAllowDnsResolutionBinding(vpcname1, subnetname1, name1 string, allowDnsResolutionBinding bool) string { +func testAccCheckisVirtualEndpointGatewayConfigAllowDnsResolutionBinding(vpcname1, name1 string, enable_hub, allowDnsResolutionBinding bool) string { return fmt.Sprintf(` - data "ibm_resource_group" "test_acc" { - is_default=true - } resource "ibm_is_vpc" "testacc_vpc" { - name = "%[1]s" - resource_group = data.ibm_resource_group.test_acc.id - } - resource "ibm_is_subnet" "testacc_subnet" { - name = "%[2]s" - vpc = ibm_is_vpc.testacc_vpc.id - zone = "%[3]s" - ipv4_cidr_block = "%[4]s" - resource_group = data.ibm_resource_group.test_acc.id + name = "%s" + dns { + enable_hub = %t + } } resource "ibm_is_virtual_endpoint_gateway" "endpoint_gateway" { - name = "%[5]s" + name = "%s" target { - name = "ibm-dns-server2" - resource_type = "provider_infrastructure_service" + name = "ibm-ntp-server" + resource_type = "provider_infrastructure_service" } vpc = ibm_is_vpc.testacc_vpc.id - resource_group = data.ibm_resource_group.test_acc.id allow_dns_resolution_binding = %t - }`, vpcname1, subnetname1, acc.ISZoneName, acc.ISCIDR, name1, allowDnsResolutionBinding) + }`, vpcname1, enable_hub, name1, allowDnsResolutionBinding) } func testAccCheckisVirtualEndpointGatewayConfigFullySpecified(vpcname1, subnetname1, name1 string) string { diff --git a/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding_test.go b/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding_test.go index 65e6820b6f..c4dad92fb4 100644 --- a/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding_test.go +++ b/ibm/service/vpc/resource_ibm_is_vpc_dns_resolution_binding_test.go @@ -7,40 +7,59 @@ import ( "fmt" "testing" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" acc "github.com/IBM-Cloud/terraform-provider-ibm/ibm/acctest" ) func TestAccIBMIsVPCDnsResolutionBindingResourceBasic(t *testing.T) { + vpcname1 := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + enable_hub1 := true + vpcname2 := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + bindingname := fmt.Sprintf("tf-vpc-dns-binding-%d", acctest.RandIntRange(10, 100)) + enable_hub2 := false resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccCheckIBMIsVPCDnsResolutionBindingDataSourceConfigBasic(), + Config: testAccCheckIBMIsVPCDnsResolutionBindingResourceConfigBasic(vpcname1, vpcname2, bindingname, enable_hub1, enable_hub2), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "id"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "vpc_id"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "id"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "created_at"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "endpoint_gateways.#"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "href"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "lifecycle_state"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "name"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "resource_type"), - resource.TestCheckResourceAttrSet("data.ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "vpc.#"), + resource.TestCheckResourceAttrSet("ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "id"), + resource.TestCheckResourceAttrSet("ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "vpc_id"), + resource.TestCheckResourceAttrSet("ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "created_at"), + resource.TestCheckResourceAttrSet("ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "href"), + resource.TestCheckResourceAttrSet("ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "lifecycle_state"), + resource.TestCheckResourceAttrSet("ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "name"), + resource.TestCheckResourceAttrSet("ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "resource_type"), + resource.TestCheckResourceAttrSet("ibm_is_vpc_dns_resolution_binding.is_vpc_dns_resolution_binding", "vpc.#"), ), }, }, }) } -func testAccCheckIBMIsVPCDnsResolutionBindingResourceConfigBasic() string { +func testAccCheckIBMIsVPCDnsResolutionBindingResourceConfigBasic(vpcname1, vpcname2, bindingname string, enablehub1, enablehub2 bool) string { return fmt.Sprintf(` - data "ibm_is_vpc_dns_resolution_binding" "is_vpc_dns_resolution_binding_instance" { - vpc_id = "vpc_id" - id = "id" + resource ibm_is_vpc testacc_vpc1 { + name = "%s" + dns { + enable_hub = %t } - `) + } + resource ibm_is_vpc testacc_vpc2 { + name = "%s" + dns { + enable_hub = %t + } + } + resource ibm_is_vpc_dns_resolution_binding is_vpc_dns_resolution_binding { + name = "%s" + vpc_id= ibm_is_vpc.testacc_vpc2.id + vpc { + id = ibm_is_vpc.testacc_vpc1.id + } + } + `, vpcname1, enablehub1, vpcname2, enablehub2, bindingname) }