diff --git a/ibm/service/database/data_source_ibm_database.go b/ibm/service/database/data_source_ibm_database.go index 86ef1e99b7..42263b8f75 100644 --- a/ibm/service/database/data_source_ibm_database.go +++ b/ibm/service/database/data_source_ibm_database.go @@ -239,6 +239,7 @@ func DataSourceIBMDatabaseInstance() *schema.Resource { }, }, }, + Deprecated: "This field is deprecated, please use ibm_database_connection instead", }, "whitelist": { Type: schema.TypeSet, diff --git a/ibm/service/database/resource_ibm_database.go b/ibm/service/database/resource_ibm_database.go index 1df4dd2766..91c3bc41b5 100644 --- a/ibm/service/database/resource_ibm_database.go +++ b/ibm/service/database/resource_ibm_database.go @@ -445,6 +445,7 @@ func ResourceIBMDatabaseInstance() *schema.Resource { }, }, }, + Deprecated: "This field is deprecated, please use ibm_database_connection instead", }, "whitelist": { Type: schema.TypeSet, diff --git a/website/docs/d/database.html.markdown b/website/docs/d/database.html.markdown index 21ae0f184f..aa0e71f38b 100644 --- a/website/docs/d/database.html.markdown +++ b/website/docs/d/database.html.markdown @@ -36,7 +36,7 @@ In addition to all argument references list, you can access the following attrib - `adminuser` - (String) The user ID of the default administration user for the database, such as `admin` or `root`. - `cert_file_path` - (String) The absolute path to certificate PEM file. -- `connectionstrings` (List) List of connection strings by userid for the database. For information about how to use connection strings, see the [documentation](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-connection-strings). The results are returned in pairs of the userid and string: `connectionstrings.1.name = admin connectionstrings.1.string = postgres://admin:$PASSWORD@12345aa1-1111-1111-a1aa-a1aaa11aa1a1.a1a1a111a1a11a1a111a111a1a111a111.databases.appdomain.cloud:32554/ibmclouddb?sslmode=verify-full`. +- `connectionstrings` - **Deprecated** - (List) List of connection strings by userid for the database - replaced by `bm_database_connection` For information about how to use connection strings, see the [documentation](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-connection-strings). The results are returned in pairs of the userid and string: `connectionstrings.1.name = admin connectionstrings.1.string = postgres://admin:$PASSWORD@12345aa1-1111-1111-a1aa-a1aaa11aa1a1.a1a1a111a1a11a1a111a111a1a111a111.databases.appdomain.cloud:32554/ibmclouddb?sslmode=verify-full`. - `configuration_schema` (String) Database Configuration Schema in JSON format. - `id` - (String) The CRN of the IBM Cloud Databases instance. - `guid` - (String) The unique identifier of the IBM Cloud Databases instance. diff --git a/website/docs/r/database.html.markdown b/website/docs/r/database.html.markdown index 8b52811ab0..df23817e9d 100644 --- a/website/docs/r/database.html.markdown +++ b/website/docs/r/database.html.markdown @@ -61,7 +61,7 @@ resource "ibm_database" "" { } output "ICD Etcd database connection string" { - value = "http://${ibm_database.test_acc.connectionstrings[0].composed}" + value = "http://${ibm_database.test_acc.ibm_database_connection.icd_conn}" } ``` @@ -99,7 +99,7 @@ resource "ibm_database" "" { } output "ICD Etcd database connection string" { - value = "http://${ibm_database.test_acc.connectionstrings[0].composed}" + value = "http://${ibm_database.test_acc.ibm_database_connection.icd_conn}" } ``` @@ -150,7 +150,7 @@ resource "ibm_database" "" { } output "ICD Etcd database connection string" { - value = "http://${ibm_database.test_acc.connectionstrings[0].composed}" + value = "http://${ibm_database.test_acc.ibm_database_connection.icd_conn}" } ``` @@ -611,7 +611,7 @@ In addition to all argument references list, you can access the following attrib - `adminuser` - (String) The user ID of the database administrator. Example, `admin` or `root`. - `configuration_schema` (String) Database Configuration Schema in JSON format. -- `connectionstrings` - (Array) A list of connection strings for the database for each user ID. For more information, about how to use connection strings, see the [documentation](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-connection-strings). The results are returned in pairs of the userid and string: `connectionstrings.1.name = admin connectionstrings.1.string = postgres://admin:$PASSWORD@79226bd4-4076-4873-b5ce-b1dba48ff8c4.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:32554/ibmclouddb?sslmode=verify-full` Individual string parameters can be retrieved by using Terraform variables and outputs `connectionstrings.x.hosts.x.port` and `connectionstrings.x.hosts.x.host`. +- `connectionstrings` - **Deprecated** - (Array) A list of connection strings for the database for each user ID - replaced by `bm_database_connection`. For more information, about how to use connection strings, see the [documentation](https://cloud.ibm.com/docs/databases-for-postgresql?topic=databases-for-postgresql-connection-strings). The results are returned in pairs of the userid and string: `connectionstrings.1.name = admin connectionstrings.1.string = postgres://admin:$PASSWORD@79226bd4-4076-4873-b5ce-b1dba48ff8c4.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:32554/ibmclouddb?sslmode=verify-full` Individual string parameters can be retrieved by using Terraform variables and outputs `connectionstrings.x.hosts.x.port` and `connectionstrings.x.hosts.x.host`. - `id` - (String) The CRN of the database instance. - `status` - (String) The status of the instance. - `version` - (String) The database version.