published on Thursday, Feb 26, 2026 by Pulumi
published on Thursday, Feb 26, 2026 by Pulumi
Manages an ACL Binding Rule in Nomad.
Warning: this resource will store the sensitive value placed in
config.oidc_client_secretin the Terraform’s state file. Take care to protect your state file.
Example Usage
Creating an ALC Binding Rule associated to an ACL Auth Method also created and managed by Terraform:
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const myNomadAclAuthMethod = new nomad.AclAuthMethod("my_nomad_acl_auth_method", {
name: "my-nomad-acl-auth-method",
type: "OIDC",
tokenLocality: "global",
maxTokenTtl: "10m0s",
"default": true,
config: {
oidcDiscoveryUrl: "https://uk.auth0.com/",
oidcClientId: "someclientid",
oidcClientSecret: "someclientsecret-t",
boundAudiences: ["someclientid"],
allowedRedirectUris: [
"http://localhost:4649/oidc/callback",
"http://localhost:4646/ui/settings/tokens",
],
listClaimMappings: {
"http://nomad.internal/roles": "roles",
},
},
});
const myNomadAclBindingRule = new nomad.AclBindingRule("my_nomad_acl_binding_rule", {
description: "engineering rule",
authMethod: myNomadAclAuthMethod.name,
selector: "engineering in list.roles",
bindType: "role",
bindName: "engineering-read-only",
});
import pulumi
import pulumi_nomad as nomad
my_nomad_acl_auth_method = nomad.AclAuthMethod("my_nomad_acl_auth_method",
name="my-nomad-acl-auth-method",
type="OIDC",
token_locality="global",
max_token_ttl="10m0s",
default=True,
config={
"oidc_discovery_url": "https://uk.auth0.com/",
"oidc_client_id": "someclientid",
"oidc_client_secret": "someclientsecret-t",
"bound_audiences": ["someclientid"],
"allowed_redirect_uris": [
"http://localhost:4649/oidc/callback",
"http://localhost:4646/ui/settings/tokens",
],
"list_claim_mappings": {
"http://nomad.internal/roles": "roles",
},
})
my_nomad_acl_binding_rule = nomad.AclBindingRule("my_nomad_acl_binding_rule",
description="engineering rule",
auth_method=my_nomad_acl_auth_method.name,
selector="engineering in list.roles",
bind_type="role",
bind_name="engineering-read-only")
package main
import (
"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myNomadAclAuthMethod, err := nomad.NewAclAuthMethod(ctx, "my_nomad_acl_auth_method", &nomad.AclAuthMethodArgs{
Name: pulumi.String("my-nomad-acl-auth-method"),
Type: pulumi.String("OIDC"),
TokenLocality: pulumi.String("global"),
MaxTokenTtl: pulumi.String("10m0s"),
Default: pulumi.Bool(true),
Config: &nomad.AclAuthMethodConfigArgs{
OidcDiscoveryUrl: pulumi.String("https://uk.auth0.com/"),
OidcClientId: pulumi.String("someclientid"),
OidcClientSecret: pulumi.String("someclientsecret-t"),
BoundAudiences: pulumi.StringArray{
pulumi.String("someclientid"),
},
AllowedRedirectUris: pulumi.StringArray{
pulumi.String("http://localhost:4649/oidc/callback"),
pulumi.String("http://localhost:4646/ui/settings/tokens"),
},
ListClaimMappings: pulumi.StringMap{
"http://nomad.internal/roles": pulumi.String("roles"),
},
},
})
if err != nil {
return err
}
_, err = nomad.NewAclBindingRule(ctx, "my_nomad_acl_binding_rule", &nomad.AclBindingRuleArgs{
Description: pulumi.String("engineering rule"),
AuthMethod: myNomadAclAuthMethod.Name,
Selector: pulumi.String("engineering in list.roles"),
BindType: pulumi.String("role"),
BindName: pulumi.String("engineering-read-only"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;
return await Deployment.RunAsync(() =>
{
var myNomadAclAuthMethod = new Nomad.AclAuthMethod("my_nomad_acl_auth_method", new()
{
Name = "my-nomad-acl-auth-method",
Type = "OIDC",
TokenLocality = "global",
MaxTokenTtl = "10m0s",
Default = true,
Config = new Nomad.Inputs.AclAuthMethodConfigArgs
{
OidcDiscoveryUrl = "https://uk.auth0.com/",
OidcClientId = "someclientid",
OidcClientSecret = "someclientsecret-t",
BoundAudiences = new[]
{
"someclientid",
},
AllowedRedirectUris = new[]
{
"http://localhost:4649/oidc/callback",
"http://localhost:4646/ui/settings/tokens",
},
ListClaimMappings =
{
{ "http://nomad.internal/roles", "roles" },
},
},
});
var myNomadAclBindingRule = new Nomad.AclBindingRule("my_nomad_acl_binding_rule", new()
{
Description = "engineering rule",
AuthMethod = myNomadAclAuthMethod.Name,
Selector = "engineering in list.roles",
BindType = "role",
BindName = "engineering-read-only",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.AclAuthMethod;
import com.pulumi.nomad.AclAuthMethodArgs;
import com.pulumi.nomad.inputs.AclAuthMethodConfigArgs;
import com.pulumi.nomad.AclBindingRule;
import com.pulumi.nomad.AclBindingRuleArgs;
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 myNomadAclAuthMethod = new AclAuthMethod("myNomadAclAuthMethod", AclAuthMethodArgs.builder()
.name("my-nomad-acl-auth-method")
.type("OIDC")
.tokenLocality("global")
.maxTokenTtl("10m0s")
.default_(true)
.config(AclAuthMethodConfigArgs.builder()
.oidcDiscoveryUrl("https://uk.auth0.com/")
.oidcClientId("someclientid")
.oidcClientSecret("someclientsecret-t")
.boundAudiences("someclientid")
.allowedRedirectUris(
"http://localhost:4649/oidc/callback",
"http://localhost:4646/ui/settings/tokens")
.listClaimMappings(Map.of("http://nomad.internal/roles", "roles"))
.build())
.build());
var myNomadAclBindingRule = new AclBindingRule("myNomadAclBindingRule", AclBindingRuleArgs.builder()
.description("engineering rule")
.authMethod(myNomadAclAuthMethod.name())
.selector("engineering in list.roles")
.bindType("role")
.bindName("engineering-read-only")
.build());
}
}
resources:
myNomadAclAuthMethod:
type: nomad:AclAuthMethod
name: my_nomad_acl_auth_method
properties:
name: my-nomad-acl-auth-method
type: OIDC
tokenLocality: global
maxTokenTtl: 10m0s
default: true
config:
oidcDiscoveryUrl: https://uk.auth0.com/
oidcClientId: someclientid
oidcClientSecret: someclientsecret-t
boundAudiences:
- someclientid
allowedRedirectUris:
- http://localhost:4649/oidc/callback
- http://localhost:4646/ui/settings/tokens
listClaimMappings:
http://nomad.internal/roles: roles
myNomadAclBindingRule:
type: nomad:AclBindingRule
name: my_nomad_acl_binding_rule
properties:
description: engineering rule
authMethod: ${myNomadAclAuthMethod.name}
selector: engineering in list.roles
bindType: role
bindName: engineering-read-only
Create AclBindingRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AclBindingRule(name: string, args: AclBindingRuleArgs, opts?: CustomResourceOptions);@overload
def AclBindingRule(resource_name: str,
args: AclBindingRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AclBindingRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
auth_method: Optional[str] = None,
bind_type: Optional[str] = None,
bind_name: Optional[str] = None,
description: Optional[str] = None,
selector: Optional[str] = None)func NewAclBindingRule(ctx *Context, name string, args AclBindingRuleArgs, opts ...ResourceOption) (*AclBindingRule, error)public AclBindingRule(string name, AclBindingRuleArgs args, CustomResourceOptions? opts = null)
public AclBindingRule(String name, AclBindingRuleArgs args)
public AclBindingRule(String name, AclBindingRuleArgs args, CustomResourceOptions options)
type: nomad:AclBindingRule
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 AclBindingRuleArgs
- 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 AclBindingRuleArgs
- 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 AclBindingRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AclBindingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AclBindingRuleArgs
- 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 aclBindingRuleResource = new Nomad.Index.AclBindingRule("aclBindingRuleResource", new()
{
AuthMethod = "string",
BindType = "string",
BindName = "string",
Description = "string",
Selector = "string",
});
example, err := nomad.NewAclBindingRule(ctx, "aclBindingRuleResource", &nomad.AclBindingRuleArgs{
AuthMethod: pulumi.String("string"),
BindType: pulumi.String("string"),
BindName: pulumi.String("string"),
Description: pulumi.String("string"),
Selector: pulumi.String("string"),
})
var aclBindingRuleResource = new AclBindingRule("aclBindingRuleResource", AclBindingRuleArgs.builder()
.authMethod("string")
.bindType("string")
.bindName("string")
.description("string")
.selector("string")
.build());
acl_binding_rule_resource = nomad.AclBindingRule("aclBindingRuleResource",
auth_method="string",
bind_type="string",
bind_name="string",
description="string",
selector="string")
const aclBindingRuleResource = new nomad.AclBindingRule("aclBindingRuleResource", {
authMethod: "string",
bindType: "string",
bindName: "string",
description: "string",
selector: "string",
});
type: nomad:AclBindingRule
properties:
authMethod: string
bindName: string
bindType: string
description: string
selector: string
AclBindingRule 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 AclBindingRule resource accepts the following input properties:
- Auth
Method string (string: <required>)- Name of the auth method for which this rule applies to.- Bind
Type string (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- Bind
Name string (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- Description string
(string: "")- Description for this ACL binding rule.- Selector string
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
- Auth
Method string (string: <required>)- Name of the auth method for which this rule applies to.- Bind
Type string (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- Bind
Name string (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- Description string
(string: "")- Description for this ACL binding rule.- Selector string
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
- auth
Method String (string: <required>)- Name of the auth method for which this rule applies to.- bind
Type String (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- bind
Name String (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- description String
(string: "")- Description for this ACL binding rule.- selector String
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
- auth
Method string (string: <required>)- Name of the auth method for which this rule applies to.- bind
Type string (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- bind
Name string (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- description string
(string: "")- Description for this ACL binding rule.- selector string
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
- auth_
method str (string: <required>)- Name of the auth method for which this rule applies to.- bind_
type str (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- bind_
name str (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- description str
(string: "")- Description for this ACL binding rule.- selector str
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
- auth
Method String (string: <required>)- Name of the auth method for which this rule applies to.- bind
Type String (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- bind
Name String (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- description String
(string: "")- Description for this ACL binding rule.- selector String
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
Outputs
All input properties are implicitly available as output properties. Additionally, the AclBindingRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AclBindingRule Resource
Get an existing AclBindingRule 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?: AclBindingRuleState, opts?: CustomResourceOptions): AclBindingRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auth_method: Optional[str] = None,
bind_name: Optional[str] = None,
bind_type: Optional[str] = None,
description: Optional[str] = None,
selector: Optional[str] = None) -> AclBindingRulefunc GetAclBindingRule(ctx *Context, name string, id IDInput, state *AclBindingRuleState, opts ...ResourceOption) (*AclBindingRule, error)public static AclBindingRule Get(string name, Input<string> id, AclBindingRuleState? state, CustomResourceOptions? opts = null)public static AclBindingRule get(String name, Output<String> id, AclBindingRuleState state, CustomResourceOptions options)resources: _: type: nomad:AclBindingRule 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.
- Auth
Method string (string: <required>)- Name of the auth method for which this rule applies to.- Bind
Name string (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- Bind
Type string (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- Description string
(string: "")- Description for this ACL binding rule.- Selector string
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
- Auth
Method string (string: <required>)- Name of the auth method for which this rule applies to.- Bind
Name string (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- Bind
Type string (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- Description string
(string: "")- Description for this ACL binding rule.- Selector string
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
- auth
Method String (string: <required>)- Name of the auth method for which this rule applies to.- bind
Name String (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- bind
Type String (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- description String
(string: "")- Description for this ACL binding rule.- selector String
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
- auth
Method string (string: <required>)- Name of the auth method for which this rule applies to.- bind
Name string (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- bind
Type string (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- description string
(string: "")- Description for this ACL binding rule.- selector string
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
- auth_
method str (string: <required>)- Name of the auth method for which this rule applies to.- bind_
name str (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- bind_
type str (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- description str
(string: "")- Description for this ACL binding rule.- selector str
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
- auth
Method String (string: <required>)- Name of the auth method for which this rule applies to.- bind
Name String (string: <optional>)- Target of the binding. Ifbind_typeisroleorpolicythenbind_nameis required. Ifbind_typeismanagementthanbind_namemust not be defined.- bind
Type String (string: <required>)- Adjusts how this binding rule is applied at login time. Valid values arerole,policy, andmanagement.- description String
(string: "")- Description for this ACL binding rule.- selector String
(string: "")- A boolean expression that matches against verified identity attributes returned from the auth method during login.
Package Details
- Repository
- HashiCorp Nomad pulumi/pulumi-nomad
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nomadTerraform Provider.
published on Thursday, Feb 26, 2026 by Pulumi
