oci_database_migration_connection

This resource provides the Connection resource in Oracle Cloud Infrastructure Database Migration service.

Create a Database Connection resource that contains the details to connect to either a Source or Target Database in the migration.

Example Usage

resource "oci_database_migration_connection" "test_connection" {
    #Required
    admin_credentials {
        #Required
        password = var.connection_admin_credentials_password
        username = var.connection_admin_credentials_username
    }
    compartment_id = var.compartment_id
    database_type = var.connection_database_type
    vault_details {
        #Required
        compartment_id = var.compartment_id
        key_id = oci_kms_key.test_key.id
        vault_id = oci_kms_vault.test_vault.id
    }

    #Optional
    certificate_tdn = var.connection_certificate_tdn
    connect_descriptor {

        #Optional
        connect_string = var.connection_connect_descriptor_connect_string
        database_service_name = oci_core_service.test_service.name
        host = var.connection_connect_descriptor_host
        port = var.connection_connect_descriptor_port
    }
    database_id = oci_database_database.test_database.id
    defined_tags = {"foo-namespace.bar-key"= "value"}
    display_name = var.connection_display_name
    freeform_tags = {"bar-key"= "value"}
    nsg_ids = var.connection_nsg_ids
    private_endpoint {
        #Required
        compartment_id = var.compartment_id
        subnet_id = oci_core_subnet.test_subnet.id
        vcn_id = oci_core_vcn.test_vcn.id
    }
    replication_credentials {
        #Required
        password = var.connection_replication_credentials_password
        username = var.connection_replication_credentials_username
    }
    ssh_details {
        #Required
        host = var.connection_ssh_details_host
        sshkey = var.connection_ssh_details_sshkey
        user = var.connection_ssh_details_user

        #Optional
        sudo_location = var.connection_ssh_details_sudo_location
    }
    tls_keystore = var.connection_tls_keystore
    tls_wallet = var.connection_tls_wallet
}

Argument Reference

The following arguments are supported:

* IMPORTANT * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Connection * update - (Defaults to 20 minutes), when updating the Connection * delete - (Defaults to 20 minutes), when destroying the Connection

Import

Connections can be imported using the id, e.g.

$ terraform import oci_database_migration_connection.test_connection "id"