esc
Esc functions for pulumiConfig and opening environment for env vars (OIDC)
Installation
dagger install github.com/jpadams/pulumi-esc-dagger-module@1d3ed2464ed19673a982eeed81e79ab42f437ec4
Entrypoint
Return Type
Esc
Example
dagger -m github.com/jpadams/pulumi-esc-dagger-module@1d3ed2464ed19673a982eeed81e79ab42f437ec4 call \
func (m *myModule) example() *Esc {
return dag.
Esc()
}
@function
def example() -> dag.Esc:
return (
dag.esc()
)
@func()
example(): Esc {
return dag
.esc()
}
Types
Esc 🔗
withToken() 🔗
Set Pulumi token
Return Type
Esc !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | Secret ! | - | No description provided |
Example
dagger -m github.com/jpadams/pulumi-esc-dagger-module@1d3ed2464ed19673a982eeed81e79ab42f437ec4 call \
with-token --token env:MYSECRET
func (m *myModule) example(token *Secret) *Esc {
return dag.
Esc().
WithToken(token)
}
@function
def example(token: dagger.Secret) -> dag.Esc:
return (
dag.esc()
.with_token(token)
)
@func()
example(token: Secret): Esc {
return dag
.esc()
.withToken(token)
}
withEnv() 🔗
Set Pulumi environment
Return Type
Esc !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
env | String ! | - | No description provided |
Example
dagger -m github.com/jpadams/pulumi-esc-dagger-module@1d3ed2464ed19673a982eeed81e79ab42f437ec4 call \
with-env --env string
func (m *myModule) example(env string) *Esc {
return dag.
Esc().
WithEnv(env)
}
@function
def example(env: str) -> dag.Esc:
return (
dag.esc()
.with_env(env)
)
@func()
example(env: string): Esc {
return dag
.esc()
.withEnv(env)
}
getConfig() 🔗
Get Pulumi ESC values from pulumiConfig object
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
Example
dagger -m github.com/jpadams/pulumi-esc-dagger-module@1d3ed2464ed19673a982eeed81e79ab42f437ec4 call \
get-config --name string
func (m *myModule) example(ctx context.Context, name string) string {
return dag.
Esc().
GetConfig(ctx, name)
}
@function
async def example(name: str) -> str:
return await (
dag.esc()
.get_config(name)
)
@func()
async example(name: string): Promise<string> {
return dag
.esc()
.getConfig(name)
}
setConfig() 🔗
Set Pulumi ESC name/value pairs on the pulumiConfig object
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
value | String ! | - | No description provided |
Example
dagger -m github.com/jpadams/pulumi-esc-dagger-module@1d3ed2464ed19673a982eeed81e79ab42f437ec4 call \
set-config --name string --value string
func (m *myModule) example(ctx context.Context, name string, value string) {
return dag.
Esc().
SetConfig(ctx, name, value)
}
@function
async def example(name: str, value: str) -> None:
return await (
dag.esc()
.set_config(name, value)
)
@func()
async example(name: string, value: string): Promise<void> {
return dag
.esc()
.setConfig(name, value)
}
open() 🔗
Open the Pulum ESC environment to access env vars
Return Type
Esc !
Example
dagger -m github.com/jpadams/pulumi-esc-dagger-module@1d3ed2464ed19673a982eeed81e79ab42f437ec4 call \
open
func (m *myModule) example() *Esc {
return dag.
Esc().
Open()
}
@function
def example() -> dag.Esc:
return (
dag.esc()
.open()
)
@func()
example(): Esc {
return dag
.esc()
.open()
}
getSecretEnvVar() 🔗
Get env vars from opened Pulumi ESC environment as Secrets
Return Type
Secret !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
Example
dagger -m github.com/jpadams/pulumi-esc-dagger-module@1d3ed2464ed19673a982eeed81e79ab42f437ec4 call \
get-secret-env-var --name string
func (m *myModule) example(name string) *Secret {
return dag.
Esc().
GetSecretEnvVar(name)
}
@function
def example(name: str) -> dagger.Secret:
return (
dag.esc()
.get_secret_env_var(name)
)
@func()
example(name: string): Secret {
return dag
.esc()
.getSecretEnvVar(name)
}