@@ -36,6 +36,10 @@ Following environment variables are required:
3636 - TF_VAR_new_password - new password used for update connection, due to sec central issues, we must use environment variables instead of hardcoded passwords
3737 - TF_VAR_password_secret_id - secret which stores the password used for create connection
3838 - TF_VAR_new_password_secret_id - secret which stores new password used for update connection
39+ - TF_VAR_stream_pool_id - streampool id for oci streaming connection
40+ - TF_VAR_streaming_username - full username including tenant and streampool id for oci streaming connection (e.g. tenant/username/streampoolid)
41+ - TF_VAR_cluster_id - Kafka cluster ocid
42+ - TF_VAR_user_ocid - user ocid
3943
4044Following environment variables are optional:
4145 - TF_VAR_create_security_attributes - by default the SAs are not created, set this to true if creation should happen
@@ -138,6 +142,7 @@ var (
138142 oci_golden_gate .ConnectionTypeDatabricks ,
139143 oci_golden_gate .ConnectionTypeGooglePubsub ,
140144 oci_golden_gate .ConnectionTypeMicrosoftFabric ,
145+ oci_golden_gate .ConnectionTypeOracleAiDataPlatform ,
141146 }
142147
143148 CommonConnectionRepresentation = map [string ]interface {}{
@@ -430,6 +435,30 @@ var (
430435 excludedFieldsFromDataCheck : []string {"bootstrap_servers" },
431436 },
432437
438+ // OCI Streaming
439+ {connectionType : oci_golden_gate .ConnectionTypeKafka , technologyType : oci_golden_gate .TechnologyTypeOciStreaming ,
440+ representation : map [string ]interface {}{
441+ "security_protocol" : acctest.Representation {RepType : acctest .Required , Create : string (oci_golden_gate .KafkaConnectionSecurityProtocolSaslSsl )},
442+ "stream_pool_id" : acctest.Representation {RepType : acctest .Optional , Create : `${var.stream_pool_id}` },
443+ "should_use_resource_principal" : acctest.Representation {RepType : acctest .Optional , Create : `true` },
444+ },
445+ },
446+
447+ // OCI Streaming with Apache Kafka
448+ {connectionType : oci_golden_gate .ConnectionTypeKafka , technologyType : oci_golden_gate .TechnologyTypeOciStreamingWithApacheKafka ,
449+ representation : map [string ]interface {}{
450+ "security_protocol" : acctest.Representation {RepType : acctest .Required , Create : string (oci_golden_gate .KafkaConnectionSecurityProtocolSaslSsl )},
451+ "username" : acctest.Representation {RepType : acctest .Optional , Create : `username` , Update : `newUsername` },
452+ "password" : acctest.Representation {RepType : acctest .Optional , Create : `${var.password}` , Update : `${var.new_password}` },
453+ "bootstrap_servers" : acctest.RepresentationGroup {RepType : acctest .Optional , Group : map [string ]interface {}{
454+ "host" : acctest.Representation {RepType : acctest .Required , Create : `whatever.fqdn.oraclecloud.com` },
455+ "port" : acctest.Representation {RepType : acctest .Required , Create : `9092` },
456+ "private_ip" : acctest.Representation {RepType : acctest .Required , Create : `10.0.0.1` },
457+ }},
458+ },
459+ excludedFieldsFromDataCheck : []string {"bootstrap_servers" },
460+ },
461+
433462 // Kafka Schema Registry
434463 {connectionType : oci_golden_gate .ConnectionTypeKafkaSchemaRegistry , technologyType : oci_golden_gate .TechnologyTypeConfluentSchemaRegistry ,
435464 representation : map [string ]interface {}{
@@ -619,6 +648,21 @@ var (
619648 }},
620649 },
621650 },
651+
652+ // OracleAiDataPlatform
653+ {connectionType : oci_golden_gate .ConnectionTypeOracleAiDataPlatform , technologyType : oci_golden_gate .TechnologyTypeOracleAiDataPlatform ,
654+ representation : map [string ]interface {}{
655+ "connection_url" : acctest.Representation {RepType : acctest .Required , Create : `jdbc:spark://gateway.datalake.us-phoenix-1.oci.oraclecloud.com/default` ,
656+ Update : `jdbc:spark://gateway.datalake.us-phoenix-1.oci.oraclecloud.com/default2` },
657+ "user_id" : acctest.Representation {RepType : acctest .Required , Update : `${var.user_ocid}` },
658+ "private_key_file_secret_id" : acctest.Representation {RepType : acctest .Required , Update : `${var.new_password_secret_id}` },
659+ "public_key_fingerprint" : acctest.Representation {RepType : acctest .Required , Update : `myfingerprint` },
660+ "key_id" : acctest.Representation {RepType : acctest .Required },
661+ "vault_id" : acctest.Representation {RepType : acctest .Required },
662+ "should_use_resource_principal" : acctest.Representation {RepType : acctest .Optional , Create : `true` , Update : `false` },
663+ "does_use_secret_ids" : acctest.Representation {RepType : acctest .Required , Create : `true` },
664+ },
665+ },
622666 }
623667
624668 ExcludedFields = []string {
@@ -671,7 +715,11 @@ func TestGoldenGateConnectionResource_basic(t *testing.T) {
671715 NEW_PASSWORD_SECRET_ID = "new_password_secret_id"
672716 SUBSCRIPTION_ID = "subscription_id"
673717 CLUSTER_PLACEMENT_GROUP_ID = "cluster_placement_group_id"
674- SECURITY_ATTRIBUTES = "security_attributes"
718+ SECURITY_ATTRIBUTES = "security_attributes"
719+ STREAM_POOL_ID = "stream_pool_id"
720+ STREAMING_USERNAME = "streaming_username"
721+ CLUSTER_ID = "cluster_id"
722+ USER_ID = "user_ocid"
675723 )
676724
677725 config := acctest .ProviderTestConfig () +
@@ -686,7 +734,11 @@ func TestGoldenGateConnectionResource_basic(t *testing.T) {
686734 makeVariableStr (PASSWORD_SECRET_ID , t ) +
687735 makeVariableStr (NEW_PASSWORD_SECRET_ID , t ) +
688736 makeVariableStr (SUBSCRIPTION_ID , t ) +
689- makeVariableStr (CLUSTER_PLACEMENT_GROUP_ID , t )
737+ makeVariableStr (CLUSTER_PLACEMENT_GROUP_ID , t ) +
738+ makeVariableStr (STREAM_POOL_ID , t ) +
739+ makeVariableStr (STREAMING_USERNAME , t ) +
740+ makeVariableStr (CLUSTER_ID , t ) +
741+ makeVariableStr (USER_ID , t )
690742
691743 var createResourcesConfig , dataSourceConfig , listDataSourceConfig , updateResourcesConfig string
692744 // CREATE CHECK FUNCTION MAPS
0 commit comments