@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
139 lines (138 loc) • 4.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Creates and manages Scaleway Container domain name bindings.
* You can check our [containers guide](https://www.scaleway.com/en/docs/compute/containers/how-to/add-a-custom-domain-to-a-container/) for further information.
*
* ## Example Usage
* ### Simple
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const appContainer = new scaleway.Container("appContainer", {});
* const appContainerDomain = new scaleway.ContainerDomain("appContainerDomain", {
* containerId: appContainer.id,
* hostname: "container.domain.tld",
* });
* ```
* ### Complete example with domain
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const main = new scaleway.ContainerNamespace("main", {description: "test container"});
* const appContainer = new scaleway.Container("appContainer", {
* namespaceId: main.id,
* registryImage: pulumi.interpolate`${main.registryEndpoint}/nginx:alpine`,
* port: 80,
* cpuLimit: 140,
* memoryLimit: 256,
* minScale: 1,
* maxScale: 1,
* timeout: 600,
* maxConcurrency: 80,
* privacy: "public",
* protocol: "http1",
* deploy: true,
* });
* const appDomainRecord = new scaleway.DomainRecord("appDomainRecord", {
* dnsZone: "domain.tld",
* type: "CNAME",
* data: pulumi.interpolate`${appContainer.domainName}.`,
* ttl: 3600,
* });
* const appContainerDomain = new scaleway.ContainerDomain("appContainerDomain", {
* containerId: appContainer.id,
* hostname: pulumi.interpolate`${appDomainRecord.name}.${appDomainRecord.dnsZone}`,
* });
* ```
*
* ## Import
*
* Container domain binding can be imported using the `{region}/{id}`, e.g. bash
*
* ```sh
* $ pulumi import scaleway:index/containerDomain:ContainerDomain main fr-par/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class ContainerDomain extends pulumi.CustomResource {
/**
* Get an existing ContainerDomain resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ContainerDomainState, opts?: pulumi.CustomResourceOptions): ContainerDomain;
/**
* Returns true if the given object is an instance of ContainerDomain. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ContainerDomain;
/**
* The ID of the container.
*/
readonly containerId: pulumi.Output<string>;
/**
* The hostname with a CNAME record.
*/
readonly hostname: pulumi.Output<string>;
/**
* `region`) The region in which the container exists
*/
readonly region: pulumi.Output<string>;
/**
* The URL used to query the container
*/
readonly url: pulumi.Output<string>;
/**
* Create a ContainerDomain resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ContainerDomainArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ContainerDomain resources.
*/
export interface ContainerDomainState {
/**
* The ID of the container.
*/
containerId?: pulumi.Input<string>;
/**
* The hostname with a CNAME record.
*/
hostname?: pulumi.Input<string>;
/**
* `region`) The region in which the container exists
*/
region?: pulumi.Input<string>;
/**
* The URL used to query the container
*/
url?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ContainerDomain resource.
*/
export interface ContainerDomainArgs {
/**
* The ID of the container.
*/
containerId: pulumi.Input<string>;
/**
* The hostname with a CNAME record.
*/
hostname: pulumi.Input<string>;
/**
* `region`) The region in which the container exists
*/
region?: pulumi.Input<string>;
}