scaleway.Container
Explore with Pulumi AI
The scaleway.Container
resource allows you to create and manage Serverless Containers.
Refer to the Serverless Containers product documentation and API documentation for more information.
For more information on the limitations of Serverless Containers, refer to the dedicated documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const main = new scaleway.ContainerNamespace("main", {
name: "my-ns-test",
description: "test container",
});
const mainContainer = new scaleway.Container("main", {
name: "my-container-02",
description: "environment variables test",
namespaceId: main.id,
registryImage: pulumi.interpolate`${main.registryEndpoint}/alpine:test`,
port: 9997,
cpuLimit: 140,
memoryLimit: 256,
minScale: 3,
maxScale: 5,
timeout: 600,
maxConcurrency: 80,
privacy: "private",
protocol: "http1",
deploy: true,
environmentVariables: {
foo: "var",
},
secretEnvironmentVariables: {
key: "secret",
},
});
import pulumi
import pulumiverse_scaleway as scaleway
main = scaleway.ContainerNamespace("main",
name="my-ns-test",
description="test container")
main_container = scaleway.Container("main",
name="my-container-02",
description="environment variables test",
namespace_id=main.id,
registry_image=main.registry_endpoint.apply(lambda registry_endpoint: f"{registry_endpoint}/alpine:test"),
port=9997,
cpu_limit=140,
memory_limit=256,
min_scale=3,
max_scale=5,
timeout=600,
max_concurrency=80,
privacy="private",
protocol="http1",
deploy=True,
environment_variables={
"foo": "var",
},
secret_environment_variables={
"key": "secret",
})
package main
import (
"fmt"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
main, err := scaleway.NewContainerNamespace(ctx, "main", &scaleway.ContainerNamespaceArgs{
Name: pulumi.String("my-ns-test"),
Description: pulumi.String("test container"),
})
if err != nil {
return err
}
_, err = scaleway.NewContainer(ctx, "main", &scaleway.ContainerArgs{
Name: pulumi.String("my-container-02"),
Description: pulumi.String("environment variables test"),
NamespaceId: main.ID(),
RegistryImage: main.RegistryEndpoint.ApplyT(func(registryEndpoint string) (string, error) {
return fmt.Sprintf("%v/alpine:test", registryEndpoint), nil
}).(pulumi.StringOutput),
Port: pulumi.Int(9997),
CpuLimit: pulumi.Int(140),
MemoryLimit: pulumi.Int(256),
MinScale: pulumi.Int(3),
MaxScale: pulumi.Int(5),
Timeout: pulumi.Int(600),
MaxConcurrency: pulumi.Int(80),
Privacy: pulumi.String("private"),
Protocol: pulumi.String("http1"),
Deploy: pulumi.Bool(true),
EnvironmentVariables: pulumi.StringMap{
"foo": pulumi.String("var"),
},
SecretEnvironmentVariables: pulumi.StringMap{
"key": pulumi.String("secret"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = new Scaleway.ContainerNamespace("main", new()
{
Name = "my-ns-test",
Description = "test container",
});
var mainContainer = new Scaleway.Container("main", new()
{
Name = "my-container-02",
Description = "environment variables test",
NamespaceId = main.Id,
RegistryImage = main.RegistryEndpoint.Apply(registryEndpoint => $"{registryEndpoint}/alpine:test"),
Port = 9997,
CpuLimit = 140,
MemoryLimit = 256,
MinScale = 3,
MaxScale = 5,
Timeout = 600,
MaxConcurrency = 80,
Privacy = "private",
Protocol = "http1",
Deploy = true,
EnvironmentVariables =
{
{ "foo", "var" },
},
SecretEnvironmentVariables =
{
{ "key", "secret" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.ContainerNamespace;
import com.pulumi.scaleway.ContainerNamespaceArgs;
import com.pulumi.scaleway.Container;
import com.pulumi.scaleway.ContainerArgs;
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) {
var main = new ContainerNamespace("main", ContainerNamespaceArgs.builder()
.name("my-ns-test")
.description("test container")
.build());
var mainContainer = new Container("mainContainer", ContainerArgs.builder()
.name("my-container-02")
.description("environment variables test")
.namespaceId(main.id())
.registryImage(main.registryEndpoint().applyValue(registryEndpoint -> String.format("%s/alpine:test", registryEndpoint)))
.port(9997)
.cpuLimit(140)
.memoryLimit(256)
.minScale(3)
.maxScale(5)
.timeout(600)
.maxConcurrency(80)
.privacy("private")
.protocol("http1")
.deploy(true)
.environmentVariables(Map.of("foo", "var"))
.secretEnvironmentVariables(Map.of("key", "secret"))
.build());
}
}
resources:
main:
type: scaleway:ContainerNamespace
properties:
name: my-ns-test
description: test container
mainContainer:
type: scaleway:Container
name: main
properties:
name: my-container-02
description: environment variables test
namespaceId: ${main.id}
registryImage: ${main.registryEndpoint}/alpine:test
port: 9997
cpuLimit: 140
memoryLimit: 256
minScale: 3
maxScale: 5
timeout: 600
maxConcurrency: 80
privacy: private
protocol: http1
deploy: true
environmentVariables:
foo: var
secretEnvironmentVariables:
key: secret
Protocols
The following protocols are supported:
h2c
: HTTP/2 over TCP.http1
: Hypertext Transfer Protocol.
Important: Refer to the official Apache documentation for more information.
Privacy
By default, creating a container will make it public
, meaning that anybody knowing the endpoint can execute it.
A container can be made private
with the privacy parameter.
Refer to the technical information for more information on container authentication.
Memory and vCPUs configuration
The vCPU represents a portion of the underlying, physical CPU that is assigned to a particular virtual machine (VM).
You can determine the computing resources to allocate to each container.
The memory_limit
(in MB) must correspond with the right amount of vCPU. Refer to the table below to determine the right memory/vCPU combination.
Memory (in MB) | vCPU |
---|---|
128 | 70m |
256 | 140m |
512 | 280m |
1024 | 560m |
2048 | 1120 |
3072 | 1680 |
4096 | 2240 |
~>Important: Make sure to select the right resources, as you will be billed based on compute usage over time and the number of Containers executions. Refer to the Serverless Containers pricing for more information.
Create Container Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Container(name: string, args: ContainerArgs, opts?: CustomResourceOptions);
@overload
def Container(resource_name: str,
args: ContainerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Container(resource_name: str,
opts: Optional[ResourceOptions] = None,
namespace_id: Optional[str] = None,
max_concurrency: Optional[int] = None,
secret_environment_variables: Optional[Mapping[str, str]] = None,
environment_variables: Optional[Mapping[str, str]] = None,
http_option: Optional[str] = None,
cpu_limit: Optional[int] = None,
max_scale: Optional[int] = None,
memory_limit: Optional[int] = None,
port: Optional[int] = None,
timeout: Optional[int] = None,
description: Optional[str] = None,
min_scale: Optional[int] = None,
privacy: Optional[str] = None,
protocol: Optional[str] = None,
region: Optional[str] = None,
registry_image: Optional[str] = None,
registry_sha256: Optional[str] = None,
sandbox: Optional[str] = None,
deploy: Optional[bool] = None,
status: Optional[str] = None,
name: Optional[str] = None)
func NewContainer(ctx *Context, name string, args ContainerArgs, opts ...ResourceOption) (*Container, error)
public Container(string name, ContainerArgs args, CustomResourceOptions? opts = null)
public Container(String name, ContainerArgs args)
public Container(String name, ContainerArgs args, CustomResourceOptions options)
type: scaleway:Container
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ContainerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ContainerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ContainerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContainerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ContainerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var containerResource = new Scaleway.Container("containerResource", new()
{
NamespaceId = "string",
MaxConcurrency = 0,
SecretEnvironmentVariables =
{
{ "string", "string" },
},
EnvironmentVariables =
{
{ "string", "string" },
},
HttpOption = "string",
CpuLimit = 0,
MaxScale = 0,
MemoryLimit = 0,
Port = 0,
Timeout = 0,
Description = "string",
MinScale = 0,
Privacy = "string",
Protocol = "string",
Region = "string",
RegistryImage = "string",
RegistrySha256 = "string",
Sandbox = "string",
Deploy = false,
Status = "string",
Name = "string",
});
example, err := scaleway.NewContainer(ctx, "containerResource", &scaleway.ContainerArgs{
NamespaceId: pulumi.String("string"),
MaxConcurrency: pulumi.Int(0),
SecretEnvironmentVariables: pulumi.StringMap{
"string": pulumi.String("string"),
},
EnvironmentVariables: pulumi.StringMap{
"string": pulumi.String("string"),
},
HttpOption: pulumi.String("string"),
CpuLimit: pulumi.Int(0),
MaxScale: pulumi.Int(0),
MemoryLimit: pulumi.Int(0),
Port: pulumi.Int(0),
Timeout: pulumi.Int(0),
Description: pulumi.String("string"),
MinScale: pulumi.Int(0),
Privacy: pulumi.String("string"),
Protocol: pulumi.String("string"),
Region: pulumi.String("string"),
RegistryImage: pulumi.String("string"),
RegistrySha256: pulumi.String("string"),
Sandbox: pulumi.String("string"),
Deploy: pulumi.Bool(false),
Status: pulumi.String("string"),
Name: pulumi.String("string"),
})
var containerResource = new Container("containerResource", ContainerArgs.builder()
.namespaceId("string")
.maxConcurrency(0)
.secretEnvironmentVariables(Map.of("string", "string"))
.environmentVariables(Map.of("string", "string"))
.httpOption("string")
.cpuLimit(0)
.maxScale(0)
.memoryLimit(0)
.port(0)
.timeout(0)
.description("string")
.minScale(0)
.privacy("string")
.protocol("string")
.region("string")
.registryImage("string")
.registrySha256("string")
.sandbox("string")
.deploy(false)
.status("string")
.name("string")
.build());
container_resource = scaleway.Container("containerResource",
namespace_id="string",
max_concurrency=0,
secret_environment_variables={
"string": "string",
},
environment_variables={
"string": "string",
},
http_option="string",
cpu_limit=0,
max_scale=0,
memory_limit=0,
port=0,
timeout=0,
description="string",
min_scale=0,
privacy="string",
protocol="string",
region="string",
registry_image="string",
registry_sha256="string",
sandbox="string",
deploy=False,
status="string",
name="string")
const containerResource = new scaleway.Container("containerResource", {
namespaceId: "string",
maxConcurrency: 0,
secretEnvironmentVariables: {
string: "string",
},
environmentVariables: {
string: "string",
},
httpOption: "string",
cpuLimit: 0,
maxScale: 0,
memoryLimit: 0,
port: 0,
timeout: 0,
description: "string",
minScale: 0,
privacy: "string",
protocol: "string",
region: "string",
registryImage: "string",
registrySha256: "string",
sandbox: "string",
deploy: false,
status: "string",
name: "string",
});
type: scaleway:Container
properties:
cpuLimit: 0
deploy: false
description: string
environmentVariables:
string: string
httpOption: string
maxConcurrency: 0
maxScale: 0
memoryLimit: 0
minScale: 0
name: string
namespaceId: string
port: 0
privacy: string
protocol: string
region: string
registryImage: string
registrySha256: string
sandbox: string
secretEnvironmentVariables:
string: string
status: string
timeout: 0
Container Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Container resource accepts the following input properties:
- Namespace
Id string The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- Cpu
Limit int - The amount of vCPU computing resources to allocate to each container.
- Deploy bool
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- Description string
- The description of the container.
- Environment
Variables Dictionary<string, string> - The environment variables of the container.
- Http
Option string - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - Max
Concurrency int - The maximum number of simultaneous requests your container can handle at the same time.
- Max
Scale int - The maximum number of instances this container can scale to.
- Memory
Limit int - The memory resources in MB to allocate to each container.
- Min
Scale int - The minimum number of container instances running continuously.
- Name string
- The unique name of the container name.
- Port int
- The port to expose the container.
- Privacy string
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- Protocol string
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - Region string
- (Defaults to provider
region
) The region in which the container was created. - Registry
Image string - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - Registry
Sha256 string - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- Sandbox string
- Execution environment of the container.
- Secret
Environment Dictionary<string, string>Variables - The secret environment variables of the container.
- Status string
- The container status.
- Timeout int
- The maximum amount of time your container can spend processing a request before being stopped.
- Namespace
Id string The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- Cpu
Limit int - The amount of vCPU computing resources to allocate to each container.
- Deploy bool
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- Description string
- The description of the container.
- Environment
Variables map[string]string - The environment variables of the container.
- Http
Option string - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - Max
Concurrency int - The maximum number of simultaneous requests your container can handle at the same time.
- Max
Scale int - The maximum number of instances this container can scale to.
- Memory
Limit int - The memory resources in MB to allocate to each container.
- Min
Scale int - The minimum number of container instances running continuously.
- Name string
- The unique name of the container name.
- Port int
- The port to expose the container.
- Privacy string
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- Protocol string
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - Region string
- (Defaults to provider
region
) The region in which the container was created. - Registry
Image string - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - Registry
Sha256 string - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- Sandbox string
- Execution environment of the container.
- Secret
Environment map[string]stringVariables - The secret environment variables of the container.
- Status string
- The container status.
- Timeout int
- The maximum amount of time your container can spend processing a request before being stopped.
- namespace
Id String The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- cpu
Limit Integer - The amount of vCPU computing resources to allocate to each container.
- deploy Boolean
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- description String
- The description of the container.
- environment
Variables Map<String,String> - The environment variables of the container.
- http
Option String - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - max
Concurrency Integer - The maximum number of simultaneous requests your container can handle at the same time.
- max
Scale Integer - The maximum number of instances this container can scale to.
- memory
Limit Integer - The memory resources in MB to allocate to each container.
- min
Scale Integer - The minimum number of container instances running continuously.
- name String
- The unique name of the container name.
- port Integer
- The port to expose the container.
- privacy String
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- protocol String
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - region String
- (Defaults to provider
region
) The region in which the container was created. - registry
Image String - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - registry
Sha256 String - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- sandbox String
- Execution environment of the container.
- secret
Environment Map<String,String>Variables - The secret environment variables of the container.
- status String
- The container status.
- timeout Integer
- The maximum amount of time your container can spend processing a request before being stopped.
- namespace
Id string The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- cpu
Limit number - The amount of vCPU computing resources to allocate to each container.
- deploy boolean
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- description string
- The description of the container.
- environment
Variables {[key: string]: string} - The environment variables of the container.
- http
Option string - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - max
Concurrency number - The maximum number of simultaneous requests your container can handle at the same time.
- max
Scale number - The maximum number of instances this container can scale to.
- memory
Limit number - The memory resources in MB to allocate to each container.
- min
Scale number - The minimum number of container instances running continuously.
- name string
- The unique name of the container name.
- port number
- The port to expose the container.
- privacy string
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- protocol string
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - region string
- (Defaults to provider
region
) The region in which the container was created. - registry
Image string - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - registry
Sha256 string - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- sandbox string
- Execution environment of the container.
- secret
Environment {[key: string]: string}Variables - The secret environment variables of the container.
- status string
- The container status.
- timeout number
- The maximum amount of time your container can spend processing a request before being stopped.
- namespace_
id str The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- cpu_
limit int - The amount of vCPU computing resources to allocate to each container.
- deploy bool
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- description str
- The description of the container.
- environment_
variables Mapping[str, str] - The environment variables of the container.
- http_
option str - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - max_
concurrency int - The maximum number of simultaneous requests your container can handle at the same time.
- max_
scale int - The maximum number of instances this container can scale to.
- memory_
limit int - The memory resources in MB to allocate to each container.
- min_
scale int - The minimum number of container instances running continuously.
- name str
- The unique name of the container name.
- port int
- The port to expose the container.
- privacy str
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- protocol str
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - region str
- (Defaults to provider
region
) The region in which the container was created. - registry_
image str - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - registry_
sha256 str - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- sandbox str
- Execution environment of the container.
- secret_
environment_ Mapping[str, str]variables - The secret environment variables of the container.
- status str
- The container status.
- timeout int
- The maximum amount of time your container can spend processing a request before being stopped.
- namespace
Id String The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- cpu
Limit Number - The amount of vCPU computing resources to allocate to each container.
- deploy Boolean
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- description String
- The description of the container.
- environment
Variables Map<String> - The environment variables of the container.
- http
Option String - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - max
Concurrency Number - The maximum number of simultaneous requests your container can handle at the same time.
- max
Scale Number - The maximum number of instances this container can scale to.
- memory
Limit Number - The memory resources in MB to allocate to each container.
- min
Scale Number - The minimum number of container instances running continuously.
- name String
- The unique name of the container name.
- port Number
- The port to expose the container.
- privacy String
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- protocol String
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - region String
- (Defaults to provider
region
) The region in which the container was created. - registry
Image String - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - registry
Sha256 String - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- sandbox String
- Execution environment of the container.
- secret
Environment Map<String>Variables - The secret environment variables of the container.
- status String
- The container status.
- timeout Number
- The maximum amount of time your container can spend processing a request before being stopped.
Outputs
All input properties are implicitly available as output properties. Additionally, the Container resource produces the following output properties:
- Cron
Status string - The cron status of the container.
- Domain
Name string - The native domain name of the container
- Error
Message string - The error message of the container.
- Id string
- The provider-assigned unique ID for this managed resource.
- Cron
Status string - The cron status of the container.
- Domain
Name string - The native domain name of the container
- Error
Message string - The error message of the container.
- Id string
- The provider-assigned unique ID for this managed resource.
- cron
Status String - The cron status of the container.
- domain
Name String - The native domain name of the container
- error
Message String - The error message of the container.
- id String
- The provider-assigned unique ID for this managed resource.
- cron
Status string - The cron status of the container.
- domain
Name string - The native domain name of the container
- error
Message string - The error message of the container.
- id string
- The provider-assigned unique ID for this managed resource.
- cron_
status str - The cron status of the container.
- domain_
name str - The native domain name of the container
- error_
message str - The error message of the container.
- id str
- The provider-assigned unique ID for this managed resource.
- cron
Status String - The cron status of the container.
- domain
Name String - The native domain name of the container
- error
Message String - The error message of the container.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Container Resource
Get an existing Container resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ContainerState, opts?: CustomResourceOptions): Container
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cpu_limit: Optional[int] = None,
cron_status: Optional[str] = None,
deploy: Optional[bool] = None,
description: Optional[str] = None,
domain_name: Optional[str] = None,
environment_variables: Optional[Mapping[str, str]] = None,
error_message: Optional[str] = None,
http_option: Optional[str] = None,
max_concurrency: Optional[int] = None,
max_scale: Optional[int] = None,
memory_limit: Optional[int] = None,
min_scale: Optional[int] = None,
name: Optional[str] = None,
namespace_id: Optional[str] = None,
port: Optional[int] = None,
privacy: Optional[str] = None,
protocol: Optional[str] = None,
region: Optional[str] = None,
registry_image: Optional[str] = None,
registry_sha256: Optional[str] = None,
sandbox: Optional[str] = None,
secret_environment_variables: Optional[Mapping[str, str]] = None,
status: Optional[str] = None,
timeout: Optional[int] = None) -> Container
func GetContainer(ctx *Context, name string, id IDInput, state *ContainerState, opts ...ResourceOption) (*Container, error)
public static Container Get(string name, Input<string> id, ContainerState? state, CustomResourceOptions? opts = null)
public static Container get(String name, Output<String> id, ContainerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cpu
Limit int - The amount of vCPU computing resources to allocate to each container.
- Cron
Status string - The cron status of the container.
- Deploy bool
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- Description string
- The description of the container.
- Domain
Name string - The native domain name of the container
- Environment
Variables Dictionary<string, string> - The environment variables of the container.
- Error
Message string - The error message of the container.
- Http
Option string - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - Max
Concurrency int - The maximum number of simultaneous requests your container can handle at the same time.
- Max
Scale int - The maximum number of instances this container can scale to.
- Memory
Limit int - The memory resources in MB to allocate to each container.
- Min
Scale int - The minimum number of container instances running continuously.
- Name string
- The unique name of the container name.
- Namespace
Id string The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- Port int
- The port to expose the container.
- Privacy string
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- Protocol string
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - Region string
- (Defaults to provider
region
) The region in which the container was created. - Registry
Image string - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - Registry
Sha256 string - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- Sandbox string
- Execution environment of the container.
- Secret
Environment Dictionary<string, string>Variables - The secret environment variables of the container.
- Status string
- The container status.
- Timeout int
- The maximum amount of time your container can spend processing a request before being stopped.
- Cpu
Limit int - The amount of vCPU computing resources to allocate to each container.
- Cron
Status string - The cron status of the container.
- Deploy bool
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- Description string
- The description of the container.
- Domain
Name string - The native domain name of the container
- Environment
Variables map[string]string - The environment variables of the container.
- Error
Message string - The error message of the container.
- Http
Option string - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - Max
Concurrency int - The maximum number of simultaneous requests your container can handle at the same time.
- Max
Scale int - The maximum number of instances this container can scale to.
- Memory
Limit int - The memory resources in MB to allocate to each container.
- Min
Scale int - The minimum number of container instances running continuously.
- Name string
- The unique name of the container name.
- Namespace
Id string The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- Port int
- The port to expose the container.
- Privacy string
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- Protocol string
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - Region string
- (Defaults to provider
region
) The region in which the container was created. - Registry
Image string - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - Registry
Sha256 string - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- Sandbox string
- Execution environment of the container.
- Secret
Environment map[string]stringVariables - The secret environment variables of the container.
- Status string
- The container status.
- Timeout int
- The maximum amount of time your container can spend processing a request before being stopped.
- cpu
Limit Integer - The amount of vCPU computing resources to allocate to each container.
- cron
Status String - The cron status of the container.
- deploy Boolean
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- description String
- The description of the container.
- domain
Name String - The native domain name of the container
- environment
Variables Map<String,String> - The environment variables of the container.
- error
Message String - The error message of the container.
- http
Option String - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - max
Concurrency Integer - The maximum number of simultaneous requests your container can handle at the same time.
- max
Scale Integer - The maximum number of instances this container can scale to.
- memory
Limit Integer - The memory resources in MB to allocate to each container.
- min
Scale Integer - The minimum number of container instances running continuously.
- name String
- The unique name of the container name.
- namespace
Id String The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- port Integer
- The port to expose the container.
- privacy String
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- protocol String
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - region String
- (Defaults to provider
region
) The region in which the container was created. - registry
Image String - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - registry
Sha256 String - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- sandbox String
- Execution environment of the container.
- secret
Environment Map<String,String>Variables - The secret environment variables of the container.
- status String
- The container status.
- timeout Integer
- The maximum amount of time your container can spend processing a request before being stopped.
- cpu
Limit number - The amount of vCPU computing resources to allocate to each container.
- cron
Status string - The cron status of the container.
- deploy boolean
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- description string
- The description of the container.
- domain
Name string - The native domain name of the container
- environment
Variables {[key: string]: string} - The environment variables of the container.
- error
Message string - The error message of the container.
- http
Option string - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - max
Concurrency number - The maximum number of simultaneous requests your container can handle at the same time.
- max
Scale number - The maximum number of instances this container can scale to.
- memory
Limit number - The memory resources in MB to allocate to each container.
- min
Scale number - The minimum number of container instances running continuously.
- name string
- The unique name of the container name.
- namespace
Id string The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- port number
- The port to expose the container.
- privacy string
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- protocol string
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - region string
- (Defaults to provider
region
) The region in which the container was created. - registry
Image string - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - registry
Sha256 string - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- sandbox string
- Execution environment of the container.
- secret
Environment {[key: string]: string}Variables - The secret environment variables of the container.
- status string
- The container status.
- timeout number
- The maximum amount of time your container can spend processing a request before being stopped.
- cpu_
limit int - The amount of vCPU computing resources to allocate to each container.
- cron_
status str - The cron status of the container.
- deploy bool
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- description str
- The description of the container.
- domain_
name str - The native domain name of the container
- environment_
variables Mapping[str, str] - The environment variables of the container.
- error_
message str - The error message of the container.
- http_
option str - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - max_
concurrency int - The maximum number of simultaneous requests your container can handle at the same time.
- max_
scale int - The maximum number of instances this container can scale to.
- memory_
limit int - The memory resources in MB to allocate to each container.
- min_
scale int - The minimum number of container instances running continuously.
- name str
- The unique name of the container name.
- namespace_
id str The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- port int
- The port to expose the container.
- privacy str
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- protocol str
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - region str
- (Defaults to provider
region
) The region in which the container was created. - registry_
image str - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - registry_
sha256 str - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- sandbox str
- Execution environment of the container.
- secret_
environment_ Mapping[str, str]variables - The secret environment variables of the container.
- status str
- The container status.
- timeout int
- The maximum amount of time your container can spend processing a request before being stopped.
- cpu
Limit Number - The amount of vCPU computing resources to allocate to each container.
- cron
Status String - The cron status of the container.
- deploy Boolean
Boolean indicating whether the container is in a production environment.
Note that if you want to use your own configuration, you must consult our configuration restrictions section.
- description String
- The description of the container.
- domain
Name String - The native domain name of the container
- environment
Variables Map<String> - The environment variables of the container.
- error
Message String - The error message of the container.
- http
Option String - Allows both HTTP and HTTPS (
enabled
) or redirect HTTP to HTTPS (redirected
). Defaults toenabled
. - max
Concurrency Number - The maximum number of simultaneous requests your container can handle at the same time.
- max
Scale Number - The maximum number of instances this container can scale to.
- memory
Limit Number - The memory resources in MB to allocate to each container.
- min
Scale Number - The minimum number of container instances running continuously.
- name String
- The unique name of the container name.
- namespace
Id String The Containers namespace ID of the container.
Important Updating the
name
argument will recreate the container.- port Number
- The port to expose the container.
- privacy String
- The privacy type defines the way to authenticate to your container. Please check our dedicated section.
- protocol String
- The communication protocol
http1
orh2c
. Defaults tohttp1
. - region String
- (Defaults to provider
region
) The region in which the container was created. - registry
Image String - The registry image address (e.g.,
rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE
) - registry
Sha256 String - The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.
- sandbox String
- Execution environment of the container.
- secret
Environment Map<String>Variables - The secret environment variables of the container.
- status String
- The container status.
- timeout Number
- The maximum amount of time your container can spend processing a request before being stopped.
Import
Containers can be imported using, {region}/{id}
, as shown below:
bash
$ pulumi import scaleway:index/container:Container main fr-par/11111111-1111-1111-1111-111111111111
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.