1919
2020 backendSetDataSourceRepresentation = map [string ]interface {}{
2121 "load_balancer_id" : Representation {repType : Required , create : `${oci_load_balancer_load_balancer.test_load_balancer.id}` },
22+ "filter" : RepresentationGroup {Required , backendSetDataSourceFilterRepresentation }}
23+ backendSetDataSourceFilterRepresentation = map [string ]interface {}{
24+ "name" : Representation {repType : Required , create : `name` },
25+ "values" : Representation {repType : Required , create : []string {`${oci_load_balancer_backend_set.test_backend_set.name}` }},
2226 }
2327
2428 backendSetRepresentation = map [string ]interface {}{
2933 "session_persistence_configuration" : RepresentationGroup {Optional , backendSetSessionPersistenceConfigurationRepresentation },
3034 "ssl_configuration" : RepresentationGroup {Optional , backendSetSslConfigurationRepresentation },
3135 }
32-
3336 backendSetHealthCheckerRepresentation = map [string ]interface {}{
3437 "protocol" : Representation {repType : Required , create : `HTTP` },
3538 "interval_ms" : Representation {repType : Optional , create : `1000` , update : `2000` },
@@ -40,20 +43,18 @@ var (
4043 "timeout_in_millis" : Representation {repType : Optional , create : `10000` , update : `11` },
4144 "url_path" : Representation {repType : Required , create : `/healthcheck` , update : `urlPath2` },
4245 }
43-
4446 backendSetSessionPersistenceConfigurationRepresentation = map [string ]interface {}{
4547 "cookie_name" : Representation {repType : Required , create : `example_cookie` },
4648 "disable_fallback" : Representation {repType : Optional , create : `false` , update : `true` },
4749 }
48-
4950 backendSetSslConfigurationRepresentation = map [string ]interface {}{
50- "certificate_name" : Representation {repType : Required , create : `${oci_load_balancer_certificate.t .certificate_name}` },
51+ "certificate_name" : Representation {repType : Required , create : `${oci_load_balancer_certificate.test_certificate .certificate_name}` },
5152 "verify_depth" : Representation {repType : Optional , create : `6` },
5253 "verify_peer_certificate" : Representation {repType : Optional , create : `false` },
5354 }
5455
5556 BackendSetResourceDependencies = `
56- resource "oci_load_balancer_certificate" "t " {
57+ resource "oci_load_balancer_certificate" "test_certificate " {
5758 load_balancer_id = "${oci_load_balancer_load_balancer.test_load_balancer.id}"
5859 ca_certificate = "-----BEGIN CERTIFICATE-----\nMIIBNzCB4gIJAKtwJkxUgNpzMA0GCSqGSIb3DQEBCwUAMCMxITAfBgNVBAoTGElu\ndGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0xNzA0MTIyMTU3NTZaFw0xODA0MTIy\nMTU3NTZaMCMxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDBcMA0G\nCSqGSIb3DQEBAQUAA0sAMEgCQQDlM8lz3BFJA6zBlsF63k9ajPVq3Q1WQoHQ3j35\n08DRKIfwqfV+CxL63W3dZrwL4TrjqorP5CQ36+I6OWALH2zVAgMBAAEwDQYJKoZI\nhvcNAQELBQADQQCEjHVQJoiiVpIIvDWF+4YDRReVuwzrvq2xduWw7CIsDWlYuGZT\nQKVY6tnTy2XpoUk0fqUvMB/M2HGQ1WqZGHs6\n-----END CERTIFICATE-----"
5960 certificate_name = "example_certificate_bundle"
@@ -126,7 +127,7 @@ func TestLoadBalancerBackendSetResource_basic(t *testing.T) {
126127 resource .TestCheckResourceAttr (resourceName , "session_persistence_configuration.0.cookie_name" , "example_cookie" ),
127128 resource .TestCheckResourceAttr (resourceName , "session_persistence_configuration.0.disable_fallback" , "false" ),
128129 resource .TestCheckResourceAttr (resourceName , "ssl_configuration.#" , "1" ),
129- resource .TestCheckResourceAttr (resourceName , "ssl_configuration.0.certificate_name" , "example_certificate_bundle " ),
130+ resource .TestCheckResourceAttrSet (resourceName , "ssl_configuration.0.certificate_name" ),
130131 resource .TestCheckResourceAttr (resourceName , "ssl_configuration.0.verify_depth" , "6" ),
131132 resource .TestCheckResourceAttr (resourceName , "ssl_configuration.0.verify_peer_certificate" , "false" ),
132133
@@ -158,7 +159,7 @@ func TestLoadBalancerBackendSetResource_basic(t *testing.T) {
158159 resource .TestCheckResourceAttr (resourceName , "session_persistence_configuration.0.cookie_name" , "example_cookie" ),
159160 resource .TestCheckResourceAttr (resourceName , "session_persistence_configuration.0.disable_fallback" , "true" ),
160161 resource .TestCheckResourceAttr (resourceName , "ssl_configuration.#" , "1" ),
161- resource .TestCheckResourceAttr (resourceName , "ssl_configuration.0.certificate_name" , "example_certificate_bundle " ),
162+ resource .TestCheckResourceAttrSet (resourceName , "ssl_configuration.0.certificate_name" ),
162163 resource .TestCheckResourceAttr (resourceName , "ssl_configuration.0.verify_depth" , "6" ),
163164 resource .TestCheckResourceAttr (resourceName , "ssl_configuration.0.verify_peer_certificate" , "false" ),
164165
@@ -196,7 +197,7 @@ func TestLoadBalancerBackendSetResource_basic(t *testing.T) {
196197 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.session_persistence_configuration.0.cookie_name" , "example_cookie" ),
197198 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.session_persistence_configuration.0.disable_fallback" , "true" ),
198199 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.ssl_configuration.#" , "1" ),
199- resource .TestCheckResourceAttr (datasourceName , "backendsets.0.ssl_configuration.0.certificate_name" , "example_certificate_bundle " ),
200+ resource .TestCheckResourceAttrSet (datasourceName , "backendsets.0.ssl_configuration.0.certificate_name" ),
200201 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.ssl_configuration.0.verify_depth" , "6" ),
201202 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.ssl_configuration.0.verify_peer_certificate" , "false" ),
202203 ),
0 commit comments