ionoscloud.cert.getAutoCertificate
Explore with Pulumi AI
The CM AutoCertificate data source can be used to search for and return an existing auto-certificate. You can provide a string for either id or name parameters which will be compared with provisioned auto-certificates. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.
Example Usage
By ID
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.cert.getAutoCertificate({
id: "auto_certificate_id",
location: "auto_certificate_location",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.cert.get_auto_certificate(id="auto_certificate_id",
location="auto_certificate_location")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/cert"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cert.LookupAutoCertificate(ctx, &cert.LookupAutoCertificateArgs{
Id: pulumi.StringRef("auto_certificate_id"),
Location: "auto_certificate_location",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Cert.GetAutoCertificate.Invoke(new()
{
Id = "auto_certificate_id",
Location = "auto_certificate_location",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.cert.CertFunctions;
import com.pulumi.ionoscloud.cert.inputs.GetAutoCertificateArgs;
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) {
final var example = CertFunctions.getAutoCertificate(GetAutoCertificateArgs.builder()
.id("auto_certificate_id")
.location("auto_certificate_location")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:cert:getAutoCertificate
arguments:
id: auto_certificate_id
location: auto_certificate_location
By Name
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.cert.getAutoCertificate({
name: "AutoCertificate Name Example",
location: "auto_certificate_location",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.cert.get_auto_certificate(name="AutoCertificate Name Example",
location="auto_certificate_location")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/cert"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cert.LookupAutoCertificate(ctx, &cert.LookupAutoCertificateArgs{
Name: pulumi.StringRef("AutoCertificate Name Example"),
Location: "auto_certificate_location",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Cert.GetAutoCertificate.Invoke(new()
{
Name = "AutoCertificate Name Example",
Location = "auto_certificate_location",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.cert.CertFunctions;
import com.pulumi.ionoscloud.cert.inputs.GetAutoCertificateArgs;
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) {
final var example = CertFunctions.getAutoCertificate(GetAutoCertificateArgs.builder()
.name("AutoCertificate Name Example")
.location("auto_certificate_location")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:cert:getAutoCertificate
arguments:
name: AutoCertificate Name Example
location: auto_certificate_location
Using getAutoCertificate
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAutoCertificate(args: GetAutoCertificateArgs, opts?: InvokeOptions): Promise<GetAutoCertificateResult>
function getAutoCertificateOutput(args: GetAutoCertificateOutputArgs, opts?: InvokeOptions): Output<GetAutoCertificateResult>
def get_auto_certificate(id: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAutoCertificateResult
def get_auto_certificate_output(id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAutoCertificateResult]
func LookupAutoCertificate(ctx *Context, args *LookupAutoCertificateArgs, opts ...InvokeOption) (*LookupAutoCertificateResult, error)
func LookupAutoCertificateOutput(ctx *Context, args *LookupAutoCertificateOutputArgs, opts ...InvokeOption) LookupAutoCertificateResultOutput
> Note: This function is named LookupAutoCertificate
in the Go SDK.
public static class GetAutoCertificate
{
public static Task<GetAutoCertificateResult> InvokeAsync(GetAutoCertificateArgs args, InvokeOptions? opts = null)
public static Output<GetAutoCertificateResult> Invoke(GetAutoCertificateInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAutoCertificateResult> getAutoCertificate(GetAutoCertificateArgs args, InvokeOptions options)
public static Output<GetAutoCertificateResult> getAutoCertificate(GetAutoCertificateArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:cert/getAutoCertificate:getAutoCertificate
arguments:
# arguments dictionary
The following arguments are supported:
- Location string
- [string] The location of the auto-certificate.
- Id string
[string] ID of the auto-certificate you want to search for.
Either
name
orid
must be provided. If none, or both are provided, the datasource will return an error.- Name string
- [string] Name of an existing auto-certificate that you want to search for.
- Location string
- [string] The location of the auto-certificate.
- Id string
[string] ID of the auto-certificate you want to search for.
Either
name
orid
must be provided. If none, or both are provided, the datasource will return an error.- Name string
- [string] Name of an existing auto-certificate that you want to search for.
- location String
- [string] The location of the auto-certificate.
- id String
[string] ID of the auto-certificate you want to search for.
Either
name
orid
must be provided. If none, or both are provided, the datasource will return an error.- name String
- [string] Name of an existing auto-certificate that you want to search for.
- location string
- [string] The location of the auto-certificate.
- id string
[string] ID of the auto-certificate you want to search for.
Either
name
orid
must be provided. If none, or both are provided, the datasource will return an error.- name string
- [string] Name of an existing auto-certificate that you want to search for.
- location str
- [string] The location of the auto-certificate.
- id str
[string] ID of the auto-certificate you want to search for.
Either
name
orid
must be provided. If none, or both are provided, the datasource will return an error.- name str
- [string] Name of an existing auto-certificate that you want to search for.
- location String
- [string] The location of the auto-certificate.
- id String
[string] ID of the auto-certificate you want to search for.
Either
name
orid
must be provided. If none, or both are provided, the datasource will return an error.- name String
- [string] Name of an existing auto-certificate that you want to search for.
getAutoCertificate Result
The following output properties are available:
- Common
Name string - [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- Id string
- Key
Algorithm string - [string] The key algorithm used to generate the certificate.
- Last
Issued stringCertificate Id - [string] The ID of the last certificate that was issued.
- Location string
- Name string
- Provider
Id string - Subject
Alternative List<string>Names - [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- Common
Name string - [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- Id string
- Key
Algorithm string - [string] The key algorithm used to generate the certificate.
- Last
Issued stringCertificate Id - [string] The ID of the last certificate that was issued.
- Location string
- Name string
- Provider
Id string - Subject
Alternative []stringNames - [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- common
Name String - [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- id String
- key
Algorithm String - [string] The key algorithm used to generate the certificate.
- last
Issued StringCertificate Id - [string] The ID of the last certificate that was issued.
- location String
- name String
- provider
Id String - subject
Alternative List<String>Names - [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- common
Name string - [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- id string
- key
Algorithm string - [string] The key algorithm used to generate the certificate.
- last
Issued stringCertificate Id - [string] The ID of the last certificate that was issued.
- location string
- name string
- provider
Id string - subject
Alternative string[]Names - [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- common_
name str - [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- id str
- key_
algorithm str - [string] The key algorithm used to generate the certificate.
- last_
issued_ strcertificate_ id - [string] The ID of the last certificate that was issued.
- location str
- name str
- provider_
id str - subject_
alternative_ Sequence[str]names - [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- common
Name String - [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- id String
- key
Algorithm String - [string] The key algorithm used to generate the certificate.
- last
Issued StringCertificate Id - [string] The ID of the last certificate that was issued.
- location String
- name String
- provider
Id String - subject
Alternative List<String>Names - [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.