1. Packages
  2. Consul Provider
  3. API Docs
  4. CertificateAuthority
Consul v3.12.4 published on Wednesday, Feb 12, 2025 by Pulumi

consul.CertificateAuthority

Explore with Pulumi AI

The consul.CertificateAuthority resource can be used to manage the configuration of the Certificate Authority used by Consul Connect.

Note: The keys in the config argument must be using Camel case.

Create CertificateAuthority Resource

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

Constructor syntax

new CertificateAuthority(name: string, args: CertificateAuthorityArgs, opts?: CustomResourceOptions);
@overload
def CertificateAuthority(resource_name: str,
                         args: CertificateAuthorityArgs,
                         opts: Optional[ResourceOptions] = None)

@overload
def CertificateAuthority(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         connect_provider: Optional[str] = None,
                         config: Optional[Mapping[str, str]] = None,
                         config_json: Optional[str] = None)
func NewCertificateAuthority(ctx *Context, name string, args CertificateAuthorityArgs, opts ...ResourceOption) (*CertificateAuthority, error)
public CertificateAuthority(string name, CertificateAuthorityArgs args, CustomResourceOptions? opts = null)
public CertificateAuthority(String name, CertificateAuthorityArgs args)
public CertificateAuthority(String name, CertificateAuthorityArgs args, CustomResourceOptions options)
type: consul:CertificateAuthority
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CertificateAuthorityArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CertificateAuthorityArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CertificateAuthorityArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CertificateAuthorityArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CertificateAuthorityArgs
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 certificateAuthorityResource = new Consul.CertificateAuthority("certificateAuthorityResource", new()
{
    ConnectProvider = "string",
    ConfigJson = "string",
});
Copy
example, err := consul.NewCertificateAuthority(ctx, "certificateAuthorityResource", &consul.CertificateAuthorityArgs{
	ConnectProvider: pulumi.String("string"),
	ConfigJson:      pulumi.String("string"),
})
Copy
var certificateAuthorityResource = new CertificateAuthority("certificateAuthorityResource", CertificateAuthorityArgs.builder()
    .connectProvider("string")
    .configJson("string")
    .build());
Copy
certificate_authority_resource = consul.CertificateAuthority("certificateAuthorityResource",
    connect_provider="string",
    config_json="string")
Copy
const certificateAuthorityResource = new consul.CertificateAuthority("certificateAuthorityResource", {
    connectProvider: "string",
    configJson: "string",
});
Copy
type: consul:CertificateAuthority
properties:
    configJson: string
    connectProvider: string
Copy

CertificateAuthority 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 CertificateAuthority resource accepts the following input properties:

ConnectProvider
This property is required.
Changes to this property will trigger replacement.
string
Specifies the CA provider type to use.
Config Changes to this property will trigger replacement. Dictionary<string, string>

Deprecated: The config attribute is deprecated, please use config_json instead.

ConfigJson Changes to this property will trigger replacement. string
ConnectProvider
This property is required.
Changes to this property will trigger replacement.
string
Specifies the CA provider type to use.
Config Changes to this property will trigger replacement. map[string]string

Deprecated: The config attribute is deprecated, please use config_json instead.

ConfigJson Changes to this property will trigger replacement. string
connectProvider
This property is required.
Changes to this property will trigger replacement.
String
Specifies the CA provider type to use.
config Changes to this property will trigger replacement. Map<String,String>

Deprecated: The config attribute is deprecated, please use config_json instead.

configJson Changes to this property will trigger replacement. String
connectProvider
This property is required.
Changes to this property will trigger replacement.
string
Specifies the CA provider type to use.
config Changes to this property will trigger replacement. {[key: string]: string}

Deprecated: The config attribute is deprecated, please use config_json instead.

configJson Changes to this property will trigger replacement. string
connect_provider
This property is required.
Changes to this property will trigger replacement.
str
Specifies the CA provider type to use.
config Changes to this property will trigger replacement. Mapping[str, str]

Deprecated: The config attribute is deprecated, please use config_json instead.

config_json Changes to this property will trigger replacement. str
connectProvider
This property is required.
Changes to this property will trigger replacement.
String
Specifies the CA provider type to use.
config Changes to this property will trigger replacement. Map<String>

Deprecated: The config attribute is deprecated, please use config_json instead.

configJson Changes to this property will trigger replacement. String

Outputs

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

Get an existing CertificateAuthority 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?: CertificateAuthorityState, opts?: CustomResourceOptions): CertificateAuthority
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config: Optional[Mapping[str, str]] = None,
        config_json: Optional[str] = None,
        connect_provider: Optional[str] = None) -> CertificateAuthority
func GetCertificateAuthority(ctx *Context, name string, id IDInput, state *CertificateAuthorityState, opts ...ResourceOption) (*CertificateAuthority, error)
public static CertificateAuthority Get(string name, Input<string> id, CertificateAuthorityState? state, CustomResourceOptions? opts = null)
public static CertificateAuthority get(String name, Output<String> id, CertificateAuthorityState state, CustomResourceOptions options)
resources:  _:    type: consul:CertificateAuthority    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Config Changes to this property will trigger replacement. Dictionary<string, string>

Deprecated: The config attribute is deprecated, please use config_json instead.

ConfigJson Changes to this property will trigger replacement. string
ConnectProvider Changes to this property will trigger replacement. string
Specifies the CA provider type to use.
Config Changes to this property will trigger replacement. map[string]string

Deprecated: The config attribute is deprecated, please use config_json instead.

ConfigJson Changes to this property will trigger replacement. string
ConnectProvider Changes to this property will trigger replacement. string
Specifies the CA provider type to use.
config Changes to this property will trigger replacement. Map<String,String>

Deprecated: The config attribute is deprecated, please use config_json instead.

configJson Changes to this property will trigger replacement. String
connectProvider Changes to this property will trigger replacement. String
Specifies the CA provider type to use.
config Changes to this property will trigger replacement. {[key: string]: string}

Deprecated: The config attribute is deprecated, please use config_json instead.

configJson Changes to this property will trigger replacement. string
connectProvider Changes to this property will trigger replacement. string
Specifies the CA provider type to use.
config Changes to this property will trigger replacement. Mapping[str, str]

Deprecated: The config attribute is deprecated, please use config_json instead.

config_json Changes to this property will trigger replacement. str
connect_provider Changes to this property will trigger replacement. str
Specifies the CA provider type to use.
config Changes to this property will trigger replacement. Map<String>

Deprecated: The config attribute is deprecated, please use config_json instead.

configJson Changes to this property will trigger replacement. String
connectProvider Changes to this property will trigger replacement. String
Specifies the CA provider type to use.

Import

$ pulumi import consul:index/certificateAuthority:CertificateAuthority connect connect-ca
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
HashiCorp Consul pulumi/pulumi-consul
License
Apache-2.0
Notes
This Pulumi package is based on the consul Terraform Provider.