Skip to content

Commit

Permalink
Deprecate connection strings for IBM-cloud-databases (#4050)
Browse files Browse the repository at this point in the history
* Add deprecated fields
* Update docs
* Add deprecate message in resource as well
* Updated readme docs

Co-authored-by: Lorna-Kelly <lorna.kelly@ibm.com>
  • Loading branch information
2 people authored and hkantare committed Oct 3, 2022
1 parent fac1928 commit fc19770
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions ibm/service/database/data_source_ibm_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ func DataSourceIBMDatabaseInstance() *schema.Resource {
},
},
},
Deprecated: "This field is deprecated, please use ibm_database_connection instead",
},
"whitelist": {
Type: schema.TypeSet,
Expand Down
1 change: 1 addition & 0 deletions ibm/service/database/resource_ibm_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ func ResourceIBMDatabaseInstance() *schema.Resource {
},
},
},
Deprecated: "This field is deprecated, please use ibm_database_connection instead",
},
"whitelist": {
Type: schema.TypeSet,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions website/docs/r/database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ resource "ibm_database" "<your_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}"
}
```
Expand Down Expand Up @@ -99,7 +99,7 @@ resource "ibm_database" "<your_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}"
}
```
Expand Down Expand Up @@ -150,7 +150,7 @@ resource "ibm_database" "<your_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}"
}
```
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit fc19770

Please sign in to comment.