cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

What's the recommended way to use secrets within Global init scripts?

Anonymous
Not applicable
 
4 REPLIES 4

User16826994223
Honored Contributor III

The order of execution of init scripts is:

  1. Legacy global (deprecated)
  2. Cluster-named (deprecated)
  3. Global (new)
  4. Cluster-scoped

Arfrenece link that can help is - https://docs.databricks.com/clusters/init-scripts.html#global-init-scripts

sajith_appukutt
Honored Contributor II

You could specify a secret path in an environment at the cluster level

SPARKPASSWORD=<path-value>

and this would be available in global init scripts / cluster-scoped init script

if [[ $SPARKPASSWORD ]]; then
  use $SPARKPASSWORD
fi

sstrong99
New Contributor II

I also have this question, and I don't understand the answer from @Sajith Appukuttanโ€‹ . This solution would require configuring each new cluster separately with the correct environment variable, correct? That seems like it defeats the purpose of using a global init script. Is there a method that does not require configuration of each new cluster separately?

peta
New Contributor II

Hello everyone,

How did you solve this issue? Did you manage to get the secrets through global init script?

Thanks.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group