Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

License

NOTE: This feature requires Consul Enterprise.

The consul.License resource provides datacenter-level management of the Consul Enterprise license. If ACLs are enabled then a token with operator privileges may be required in order to use this command.

Example Usage

using System.IO;
using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
    public MyStack()
    {
        var license = new Consul.License("license", new Consul.LicenseArgs
        {
            License = File.ReadAllText("license.hclic"),
        });
    }

}

Coming soon!

import pulumi
import pulumi_consul as consul

license = consul.License("license", license=(lambda path: open(path).read())("license.hclic"))
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";
import * from "fs";

const license = new consul.License("license", {license: fs.readFileSync("license.hclic")});

Create a License Resource

new License(name: string, args: LicenseArgs, opts?: CustomResourceOptions);
def License(resource_name: str, opts: Optional[ResourceOptions] = None, datacenter: Optional[str] = None, license: Optional[str] = None)
func NewLicense(ctx *Context, name string, args LicenseArgs, opts ...ResourceOption) (*License, error)
public License(string name, LicenseArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args LicenseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LicenseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LicenseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

License Resource Properties

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

Inputs

The License resource accepts the following input properties:

ConsulLicense string

The Consul license to use.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

License string

The Consul license to use.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

license string

The Consul license to use.

datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

license str

The Consul license to use.

datacenter str

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

Outputs

All input properties are implicitly available as output properties. Additionally, the License resource produces the following output properties:

CustomerId string

The ID of the customer the license is attached to.

ExpirationTime string

The expiration time of the license.

Features List<string>

The features for which the license is valid.

Id string
The provider-assigned unique ID for this managed resource.
InstallationId string

The ID of the current installation.

IssueTime string

The date the license was issued.

LicenseId string

The ID of the license used.

Product string

The product for which the license is valid.

StartTime string

The start time of the license.

Valid bool

Whether the license is valid.

Warnings List<string>

A list of warning messages regarding the license validity.

CustomerId string

The ID of the customer the license is attached to.

ExpirationTime string

The expiration time of the license.

Features []string

The features for which the license is valid.

Id string
The provider-assigned unique ID for this managed resource.
InstallationId string

The ID of the current installation.

IssueTime string

The date the license was issued.

LicenseId string

The ID of the license used.

Product string

The product for which the license is valid.

StartTime string

The start time of the license.

Valid bool

Whether the license is valid.

Warnings []string

A list of warning messages regarding the license validity.

customerId string

The ID of the customer the license is attached to.

expirationTime string

The expiration time of the license.

features string[]

The features for which the license is valid.

id string
The provider-assigned unique ID for this managed resource.
installationId string

The ID of the current installation.

issueTime string

The date the license was issued.

licenseId string

The ID of the license used.

product string

The product for which the license is valid.

startTime string

The start time of the license.

valid boolean

Whether the license is valid.

warnings string[]

A list of warning messages regarding the license validity.

customer_id str

The ID of the customer the license is attached to.

expiration_time str

The expiration time of the license.

features Sequence[str]

The features for which the license is valid.

id str
The provider-assigned unique ID for this managed resource.
installation_id str

The ID of the current installation.

issue_time str

The date the license was issued.

license_id str

The ID of the license used.

product str

The product for which the license is valid.

start_time str

The start time of the license.

valid bool

Whether the license is valid.

warnings Sequence[str]

A list of warning messages regarding the license validity.

Look up an Existing License Resource

Get an existing License 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?: LicenseState, opts?: CustomResourceOptions): License
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, customer_id: Optional[str] = None, datacenter: Optional[str] = None, expiration_time: Optional[str] = None, features: Optional[Sequence[str]] = None, installation_id: Optional[str] = None, issue_time: Optional[str] = None, license: Optional[str] = None, license_id: Optional[str] = None, product: Optional[str] = None, start_time: Optional[str] = None, valid: Optional[bool] = None, warnings: Optional[Sequence[str]] = None) -> License
func GetLicense(ctx *Context, name string, id IDInput, state *LicenseState, opts ...ResourceOption) (*License, error)
public static License Get(string name, Input<string> id, LicenseState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

ConsulLicense string

The Consul license to use.

CustomerId string

The ID of the customer the license is attached to.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

ExpirationTime string

The expiration time of the license.

Features List<string>

The features for which the license is valid.

InstallationId string

The ID of the current installation.

IssueTime string

The date the license was issued.

LicenseId string

The ID of the license used.

Product string

The product for which the license is valid.

StartTime string

The start time of the license.

Valid bool

Whether the license is valid.

Warnings List<string>

A list of warning messages regarding the license validity.

CustomerId string

The ID of the customer the license is attached to.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

ExpirationTime string

The expiration time of the license.

Features []string

The features for which the license is valid.

InstallationId string

The ID of the current installation.

IssueTime string

The date the license was issued.

License string

The Consul license to use.

LicenseId string

The ID of the license used.

Product string

The product for which the license is valid.

StartTime string

The start time of the license.

Valid bool

Whether the license is valid.

Warnings []string

A list of warning messages regarding the license validity.

customerId string

The ID of the customer the license is attached to.

datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

expirationTime string

The expiration time of the license.

features string[]

The features for which the license is valid.

installationId string

The ID of the current installation.

issueTime string

The date the license was issued.

license string

The Consul license to use.

licenseId string

The ID of the license used.

product string

The product for which the license is valid.

startTime string

The start time of the license.

valid boolean

Whether the license is valid.

warnings string[]

A list of warning messages regarding the license validity.

customer_id str

The ID of the customer the license is attached to.

datacenter str

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

expiration_time str

The expiration time of the license.

features Sequence[str]

The features for which the license is valid.

installation_id str

The ID of the current installation.

issue_time str

The date the license was issued.

license str

The Consul license to use.

license_id str

The ID of the license used.

product str

The product for which the license is valid.

start_time str

The start time of the license.

valid bool

Whether the license is valid.

warnings Sequence[str]

A list of warning messages regarding the license validity.

Package Details

Repository
https://github.com/pulumi/pulumi-consul
License
Apache-2.0
Notes
This Pulumi package is based on the consul Terraform Provider.