1. Packages
  2. HashiCorp Nomad
  3. API Docs
  4. AclPolicy
Nomad v2.3.0 published on Wednesday, Jun 5, 2024 by Pulumi

nomad.AclPolicy

Explore with Pulumi AI

nomad logo
Nomad v2.3.0 published on Wednesday, Jun 5, 2024 by Pulumi

    Manages an ACL policy registered in Nomad.

    Create AclPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AclPolicy(name: string, args: AclPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def AclPolicy(resource_name: str,
                  args: AclPolicyArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AclPolicy(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  rules_hcl: Optional[str] = None,
                  description: Optional[str] = None,
                  job_acl: Optional[AclPolicyJobAclArgs] = None,
                  name: Optional[str] = None)
    func NewAclPolicy(ctx *Context, name string, args AclPolicyArgs, opts ...ResourceOption) (*AclPolicy, error)
    public AclPolicy(string name, AclPolicyArgs args, CustomResourceOptions? opts = null)
    public AclPolicy(String name, AclPolicyArgs args)
    public AclPolicy(String name, AclPolicyArgs args, CustomResourceOptions options)
    
    type: nomad:AclPolicy
    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 AclPolicyArgs
    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 AclPolicyArgs
    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 AclPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AclPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AclPolicyArgs
    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 aclPolicyResource = new Nomad.AclPolicy("aclPolicyResource", new()
    {
        RulesHcl = "string",
        Description = "string",
        JobAcl = new Nomad.Inputs.AclPolicyJobAclArgs
        {
            JobId = "string",
            Group = "string",
            Namespace = "string",
            Task = "string",
        },
        Name = "string",
    });
    
    example, err := nomad.NewAclPolicy(ctx, "aclPolicyResource", &nomad.AclPolicyArgs{
    	RulesHcl:    pulumi.String("string"),
    	Description: pulumi.String("string"),
    	JobAcl: &nomad.AclPolicyJobAclArgs{
    		JobId:     pulumi.String("string"),
    		Group:     pulumi.String("string"),
    		Namespace: pulumi.String("string"),
    		Task:      pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var aclPolicyResource = new AclPolicy("aclPolicyResource", AclPolicyArgs.builder()
        .rulesHcl("string")
        .description("string")
        .jobAcl(AclPolicyJobAclArgs.builder()
            .jobId("string")
            .group("string")
            .namespace("string")
            .task("string")
            .build())
        .name("string")
        .build());
    
    acl_policy_resource = nomad.AclPolicy("aclPolicyResource",
        rules_hcl="string",
        description="string",
        job_acl=nomad.AclPolicyJobAclArgs(
            job_id="string",
            group="string",
            namespace="string",
            task="string",
        ),
        name="string")
    
    const aclPolicyResource = new nomad.AclPolicy("aclPolicyResource", {
        rulesHcl: "string",
        description: "string",
        jobAcl: {
            jobId: "string",
            group: "string",
            namespace: "string",
            task: "string",
        },
        name: "string",
    });
    
    type: nomad:AclPolicy
    properties:
        description: string
        jobAcl:
            group: string
            jobId: string
            namespace: string
            task: string
        name: string
        rulesHcl: string
    

    AclPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The AclPolicy resource accepts the following input properties:

    RulesHcl string
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    Description string
    (string: "") - A description of the policy.
    JobAcl AclPolicyJobAcl
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    Name string
    (string: <required>) - A unique name for the policy.
    RulesHcl string
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    Description string
    (string: "") - A description of the policy.
    JobAcl AclPolicyJobAclArgs
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    Name string
    (string: <required>) - A unique name for the policy.
    rulesHcl String
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    description String
    (string: "") - A description of the policy.
    jobAcl AclPolicyJobAcl
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    name String
    (string: <required>) - A unique name for the policy.
    rulesHcl string
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    description string
    (string: "") - A description of the policy.
    jobAcl AclPolicyJobAcl
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    name string
    (string: <required>) - A unique name for the policy.
    rules_hcl str
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    description str
    (string: "") - A description of the policy.
    job_acl AclPolicyJobAclArgs
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    name str
    (string: <required>) - A unique name for the policy.
    rulesHcl String
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    description String
    (string: "") - A description of the policy.
    jobAcl Property Map
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    name String
    (string: <required>) - A unique name for the policy.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AclPolicy 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 AclPolicy Resource

    Get an existing AclPolicy 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?: AclPolicyState, opts?: CustomResourceOptions): AclPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            job_acl: Optional[AclPolicyJobAclArgs] = None,
            name: Optional[str] = None,
            rules_hcl: Optional[str] = None) -> AclPolicy
    func GetAclPolicy(ctx *Context, name string, id IDInput, state *AclPolicyState, opts ...ResourceOption) (*AclPolicy, error)
    public static AclPolicy Get(string name, Input<string> id, AclPolicyState? state, CustomResourceOptions? opts = null)
    public static AclPolicy get(String name, Output<String> id, AclPolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Description string
    (string: "") - A description of the policy.
    JobAcl AclPolicyJobAcl
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    Name string
    (string: <required>) - A unique name for the policy.
    RulesHcl string
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    Description string
    (string: "") - A description of the policy.
    JobAcl AclPolicyJobAclArgs
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    Name string
    (string: <required>) - A unique name for the policy.
    RulesHcl string
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    description String
    (string: "") - A description of the policy.
    jobAcl AclPolicyJobAcl
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    name String
    (string: <required>) - A unique name for the policy.
    rulesHcl String
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    description string
    (string: "") - A description of the policy.
    jobAcl AclPolicyJobAcl
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    name string
    (string: <required>) - A unique name for the policy.
    rulesHcl string
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    description str
    (string: "") - A description of the policy.
    job_acl AclPolicyJobAclArgs
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    name str
    (string: <required>) - A unique name for the policy.
    rules_hcl str
    (string: <required>) - The contents of the policy to register, as HCL or JSON.
    description String
    (string: "") - A description of the policy.
    jobAcl Property Map
    (``JobACL``: <optional>) - Options for assigning the ACL rules to a job, group, or task.
    name String
    (string: <required>) - A unique name for the policy.
    rulesHcl String
    (string: <required>) - The contents of the policy to register, as HCL or JSON.

    Supporting Types

    AclPolicyJobAcl, AclPolicyJobAclArgs

    JobId string
    Job
    Group string
    Group
    Namespace string
    Namespace
    Task string
    Task
    JobId string
    Job
    Group string
    Group
    Namespace string
    Namespace
    Task string
    Task
    jobId String
    Job
    group String
    Group
    namespace String
    Namespace
    task String
    Task
    jobId string
    Job
    group string
    Group
    namespace string
    Namespace
    task string
    Task
    job_id str
    Job
    group str
    Group
    namespace str
    Namespace
    task str
    Task
    jobId String
    Job
    group String
    Group
    namespace String
    Namespace
    task String
    Task

    Package Details

    Repository
    HashiCorp Nomad pulumi/pulumi-nomad
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nomad Terraform Provider.
    nomad logo
    Nomad v2.3.0 published on Wednesday, Jun 5, 2024 by Pulumi