@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
154 lines (153 loc) • 5.36 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The `scaleway.containers.Domain` resource allows you to create and manage domain name bindings for Scaleway [Serverless Containers](https://www.scaleway.com/en/docs/serverless/containers/).
*
* Refer to the Containers domain [documentation](https://www.scaleway.com/en/docs/serverless-containers/how-to/add-a-custom-domain-to-a-container/) and the [API documentation](https://www.scaleway.com/en/developers/api/serverless-containers/#path-domains-list-all-domain-name-bindings) for more information.
*
* ## Example Usage
*
* The commands below shows how to bind a custom domain name to a container.
*
* ### Simple
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const app = new scaleway.containers.Container("app", {});
* const appDomain = new scaleway.containers.Domain("app", {
* containerId: app.id,
* hostname: "container.domain.tld",
* });
* ```
*
* ### Complete example with domain
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.containers.Namespace("main", {
* name: "my-ns-test",
* description: "test container",
* });
* const app = new scaleway.containers.Container("app", {
* name: "app",
* 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 appRecord = new scaleway.domain.Record("app", {
* dnsZone: "domain.tld",
* name: "subdomain",
* type: "CNAME",
* data: pulumi.interpolate`${app.domainName}.`,
* ttl: 3600,
* });
* const appDomain = new scaleway.containers.Domain("app", {
* containerId: app.id,
* hostname: pulumi.interpolate`${appRecord.name}.${appRecord.dnsZone}`,
* });
* ```
*
* ## Import
*
* Container domain binding can be imported using `{region}/{id}`, as shown below:
*
* bash
*
* ```sh
* $ pulumi import scaleway:index/containerDomain:ContainerDomain main fr-par/11111111-1111-1111-1111-111111111111
* ```
*
* @deprecated scaleway.index/containerdomain.ContainerDomain has been deprecated in favor of scaleway.containers/domain.Domain
*/
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 unique identifier 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.
*/
/** @deprecated scaleway.index/containerdomain.ContainerDomain has been deprecated in favor of scaleway.containers/domain.Domain */
constructor(name: string, args: ContainerDomainArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ContainerDomain resources.
*/
export interface ContainerDomainState {
/**
* The unique identifier 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 unique identifier 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>;
}