@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
153 lines • 5.53 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";
* import * as std from "@pulumi/std";
*
* const main = new scaleway.containers.Namespace("main", {});
* const app = new scaleway.containers.Container("app", {
* name: "app",
* namespaceId: main.id,
* image: "nginx:latest",
* port: 80,
* privacy: "public",
* protocol: "http1",
* });
* const appRecord = new scaleway.domain.Record("app", {
* dnsZone: "scaleway-terraform.com",
* name: "subdomain",
* type: "CNAME",
* data: std.format({
* input: "%s.",
* args: [std.trimprefix({
* input: app.publicEndpoint,
* prefix: "https://",
* }).result],
* }).result,
* 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:
*
* ```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 | undefined>;
/**
* (Deprecated) The URL used to query the container.
*
* @deprecated URL won't be displayed on v1
*/
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 | undefined>;
/**
* The hostname with a CNAME record.
*/
hostname?: pulumi.Input<string | undefined>;
/**
* `region`) The region in which the container exists.
*/
region?: pulumi.Input<string | undefined>;
/**
* (Deprecated) The URL used to query the container.
*
* @deprecated URL won't be displayed on v1
*/
url?: pulumi.Input<string | undefined>;
}
/**
* 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 | undefined>;
}
//# sourceMappingURL=containerDomain.d.ts.map