@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
149 lines • 6.02 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* Get information about Scaleway Load Balancer certificates.
*
* This data source can prove useful when a module accepts a Load Balancer certificate as an input variable and needs to, for example, determine the security of a certificate for the frontend associated with your domain.
*
* For more information, see the [main documentation](https://www.scaleway.com/en/docs/load-balancer/how-to/add-certificate/) or [API documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-certificate).
*
* ## Examples
*
* ### Let's Encrypt
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
* import * as std from "@pulumi/std";
*
* const main = new scaleway.loadbalancers.Ip("main", {});
* const mainLoadBalancer = new scaleway.loadbalancers.LoadBalancer("main", {
* ipId: main.id,
* name: "data-test-lb-cert",
* type: "LB-S",
* });
* const mainCertificate = new scaleway.loadbalancers.Certificate("main", {
* lbId: mainLoadBalancer.id,
* name: "data-test-lb-cert",
* letsencrypt: {
* commonName: pulumi.all([mainLoadBalancer.ipAddress, mainLoadBalancer.region]).apply(([ipAddress, region]) => `${std.replace({
* text: ipAddress,
* search: ".",
* replace: "-",
* }).result}.lb.${region}.scw.cloud`),
* },
* });
* const byID = scaleway.loadbalancers.getCertificateOutput({
* certificateId: mainCertificate.id,
* });
* const byName = scaleway.loadbalancers.getCertificateOutput({
* name: mainCertificate.name,
* lbId: mainLoadBalancer.id,
* });
* ```
*/
/** @deprecated scaleway.index/getloadbalancercertificate.getLoadbalancerCertificate has been deprecated in favor of scaleway.loadbalancers/getcertificate.getCertificate */
export declare function getLoadbalancerCertificate(args?: GetLoadbalancerCertificateArgs, opts?: pulumi.InvokeOptions): Promise<GetLoadbalancerCertificateResult>;
/**
* A collection of arguments for invoking getLoadbalancerCertificate.
*/
export interface GetLoadbalancerCertificateArgs {
/**
* The certificate ID.
* - Only one of `name` and `certificateId` should be specified.
*/
certificateId?: string;
/**
* The Load Balancer ID this certificate is attached to.
*/
lbId?: string;
/**
* The name of the Load Balancer certificate.
* - When using a certificate `name` you should specify the `lb-id`
*/
name?: string;
}
/**
* A collection of values returned by getLoadbalancerCertificate.
*/
export interface GetLoadbalancerCertificateResult {
readonly certificateId?: string;
readonly commonName: string;
readonly customCertificates: outputs.GetLoadbalancerCertificateCustomCertificate[];
readonly fingerprint: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly lbId?: string;
readonly letsencrypts: outputs.GetLoadbalancerCertificateLetsencrypt[];
readonly name?: string;
readonly notValidAfter: string;
readonly notValidBefore: string;
readonly status: string;
readonly subjectAlternativeNames: string[];
}
/**
* Get information about Scaleway Load Balancer certificates.
*
* This data source can prove useful when a module accepts a Load Balancer certificate as an input variable and needs to, for example, determine the security of a certificate for the frontend associated with your domain.
*
* For more information, see the [main documentation](https://www.scaleway.com/en/docs/load-balancer/how-to/add-certificate/) or [API documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-certificate).
*
* ## Examples
*
* ### Let's Encrypt
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
* import * as std from "@pulumi/std";
*
* const main = new scaleway.loadbalancers.Ip("main", {});
* const mainLoadBalancer = new scaleway.loadbalancers.LoadBalancer("main", {
* ipId: main.id,
* name: "data-test-lb-cert",
* type: "LB-S",
* });
* const mainCertificate = new scaleway.loadbalancers.Certificate("main", {
* lbId: mainLoadBalancer.id,
* name: "data-test-lb-cert",
* letsencrypt: {
* commonName: pulumi.all([mainLoadBalancer.ipAddress, mainLoadBalancer.region]).apply(([ipAddress, region]) => `${std.replace({
* text: ipAddress,
* search: ".",
* replace: "-",
* }).result}.lb.${region}.scw.cloud`),
* },
* });
* const byID = scaleway.loadbalancers.getCertificateOutput({
* certificateId: mainCertificate.id,
* });
* const byName = scaleway.loadbalancers.getCertificateOutput({
* name: mainCertificate.name,
* lbId: mainLoadBalancer.id,
* });
* ```
*/
/** @deprecated scaleway.index/getloadbalancercertificate.getLoadbalancerCertificate has been deprecated in favor of scaleway.loadbalancers/getcertificate.getCertificate */
export declare function getLoadbalancerCertificateOutput(args?: GetLoadbalancerCertificateOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetLoadbalancerCertificateResult>;
/**
* A collection of arguments for invoking getLoadbalancerCertificate.
*/
export interface GetLoadbalancerCertificateOutputArgs {
/**
* The certificate ID.
* - Only one of `name` and `certificateId` should be specified.
*/
certificateId?: pulumi.Input<string | undefined>;
/**
* The Load Balancer ID this certificate is attached to.
*/
lbId?: pulumi.Input<string | undefined>;
/**
* The name of the Load Balancer certificate.
* - When using a certificate `name` you should specify the `lb-id`
*/
name?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=getLoadbalancerCertificate.d.ts.map