published on Friday, Feb 20, 2026 by Pulumi
published on Friday, Feb 20, 2026 by Pulumi
Action Modules are reusable code packages that can be shared across multiple actions. They allow you to write common functionality once and use it in any action that needs it.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as auth0 from "@pulumi/auth0";
const myModule = new auth0.ActionModule("my_module", {
name: "My Shared Module",
code: `/**
* A shared utility function that can be used across multiple actions.
*/
module.exports = {
greet: function(name) {
return \\"Hello, \\" + name + \\"!\\";
},
formatDate: function(date) {
return date.toISOString();
}
};
`,
dependencies: [{
name: "lodash",
version: "4.17.21",
}],
secrets: [{
name: "API_KEY",
value: "my-secret-api-key",
}],
});
import pulumi
import pulumi_auth0 as auth0
my_module = auth0.ActionModule("my_module",
name="My Shared Module",
code="""/**
* A shared utility function that can be used across multiple actions.
*/
module.exports = {
greet: function(name) {
return \"Hello, \" + name + \"!\";
},
formatDate: function(date) {
return date.toISOString();
}
};
""",
dependencies=[{
"name": "lodash",
"version": "4.17.21",
}],
secrets=[{
"name": "API_KEY",
"value": "my-secret-api-key",
}])
package main
import (
"github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := auth0.NewActionModule(ctx, "my_module", &auth0.ActionModuleArgs{
Name: pulumi.String("My Shared Module"),
Code: pulumi.String(`/**
* A shared utility function that can be used across multiple actions.
*/
module.exports = {
greet: function(name) {
return \"Hello, \" + name + \"!\";
},
formatDate: function(date) {
return date.toISOString();
}
};
`),
Dependencies: auth0.ActionModuleDependencyArray{
&auth0.ActionModuleDependencyArgs{
Name: pulumi.String("lodash"),
Version: pulumi.String("4.17.21"),
},
},
Secrets: auth0.ActionModuleSecretArray{
&auth0.ActionModuleSecretArgs{
Name: pulumi.String("API_KEY"),
Value: pulumi.String("my-secret-api-key"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Auth0 = Pulumi.Auth0;
return await Deployment.RunAsync(() =>
{
var myModule = new Auth0.ActionModule("my_module", new()
{
Name = "My Shared Module",
Code = @"/**
* A shared utility function that can be used across multiple actions.
*/
module.exports = {
greet: function(name) {
return \""Hello, \"" + name + \""!\"";
},
formatDate: function(date) {
return date.toISOString();
}
};
",
Dependencies = new[]
{
new Auth0.Inputs.ActionModuleDependencyArgs
{
Name = "lodash",
Version = "4.17.21",
},
},
Secrets = new[]
{
new Auth0.Inputs.ActionModuleSecretArgs
{
Name = "API_KEY",
Value = "my-secret-api-key",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.auth0.ActionModule;
import com.pulumi.auth0.ActionModuleArgs;
import com.pulumi.auth0.inputs.ActionModuleDependencyArgs;
import com.pulumi.auth0.inputs.ActionModuleSecretArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var myModule = new ActionModule("myModule", ActionModuleArgs.builder()
.name("My Shared Module")
.code("""
/**
* A shared utility function that can be used across multiple actions.
*/
module.exports = {
greet: function(name) {
return \"Hello, \" + name + \"!\";
},
formatDate: function(date) {
return date.toISOString();
}
};
""")
.dependencies(ActionModuleDependencyArgs.builder()
.name("lodash")
.version("4.17.21")
.build())
.secrets(ActionModuleSecretArgs.builder()
.name("API_KEY")
.value("my-secret-api-key")
.build())
.build());
}
}
resources:
myModule:
type: auth0:ActionModule
name: my_module
properties:
name: My Shared Module
code: |
/**
* A shared utility function that can be used across multiple actions.
*/
module.exports = {
greet: function(name) {
return \"Hello, \" + name + \"!\";
},
formatDate: function(date) {
return date.toISOString();
}
};
dependencies:
- name: lodash
version: 4.17.21
secrets:
- name: API_KEY
value: my-secret-api-key
Create ActionModule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ActionModule(name: string, args: ActionModuleArgs, opts?: CustomResourceOptions);@overload
def ActionModule(resource_name: str,
args: ActionModuleInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ActionModule(resource_name: str,
opts: Optional[ResourceOptions] = None,
code: Optional[str] = None,
dependencies: Optional[Sequence[ActionModuleDependencyArgs]] = None,
name: Optional[str] = None,
publish: Optional[bool] = None,
secrets: Optional[Sequence[ActionModuleSecretArgs]] = None)func NewActionModule(ctx *Context, name string, args ActionModuleArgs, opts ...ResourceOption) (*ActionModule, error)public ActionModule(string name, ActionModuleArgs args, CustomResourceOptions? opts = null)
public ActionModule(String name, ActionModuleArgs args)
public ActionModule(String name, ActionModuleArgs args, CustomResourceOptions options)
type: auth0:ActionModule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ActionModuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ActionModuleInitArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ActionModuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ActionModuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ActionModuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var actionModuleResource = new Auth0.ActionModule("actionModuleResource", new()
{
Code = "string",
Dependencies = new[]
{
new Auth0.Inputs.ActionModuleDependencyArgs
{
Name = "string",
Version = "string",
},
},
Name = "string",
Publish = false,
Secrets = new[]
{
new Auth0.Inputs.ActionModuleSecretArgs
{
Name = "string",
UpdatedAt = "string",
Value = "string",
},
},
});
example, err := auth0.NewActionModule(ctx, "actionModuleResource", &auth0.ActionModuleArgs{
Code: pulumi.String("string"),
Dependencies: auth0.ActionModuleDependencyArray{
&auth0.ActionModuleDependencyArgs{
Name: pulumi.String("string"),
Version: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
Publish: pulumi.Bool(false),
Secrets: auth0.ActionModuleSecretArray{
&auth0.ActionModuleSecretArgs{
Name: pulumi.String("string"),
UpdatedAt: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var actionModuleResource = new ActionModule("actionModuleResource", ActionModuleArgs.builder()
.code("string")
.dependencies(ActionModuleDependencyArgs.builder()
.name("string")
.version("string")
.build())
.name("string")
.publish(false)
.secrets(ActionModuleSecretArgs.builder()
.name("string")
.updatedAt("string")
.value("string")
.build())
.build());
action_module_resource = auth0.ActionModule("actionModuleResource",
code="string",
dependencies=[{
"name": "string",
"version": "string",
}],
name="string",
publish=False,
secrets=[{
"name": "string",
"updated_at": "string",
"value": "string",
}])
const actionModuleResource = new auth0.ActionModule("actionModuleResource", {
code: "string",
dependencies: [{
name: "string",
version: "string",
}],
name: "string",
publish: false,
secrets: [{
name: "string",
updatedAt: "string",
value: "string",
}],
});
type: auth0:ActionModule
properties:
code: string
dependencies:
- name: string
version: string
name: string
publish: false
secrets:
- name: string
updatedAt: string
value: string
ActionModule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ActionModule resource accepts the following input properties:
- Code string
- The source code of the action module.
- Dependencies
List<Action
Module Dependency> - List of third party npm modules, and their versions, that this action module depends on.
- Name string
- The name of the action module.
- Publish bool
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- Secrets
List<Action
Module Secret> - List of secrets that are included in the action module. Partial management of secrets is not supported.
- Code string
- The source code of the action module.
- Dependencies
[]Action
Module Dependency Args - List of third party npm modules, and their versions, that this action module depends on.
- Name string
- The name of the action module.
- Publish bool
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- Secrets
[]Action
Module Secret Args - List of secrets that are included in the action module. Partial management of secrets is not supported.
- code String
- The source code of the action module.
- dependencies
List<Action
Module Dependency> - List of third party npm modules, and their versions, that this action module depends on.
- name String
- The name of the action module.
- publish Boolean
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- secrets
List<Action
Module Secret> - List of secrets that are included in the action module. Partial management of secrets is not supported.
- code string
- The source code of the action module.
- dependencies
Action
Module Dependency[] - List of third party npm modules, and their versions, that this action module depends on.
- name string
- The name of the action module.
- publish boolean
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- secrets
Action
Module Secret[] - List of secrets that are included in the action module. Partial management of secrets is not supported.
- code str
- The source code of the action module.
- dependencies
Sequence[Action
Module Dependency Args] - List of third party npm modules, and their versions, that this action module depends on.
- name str
- The name of the action module.
- publish bool
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- secrets
Sequence[Action
Module Secret Args] - List of secrets that are included in the action module. Partial management of secrets is not supported.
- code String
- The source code of the action module.
- dependencies List<Property Map>
- List of third party npm modules, and their versions, that this action module depends on.
- name String
- The name of the action module.
- publish Boolean
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- secrets List<Property Map>
- List of secrets that are included in the action module. Partial management of secrets is not supported.
Outputs
All input properties are implicitly available as output properties. Additionally, the ActionModule resource produces the following output properties:
- Actions
Using intModule Total - The number of deployed actions using this module.
- All
Changes boolPublished - Whether all draft changes have been published as a version.
- Id string
- The provider-assigned unique ID for this managed resource.
- Latest
Version intNumber - The version number of the latest published version.
- Latest
Versions List<ActionModule Latest Version> - The latest published version of the action module.
- Version
Id string - Version ID of the module. This value is available if
publishis set to true.
- Actions
Using intModule Total - The number of deployed actions using this module.
- All
Changes boolPublished - Whether all draft changes have been published as a version.
- Id string
- The provider-assigned unique ID for this managed resource.
- Latest
Version intNumber - The version number of the latest published version.
- Latest
Versions []ActionModule Latest Version - The latest published version of the action module.
- Version
Id string - Version ID of the module. This value is available if
publishis set to true.
- actions
Using IntegerModule Total - The number of deployed actions using this module.
- all
Changes BooleanPublished - Whether all draft changes have been published as a version.
- id String
- The provider-assigned unique ID for this managed resource.
- latest
Version IntegerNumber - The version number of the latest published version.
- latest
Versions List<ActionModule Latest Version> - The latest published version of the action module.
- version
Id String - Version ID of the module. This value is available if
publishis set to true.
- actions
Using numberModule Total - The number of deployed actions using this module.
- all
Changes booleanPublished - Whether all draft changes have been published as a version.
- id string
- The provider-assigned unique ID for this managed resource.
- latest
Version numberNumber - The version number of the latest published version.
- latest
Versions ActionModule Latest Version[] - The latest published version of the action module.
- version
Id string - Version ID of the module. This value is available if
publishis set to true.
- actions_
using_ intmodule_ total - The number of deployed actions using this module.
- all_
changes_ boolpublished - Whether all draft changes have been published as a version.
- id str
- The provider-assigned unique ID for this managed resource.
- latest_
version_ intnumber - The version number of the latest published version.
- latest_
versions Sequence[ActionModule Latest Version] - The latest published version of the action module.
- version_
id str - Version ID of the module. This value is available if
publishis set to true.
- actions
Using NumberModule Total - The number of deployed actions using this module.
- all
Changes BooleanPublished - Whether all draft changes have been published as a version.
- id String
- The provider-assigned unique ID for this managed resource.
- latest
Version NumberNumber - The version number of the latest published version.
- latest
Versions List<Property Map> - The latest published version of the action module.
- version
Id String - Version ID of the module. This value is available if
publishis set to true.
Look up Existing ActionModule Resource
Get an existing ActionModule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ActionModuleState, opts?: CustomResourceOptions): ActionModule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actions_using_module_total: Optional[int] = None,
all_changes_published: Optional[bool] = None,
code: Optional[str] = None,
dependencies: Optional[Sequence[ActionModuleDependencyArgs]] = None,
latest_version_number: Optional[int] = None,
latest_versions: Optional[Sequence[ActionModuleLatestVersionArgs]] = None,
name: Optional[str] = None,
publish: Optional[bool] = None,
secrets: Optional[Sequence[ActionModuleSecretArgs]] = None,
version_id: Optional[str] = None) -> ActionModulefunc GetActionModule(ctx *Context, name string, id IDInput, state *ActionModuleState, opts ...ResourceOption) (*ActionModule, error)public static ActionModule Get(string name, Input<string> id, ActionModuleState? state, CustomResourceOptions? opts = null)public static ActionModule get(String name, Output<String> id, ActionModuleState state, CustomResourceOptions options)resources: _: type: auth0:ActionModule get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Actions
Using intModule Total - The number of deployed actions using this module.
- All
Changes boolPublished - Whether all draft changes have been published as a version.
- Code string
- The source code of the action module.
- Dependencies
List<Action
Module Dependency> - List of third party npm modules, and their versions, that this action module depends on.
- Latest
Version intNumber - The version number of the latest published version.
- Latest
Versions List<ActionModule Latest Version> - The latest published version of the action module.
- Name string
- The name of the action module.
- Publish bool
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- Secrets
List<Action
Module Secret> - List of secrets that are included in the action module. Partial management of secrets is not supported.
- Version
Id string - Version ID of the module. This value is available if
publishis set to true.
- Actions
Using intModule Total - The number of deployed actions using this module.
- All
Changes boolPublished - Whether all draft changes have been published as a version.
- Code string
- The source code of the action module.
- Dependencies
[]Action
Module Dependency Args - List of third party npm modules, and their versions, that this action module depends on.
- Latest
Version intNumber - The version number of the latest published version.
- Latest
Versions []ActionModule Latest Version Args - The latest published version of the action module.
- Name string
- The name of the action module.
- Publish bool
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- Secrets
[]Action
Module Secret Args - List of secrets that are included in the action module. Partial management of secrets is not supported.
- Version
Id string - Version ID of the module. This value is available if
publishis set to true.
- actions
Using IntegerModule Total - The number of deployed actions using this module.
- all
Changes BooleanPublished - Whether all draft changes have been published as a version.
- code String
- The source code of the action module.
- dependencies
List<Action
Module Dependency> - List of third party npm modules, and their versions, that this action module depends on.
- latest
Version IntegerNumber - The version number of the latest published version.
- latest
Versions List<ActionModule Latest Version> - The latest published version of the action module.
- name String
- The name of the action module.
- publish Boolean
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- secrets
List<Action
Module Secret> - List of secrets that are included in the action module. Partial management of secrets is not supported.
- version
Id String - Version ID of the module. This value is available if
publishis set to true.
- actions
Using numberModule Total - The number of deployed actions using this module.
- all
Changes booleanPublished - Whether all draft changes have been published as a version.
- code string
- The source code of the action module.
- dependencies
Action
Module Dependency[] - List of third party npm modules, and their versions, that this action module depends on.
- latest
Version numberNumber - The version number of the latest published version.
- latest
Versions ActionModule Latest Version[] - The latest published version of the action module.
- name string
- The name of the action module.
- publish boolean
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- secrets
Action
Module Secret[] - List of secrets that are included in the action module. Partial management of secrets is not supported.
- version
Id string - Version ID of the module. This value is available if
publishis set to true.
- actions_
using_ intmodule_ total - The number of deployed actions using this module.
- all_
changes_ boolpublished - Whether all draft changes have been published as a version.
- code str
- The source code of the action module.
- dependencies
Sequence[Action
Module Dependency Args] - List of third party npm modules, and their versions, that this action module depends on.
- latest_
version_ intnumber - The version number of the latest published version.
- latest_
versions Sequence[ActionModule Latest Version Args] - The latest published version of the action module.
- name str
- The name of the action module.
- publish bool
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- secrets
Sequence[Action
Module Secret Args] - List of secrets that are included in the action module. Partial management of secrets is not supported.
- version_
id str - Version ID of the module. This value is available if
publishis set to true.
- actions
Using NumberModule Total - The number of deployed actions using this module.
- all
Changes BooleanPublished - Whether all draft changes have been published as a version.
- code String
- The source code of the action module.
- dependencies List<Property Map>
- List of third party npm modules, and their versions, that this action module depends on.
- latest
Version NumberNumber - The version number of the latest published version.
- latest
Versions List<Property Map> - The latest published version of the action module.
- name String
- The name of the action module.
- publish Boolean
- Publishing a module will create a new immutable version of the module from the current draft. Actions using this module can then reference the published version.
- secrets List<Property Map>
- List of secrets that are included in the action module. Partial management of secrets is not supported.
- version
Id String - Version ID of the module. This value is available if
publishis set to true.
Supporting Types
ActionModuleDependency, ActionModuleDependencyArgs
ActionModuleLatestVersion, ActionModuleLatestVersionArgs
- Code string
- The source code of this version.
- Created
At string - The time when this version was created.
- Dependencies
List<Action
Module Latest Version Dependency> - List of third party npm modules, and their versions, that this version depends on.
- Id string
- The unique identifier of the version.
- Secrets
List<Action
Module Latest Version Secret> - List of secrets that are included in this version.
- Version
Number int - The version number.
- Code string
- The source code of this version.
- Created
At string - The time when this version was created.
- Dependencies
[]Action
Module Latest Version Dependency - List of third party npm modules, and their versions, that this version depends on.
- Id string
- The unique identifier of the version.
- Secrets
[]Action
Module Latest Version Secret - List of secrets that are included in this version.
- Version
Number int - The version number.
- code String
- The source code of this version.
- created
At String - The time when this version was created.
- dependencies
List<Action
Module Latest Version Dependency> - List of third party npm modules, and their versions, that this version depends on.
- id String
- The unique identifier of the version.
- secrets
List<Action
Module Latest Version Secret> - List of secrets that are included in this version.
- version
Number Integer - The version number.
- code string
- The source code of this version.
- created
At string - The time when this version was created.
- dependencies
Action
Module Latest Version Dependency[] - List of third party npm modules, and their versions, that this version depends on.
- id string
- The unique identifier of the version.
- secrets
Action
Module Latest Version Secret[] - List of secrets that are included in this version.
- version
Number number - The version number.
- code str
- The source code of this version.
- created_
at str - The time when this version was created.
- dependencies
Sequence[Action
Module Latest Version Dependency] - List of third party npm modules, and their versions, that this version depends on.
- id str
- The unique identifier of the version.
- secrets
Sequence[Action
Module Latest Version Secret] - List of secrets that are included in this version.
- version_
number int - The version number.
- code String
- The source code of this version.
- created
At String - The time when this version was created.
- dependencies List<Property Map>
- List of third party npm modules, and their versions, that this version depends on.
- id String
- The unique identifier of the version.
- secrets List<Property Map>
- List of secrets that are included in this version.
- version
Number Number - The version number.
ActionModuleLatestVersionDependency, ActionModuleLatestVersionDependencyArgs
ActionModuleLatestVersionSecret, ActionModuleLatestVersionSecretArgs
- name str
- Secret name.
- updated_
at str - The time when this secret was last updated.
ActionModuleSecret, ActionModuleSecretArgs
- name str
- Secret name. Required when configuring secrets
- updated_
at str - Last update time
- value str
- Secret value. Required when configuring secrets
Package Details
- Repository
- Auth0 pulumi/pulumi-auth0
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
auth0Terraform Provider.
published on Friday, Feb 20, 2026 by Pulumi
