# Is it possible to dynamically interact with drone secrets?

**URL:** <https://drone.discourse.group/t/is-it-possible-to-dynamically-interact-with-drone-secrets/8799>\
**Category:** Drone Support\
**Created:** [August 4, 2021, 3:42pm UTC](https://drone.discourse.group/t/is-it-possible-to-dynamically-interact-with-drone-secrets/8799 "2021-08-04T15:42:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukasm](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/lukasm/32/6330_2.png) [@lukasm](https://drone.discourse.group/u/lukasm)\
**Post date:** [August 4, 2021, 3:42pm UTC](https://drone.discourse.group/t/is-it-possible-to-dynamically-interact-with-drone-secrets/8799/1 "2021-08-04T15:42:10Z")

</div>

My code contains a list of secret variable names, which can be changed by developers. During build stage, I would like to iterate through those variables and for each one retrieve a secret from drone. Is this possible? If not, what is the alternative?

Say I have:

**secrets.conf.dist**

> DB\_PASS  
> SECRET\_URL

**buildsecrets.sh** iterated through lines above, and for each variable name retrieves secret from drone. Then creates **secrets.conf**

> DB\_PASS = irj843utw84utwo8eut  
> SECRET\_URL = [https://droneciisawesome.com/irj89w3ue4t34](https://droneciisawesome.com/irj89w3ue4t34)

Can this be done?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [August 4, 2021, 5:59pm UTC](https://drone.discourse.group/t/is-it-possible-to-dynamically-interact-with-drone-secrets/8799/2 "2021-08-04T17:59:57Z")

</div>

this is not possible. the only way to inject secrets into a pipeline and make available to your pipeline steps is through yaml configuration, as shown in the docs at [https://docs.drone.io/secret/repository/](https://docs.drone.io/secret/repository/)
