Remove a key from the credential snapshot's child env. Used when a sandbox-side service (e.g., metadata server) fails to start and the corresponding env var should not be inherited by child processes or SSH sessions.
(&self, key: &str)
| 85 | /// and the corresponding env var should not be inherited by child processes |
| 86 | /// or SSH sessions. |
| 87 | pub fn remove_env_key(&self, key: &str) { |
| 88 | let mut inner = self |
| 89 | .inner |
| 90 | .write() |
| 91 | .expect("provider credential state poisoned"); |
| 92 | inner.suppressed_keys.insert(key.to_string()); |
| 93 | let mut env = (*inner.current).clone(); |
| 94 | env.child_env.remove(key); |
| 95 | inner.current = Arc::new(env); |
| 96 | } |
| 97 | |
| 98 | /// Return `child_env` with GCP static config vars resolved to real values. |
| 99 | /// |