hcloud.ManagedCertificate
Explore with Pulumi AI
Obtain a Hetzner Cloud managed TLS certificate.
Create ManagedCertificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ManagedCertificate(name: string, args: ManagedCertificateArgs, opts?: CustomResourceOptions);
@overload
def ManagedCertificate(resource_name: str,
args: ManagedCertificateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ManagedCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain_names: Optional[Sequence[str]] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None)
func NewManagedCertificate(ctx *Context, name string, args ManagedCertificateArgs, opts ...ResourceOption) (*ManagedCertificate, error)
public ManagedCertificate(string name, ManagedCertificateArgs args, CustomResourceOptions? opts = null)
public ManagedCertificate(String name, ManagedCertificateArgs args)
public ManagedCertificate(String name, ManagedCertificateArgs args, CustomResourceOptions options)
type: hcloud:ManagedCertificate
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 ManagedCertificateArgs
- 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 ManagedCertificateArgs
- 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 ManagedCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ManagedCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ManagedCertificateArgs
- 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 managedCertificateResource = new HCloud.ManagedCertificate("managedCertificateResource", new()
{
DomainNames = new[]
{
"string",
},
Labels =
{
{ "string", "string" },
},
Name = "string",
});
example, err := hcloud.NewManagedCertificate(ctx, "managedCertificateResource", &hcloud.ManagedCertificateArgs{
DomainNames: pulumi.StringArray{
pulumi.String("string"),
},
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var managedCertificateResource = new ManagedCertificate("managedCertificateResource", ManagedCertificateArgs.builder()
.domainNames("string")
.labels(Map.of("string", "string"))
.name("string")
.build());
managed_certificate_resource = hcloud.ManagedCertificate("managedCertificateResource",
domain_names=["string"],
labels={
"string": "string",
},
name="string")
const managedCertificateResource = new hcloud.ManagedCertificate("managedCertificateResource", {
domainNames: ["string"],
labels: {
string: "string",
},
name: "string",
});
type: hcloud:ManagedCertificate
properties:
domainNames:
- string
labels:
string: string
name: string
ManagedCertificate 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 ManagedCertificate resource accepts the following input properties:
- Domain
Names List<string> - Domain names for which a certificate should be obtained.
- Labels Dictionary<string, string>
- User-defined labels (key-value pairs) the certificate should be created with.
- Name string
- Name of the Certificate.
- Domain
Names []string - Domain names for which a certificate should be obtained.
- Labels map[string]string
- User-defined labels (key-value pairs) the certificate should be created with.
- Name string
- Name of the Certificate.
- domain
Names List<String> - Domain names for which a certificate should be obtained.
- labels Map<String,String>
- User-defined labels (key-value pairs) the certificate should be created with.
- name String
- Name of the Certificate.
- domain
Names string[] - Domain names for which a certificate should be obtained.
- labels {[key: string]: string}
- User-defined labels (key-value pairs) the certificate should be created with.
- name string
- Name of the Certificate.
- domain_
names Sequence[str] - Domain names for which a certificate should be obtained.
- labels Mapping[str, str]
- User-defined labels (key-value pairs) the certificate should be created with.
- name str
- Name of the Certificate.
- domain
Names List<String> - Domain names for which a certificate should be obtained.
- labels Map<String>
- User-defined labels (key-value pairs) the certificate should be created with.
- name String
- Name of the Certificate.
Outputs
All input properties are implicitly available as output properties. Additionally, the ManagedCertificate resource produces the following output properties:
- Certificate string
- (string) PEM encoded TLS certificate.
- Created string
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- Fingerprint string
- (string) Fingerprint of the certificate.
- Id string
- The provider-assigned unique ID for this managed resource.
- Not
Valid stringAfter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- Not
Valid stringBefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- Type string
- Certificate string
- (string) PEM encoded TLS certificate.
- Created string
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- Fingerprint string
- (string) Fingerprint of the certificate.
- Id string
- The provider-assigned unique ID for this managed resource.
- Not
Valid stringAfter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- Not
Valid stringBefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- Type string
- certificate String
- (string) PEM encoded TLS certificate.
- created String
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- fingerprint String
- (string) Fingerprint of the certificate.
- id String
- The provider-assigned unique ID for this managed resource.
- not
Valid StringAfter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- not
Valid StringBefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- type String
- certificate string
- (string) PEM encoded TLS certificate.
- created string
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- fingerprint string
- (string) Fingerprint of the certificate.
- id string
- The provider-assigned unique ID for this managed resource.
- not
Valid stringAfter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- not
Valid stringBefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- type string
- certificate str
- (string) PEM encoded TLS certificate.
- created str
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- fingerprint str
- (string) Fingerprint of the certificate.
- id str
- The provider-assigned unique ID for this managed resource.
- not_
valid_ strafter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- not_
valid_ strbefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- type str
- certificate String
- (string) PEM encoded TLS certificate.
- created String
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- fingerprint String
- (string) Fingerprint of the certificate.
- id String
- The provider-assigned unique ID for this managed resource.
- not
Valid StringAfter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- not
Valid StringBefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- type String
Look up Existing ManagedCertificate Resource
Get an existing ManagedCertificate 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?: ManagedCertificateState, opts?: CustomResourceOptions): ManagedCertificate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
certificate: Optional[str] = None,
created: Optional[str] = None,
domain_names: Optional[Sequence[str]] = None,
fingerprint: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
not_valid_after: Optional[str] = None,
not_valid_before: Optional[str] = None,
type: Optional[str] = None) -> ManagedCertificate
func GetManagedCertificate(ctx *Context, name string, id IDInput, state *ManagedCertificateState, opts ...ResourceOption) (*ManagedCertificate, error)
public static ManagedCertificate Get(string name, Input<string> id, ManagedCertificateState? state, CustomResourceOptions? opts = null)
public static ManagedCertificate get(String name, Output<String> id, ManagedCertificateState 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.
- Certificate string
- (string) PEM encoded TLS certificate.
- Created string
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- Domain
Names List<string> - Domain names for which a certificate should be obtained.
- Fingerprint string
- (string) Fingerprint of the certificate.
- Labels Dictionary<string, string>
- User-defined labels (key-value pairs) the certificate should be created with.
- Name string
- Name of the Certificate.
- Not
Valid stringAfter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- Not
Valid stringBefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- Type string
- Certificate string
- (string) PEM encoded TLS certificate.
- Created string
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- Domain
Names []string - Domain names for which a certificate should be obtained.
- Fingerprint string
- (string) Fingerprint of the certificate.
- Labels map[string]string
- User-defined labels (key-value pairs) the certificate should be created with.
- Name string
- Name of the Certificate.
- Not
Valid stringAfter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- Not
Valid stringBefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- Type string
- certificate String
- (string) PEM encoded TLS certificate.
- created String
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- domain
Names List<String> - Domain names for which a certificate should be obtained.
- fingerprint String
- (string) Fingerprint of the certificate.
- labels Map<String,String>
- User-defined labels (key-value pairs) the certificate should be created with.
- name String
- Name of the Certificate.
- not
Valid StringAfter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- not
Valid StringBefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- type String
- certificate string
- (string) PEM encoded TLS certificate.
- created string
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- domain
Names string[] - Domain names for which a certificate should be obtained.
- fingerprint string
- (string) Fingerprint of the certificate.
- labels {[key: string]: string}
- User-defined labels (key-value pairs) the certificate should be created with.
- name string
- Name of the Certificate.
- not
Valid stringAfter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- not
Valid stringBefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- type string
- certificate str
- (string) PEM encoded TLS certificate.
- created str
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- domain_
names Sequence[str] - Domain names for which a certificate should be obtained.
- fingerprint str
- (string) Fingerprint of the certificate.
- labels Mapping[str, str]
- User-defined labels (key-value pairs) the certificate should be created with.
- name str
- Name of the Certificate.
- not_
valid_ strafter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- not_
valid_ strbefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- type str
- certificate String
- (string) PEM encoded TLS certificate.
- created String
- (string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).
- domain
Names List<String> - Domain names for which a certificate should be obtained.
- fingerprint String
- (string) Fingerprint of the certificate.
- labels Map<String>
- User-defined labels (key-value pairs) the certificate should be created with.
- name String
- Name of the Certificate.
- not
Valid StringAfter - (string) Point in time when the Certificate stops being valid (in ISO-8601 format).
- not
Valid StringBefore - (string) Point in time when the Certificate becomes valid (in ISO-8601 format).
- type String
Import
Managed certificates can be imported using their id
:
hcl
$ pulumi import hcloud:index/managedCertificate:ManagedCertificate sample_certificate id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloud
Terraform Provider.