Skip to content

Commit 29ebaa9

Browse files
authored
Improve documentation about preloaded_docker_images.basic_auth in databricks_cluster and databricks_instance_pool resources (#5154)
## Changes <!-- Summary of your changes that are easy to understand --> We're supporting `{{secrets/scope/key}}` references for a long time already. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] relevant change in `docs/` folder - [x] has entry in `NEXT_CHANGELOG.md` file
1 parent e254b5a commit 29ebaa9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

NEXT_CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Documentation
1212

13+
* Improve documentation about `preloaded_docker_images.basic_auth` in `databricks_cluster` and `databricks_instance_pool` ([#5154](https://github.com/databricks/terraform-provider-databricks/pull/5154)).
14+
1315
### Exporter
1416

1517
### Internal Changes

docs/resources/cluster.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ The following options are available:
442442
`docker_image` configuration block has the following attributes:
443443

444444
* `url` - URL for the Docker image
445-
* `basic_auth` - (Optional) `basic_auth.username` and `basic_auth.password` for Docker repository. Docker registry credentials are encrypted when they are stored in Databricks internal storage and when they are passed to a registry upon fetching Docker images at cluster launch. However, other authenticated and authorized API users of this workspace can access the username and password.
445+
* `basic_auth` - (Optional) `basic_auth.username` and `basic_auth.password` for Docker repository. Docker registry credentials are encrypted when they are stored in Databricks internal storage and when they are passed to a registry upon fetching Docker images at cluster launch. For better security, these credentials should be stored in the secret scope and referred using secret path syntax: `{{secrets/scope/key}}`, otherwise other users of the workspace may access them via UI/API.
446446

447447
Example usage with [azurerm_container_registry](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_registry) and [docker_registry_image](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs/resources/registry_image), that you can adapt to your specific use-case:
448448

@@ -459,6 +459,7 @@ resource "databricks_cluster" "this" {
459459
docker_image {
460460
url = docker_registry_image.this.name
461461
basic_auth {
462+
# Best is to store them in a secret scope
462463
username = azurerm_container_registry.this.admin_username
463464
password = azurerm_container_registry.this.admin_password
464465
}

docs/resources/instance_pool.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ For disk_spec make sure to use **ebs_volume_type** only on AWS deployment of Dat
105105
`preloaded_docker_image` configuration block has the following attributes:
106106

107107
* `url` - URL for the Docker image
108-
* `basic_auth` - (Optional) `basic_auth.username` and `basic_auth.password` for Docker repository. Docker registry credentials are encrypted when they are stored in Databricks internal storage and when they are passed to a registry upon fetching Docker images at cluster launch. However, other authenticated and authorized API users of this workspace can access the username and password.
108+
* `basic_auth` - (Optional) `basic_auth.username` and `basic_auth.password` for Docker repository. Docker registry credentials are encrypted when they are stored in Databricks internal storage and when they are passed to a registry upon fetching Docker images at cluster launch. For better security, these credentials should be stored in the secret scope and referred using secret path syntax: `{{secrets/scope/key}}`, otherwise other users of the workspace may access them via UI/API.
109109

110110
Example usage with [azurerm_container_registry](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_registry) and [docker_registry_image](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs/resources/registry_image), that you can adapt to your specific use-case:
111111

@@ -122,6 +122,7 @@ resource "databricks_instance_pool" "this" {
122122
preloaded_docker_image {
123123
url = docker_registry_image.this.name
124124
basic_auth {
125+
# Best is to store them in a secret scope
125126
username = azurerm_container_registry.this.admin_username
126127
password = azurerm_container_registry.this.admin_password
127128
}

0 commit comments

Comments
 (0)