@@ -242,7 +242,7 @@ func TestAccTencentCloudGaapHttpDomain_httpsRealserverCertificateIds(t *testing.
242242 CheckDestroy : testAccCheckGaapHttpDomainDestroy (id ),
243243 Steps : []resource.TestStep {
244244 {
245- Config : testAccGaapHttpDomainHttpsRsIds ,
245+ Config : testAccGaapHttpDomainHttpsRsIds2 ,
246246 Check : resource .ComposeTestCheckFunc (
247247 testAccCheckGaapHttpDomainExists ("tencentcloud_gaap_http_domain.foo" , id ),
248248 resource .TestCheckResourceAttrSet ("tencentcloud_gaap_http_domain.foo" , "listener_id" ),
@@ -335,7 +335,7 @@ var testAccGaapHttpDomainBasic = fmt.Sprintf(`
335335resource tencentcloud_gaap_layer7_listener "foo" {
336336 protocol = "HTTP"
337337 name = "ci-test-gaap-l7-listener"
338- port = 80
338+ port = 7170
339339 proxy_id = "%s"
340340}
341341
@@ -355,7 +355,7 @@ resource tencentcloud_gaap_certificate "foo" {
355355resource tencentcloud_gaap_layer7_listener "foo" {
356356 protocol = "HTTPS"
357357 name = "ci-test-gaap-l7-listener"
358- port = 80
358+ port = 7171
359359 proxy_id = "%s"
360360 certificate_id = tencentcloud_gaap_certificate.foo.id
361361 forward_protocol = "HTTP"
@@ -385,7 +385,7 @@ resource tencentcloud_gaap_certificate "bar" {
385385resource tencentcloud_gaap_layer7_listener "foo" {
386386 protocol = "HTTPS"
387387 name = "ci-test-gaap-l7-listener"
388- port = 80
388+ port = 7172
389389 proxy_id = "%s"
390390 certificate_id = tencentcloud_gaap_certificate.foo.id
391391 client_certificate_id = tencentcloud_gaap_certificate.bar.id
@@ -446,7 +446,7 @@ resource tencentcloud_gaap_certificate "gaap" {
446446resource tencentcloud_gaap_layer7_listener "foo" {
447447 protocol = "HTTPS"
448448 name = "ci-test-gaap-l7-listener"
449- port = 80
449+ port = 7172
450450 proxy_id = "%s"
451451 certificate_id = tencentcloud_gaap_certificate.foo.id
452452 client_certificate_id = tencentcloud_gaap_certificate.bar.id
@@ -503,7 +503,7 @@ resource tencentcloud_gaap_certificate "client1" {
503503resource tencentcloud_gaap_layer7_listener "foo" {
504504 protocol = "HTTPS"
505505 name = "ci-test-gaap-l7-listener"
506- port = 80
506+ port = 7173
507507 proxy_id = "%s"
508508 certificate_id = tencentcloud_gaap_certificate.foo.id
509509 client_certificate_ids = [tencentcloud_gaap_certificate.bar.id]
@@ -550,7 +550,7 @@ resource tencentcloud_gaap_certificate "client3" {
550550resource tencentcloud_gaap_layer7_listener "foo" {
551551 protocol = "HTTPS"
552552 name = "ci-test-gaap-l7-listener"
553- port = 80
553+ port = 7173
554554 proxy_id = "%s"
555555 certificate_id = tencentcloud_gaap_certificate.foo.id
556556 client_certificate_ids = [tencentcloud_gaap_certificate.bar.id]
@@ -592,7 +592,7 @@ resource tencentcloud_gaap_certificate "client1" {
592592resource tencentcloud_gaap_layer7_listener "foo" {
593593 protocol = "HTTPS"
594594 name = "ci-test-gaap-l7-listener"
595- port = 80
595+ port = 7174
596596 proxy_id = "%s"
597597 certificate_id = tencentcloud_gaap_certificate.foo.id
598598 client_certificate_ids = [tencentcloud_gaap_certificate.bar.id]
@@ -633,7 +633,7 @@ resource tencentcloud_gaap_certificate "client1" {
633633resource tencentcloud_gaap_layer7_listener "foo" {
634634 protocol = "HTTPS"
635635 name = "ci-test-gaap-l7-listener"
636- port = 80
636+ port = 7174
637637 proxy_id = "%s"
638638 certificate_id = tencentcloud_gaap_certificate.foo.id
639639 client_certificate_ids = [tencentcloud_gaap_certificate.bar.id]
@@ -674,7 +674,7 @@ resource tencentcloud_gaap_certificate "realserver1" {
674674resource tencentcloud_gaap_layer7_listener "foo" {
675675 protocol = "HTTPS"
676676 name = "ci-test-gaap-l7-listener"
677- port = 80
677+ port = 7176
678678 proxy_id = "%s"
679679 certificate_id = tencentcloud_gaap_certificate.foo.id
680680 client_certificate_id = tencentcloud_gaap_certificate.bar.id
@@ -696,6 +696,50 @@ resource tencentcloud_gaap_http_domain "foo" {
696696 defaultGaapProxyId ,
697697)
698698
699+ var testAccGaapHttpDomainHttpsRsIds2 = fmt .Sprintf (`
700+ resource tencentcloud_gaap_certificate "foo" {
701+ type = "SERVER"
702+ content = %s
703+ key = %s
704+ }
705+
706+ resource tencentcloud_gaap_certificate "bar" {
707+ type = "CLIENT"
708+ content = %s
709+ key = %s
710+ }
711+
712+ resource tencentcloud_gaap_certificate "realserver1" {
713+ type = "REALSERVER"
714+ content = %s
715+ key = %s
716+ }
717+
718+ resource tencentcloud_gaap_layer7_listener "foo" {
719+ protocol = "HTTPS"
720+ name = "ci-test-gaap-l7-listener"
721+ port = 7177
722+ proxy_id = "%s"
723+ certificate_id = tencentcloud_gaap_certificate.foo.id
724+ client_certificate_id = tencentcloud_gaap_certificate.bar.id
725+ forward_protocol = "HTTPS"
726+ auth_type = 1
727+ }
728+
729+ resource tencentcloud_gaap_http_domain "foo" {
730+ listener_id = tencentcloud_gaap_layer7_listener.foo.id
731+ domain = "www.qq.com"
732+
733+ realserver_auth = true
734+ realserver_certificate_ids = [tencentcloud_gaap_certificate.realserver1.id]
735+ realserver_certificate_domain = "qq.com"
736+ }
737+ ` , "<<EOF" + testAccGaapCertificateServerCert + "EOF" , "<<EOF" + testAccGaapCertificateServerKey + "EOF" ,
738+ "<<EOF" + testAccGaapCertificateClientCA + "EOF" , "<<EOF" + testAccGaapCertificateClientCAKey + "EOF" ,
739+ "<<EOF" + testAccGaapCertificateClientCA + "EOF" , "<<EOF" + testAccGaapCertificateClientCAKey + "EOF" ,
740+ defaultGaapProxyId ,
741+ )
742+
699743var testAccGaapHttpDomainHttpsRsIds = fmt .Sprintf (`
700744resource tencentcloud_gaap_certificate "foo" {
701745 type = "SERVER"
@@ -718,7 +762,7 @@ resource tencentcloud_gaap_certificate "realserver1" {
718762resource tencentcloud_gaap_layer7_listener "foo" {
719763 protocol = "HTTPS"
720764 name = "ci-test-gaap-l7-listener"
721- port = 80
765+ port = 7176
722766 proxy_id = "%s"
723767 certificate_id = tencentcloud_gaap_certificate.foo.id
724768 client_certificate_id = tencentcloud_gaap_certificate.bar.id
@@ -768,7 +812,7 @@ resource tencentcloud_gaap_certificate "realserver2" {
768812resource tencentcloud_gaap_layer7_listener "foo" {
769813 protocol = "HTTPS"
770814 name = "ci-test-gaap-l7-listener"
771- port = 80
815+ port = 7177
772816 proxy_id = "%s"
773817 certificate_id = tencentcloud_gaap_certificate.foo.id
774818 client_certificate_id = tencentcloud_gaap_certificate.bar.id
0 commit comments