scaleway.getContainer
Explore with Pulumi AI
Gets information about the Scaleway Container.
For more information consult the documentation.
For more details about the limitation check containers-limitations.
You can check also our containers guide.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";
const mainContainerNamespace = new scaleway.ContainerNamespace("mainContainerNamespace", {});
const mainContainer = new scaleway.Container("mainContainer", {namespaceId: mainContainerNamespace.id});
const byName = scaleway.getContainerOutput({
    namespaceId: mainContainerNamespace.id,
    name: mainContainer.name,
});
const byId = scaleway.getContainerOutput({
    namespaceId: mainContainerNamespace.id,
    containerId: mainContainer.id,
});
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway
main_container_namespace = scaleway.ContainerNamespace("mainContainerNamespace")
main_container = scaleway.Container("mainContainer", namespace_id=main_container_namespace.id)
by_name = scaleway.get_container_output(namespace_id=main_container_namespace.id,
    name=main_container.name)
by_id = scaleway.get_container_output(namespace_id=main_container_namespace.id,
    container_id=main_container.id)
package main
import (
	"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 {
		mainContainerNamespace, err := scaleway.NewContainerNamespace(ctx, "mainContainerNamespace", nil)
		if err != nil {
			return err
		}
		mainContainer, err := scaleway.NewContainer(ctx, "mainContainer", &scaleway.ContainerArgs{
			NamespaceId: mainContainerNamespace.ID(),
		})
		if err != nil {
			return err
		}
		_ = scaleway.LookupContainerOutput(ctx, scaleway.GetContainerOutputArgs{
			NamespaceId: mainContainerNamespace.ID(),
			Name:        mainContainer.Name,
		}, nil)
		_ = scaleway.LookupContainerOutput(ctx, scaleway.GetContainerOutputArgs{
			NamespaceId: mainContainerNamespace.ID(),
			ContainerId: mainContainer.ID(),
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() => 
{
    var mainContainerNamespace = new Scaleway.ContainerNamespace("mainContainerNamespace");
    var mainContainer = new Scaleway.Container("mainContainer", new()
    {
        NamespaceId = mainContainerNamespace.Id,
    });
    var byName = Scaleway.GetContainer.Invoke(new()
    {
        NamespaceId = mainContainerNamespace.Id,
        Name = mainContainer.Name,
    });
    var byId = Scaleway.GetContainer.Invoke(new()
    {
        NamespaceId = mainContainerNamespace.Id,
        ContainerId = mainContainer.Id,
    });
});
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.Container;
import com.pulumi.scaleway.ContainerArgs;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetContainerArgs;
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 mainContainerNamespace = new ContainerNamespace("mainContainerNamespace");
        var mainContainer = new Container("mainContainer", ContainerArgs.builder()        
            .namespaceId(mainContainerNamespace.id())
            .build());
        final var byName = ScalewayFunctions.getContainer(GetContainerArgs.builder()
            .namespaceId(mainContainerNamespace.id())
            .name(mainContainer.name())
            .build());
        final var byId = ScalewayFunctions.getContainer(GetContainerArgs.builder()
            .namespaceId(mainContainerNamespace.id())
            .containerId(mainContainer.id())
            .build());
    }
}
resources:
  mainContainerNamespace:
    type: scaleway:ContainerNamespace
  mainContainer:
    type: scaleway:Container
    properties:
      namespaceId: ${mainContainerNamespace.id}
variables:
  byName:
    fn::invoke:
      Function: scaleway:getContainer
      Arguments:
        namespaceId: ${mainContainerNamespace.id}
        name: ${mainContainer.name}
  byId:
    fn::invoke:
      Function: scaleway:getContainer
      Arguments:
        namespaceId: ${mainContainerNamespace.id}
        containerId: ${mainContainer.id}
Using getContainer
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getContainer(args: GetContainerArgs, opts?: InvokeOptions): Promise<GetContainerResult>
function getContainerOutput(args: GetContainerOutputArgs, opts?: InvokeOptions): Output<GetContainerResult>def get_container(container_id: Optional[str] = None,
                  name: Optional[str] = None,
                  namespace_id: Optional[str] = None,
                  project_id: Optional[str] = None,
                  region: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetContainerResult
def get_container_output(container_id: Optional[pulumi.Input[str]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  namespace_id: Optional[pulumi.Input[str]] = None,
                  project_id: Optional[pulumi.Input[str]] = None,
                  region: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetContainerResult]func LookupContainer(ctx *Context, args *LookupContainerArgs, opts ...InvokeOption) (*LookupContainerResult, error)
func LookupContainerOutput(ctx *Context, args *LookupContainerOutputArgs, opts ...InvokeOption) LookupContainerResultOutput> Note: This function is named LookupContainer in the Go SDK.
public static class GetContainer 
{
    public static Task<GetContainerResult> InvokeAsync(GetContainerArgs args, InvokeOptions? opts = null)
    public static Output<GetContainerResult> Invoke(GetContainerInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetContainerResult> getContainer(GetContainerArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: scaleway:index/getContainer:getContainer
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Namespace
Id string - The container namespace ID of the container.
 - Container
Id string - Name string
 - The unique name of the container name.
 - Project
Id string The ID of the project the container is associated with.
Important Updates to
namewill recreate the container.- Region string
 - (Defaults to provider 
region) The region in which the container was created. 
- Namespace
Id string - The container namespace ID of the container.
 - Container
Id string - Name string
 - The unique name of the container name.
 - Project
Id string The ID of the project the container is associated with.
Important Updates to
namewill recreate the container.- Region string
 - (Defaults to provider 
region) The region in which the container was created. 
- namespace
Id String - The container namespace ID of the container.
 - container
Id String - name String
 - The unique name of the container name.
 - project
Id String The ID of the project the container is associated with.
Important Updates to
namewill recreate the container.- region String
 - (Defaults to provider 
region) The region in which the container was created. 
- namespace
Id string - The container namespace ID of the container.
 - container
Id string - name string
 - The unique name of the container name.
 - project
Id string The ID of the project the container is associated with.
Important Updates to
namewill recreate the container.- region string
 - (Defaults to provider 
region) The region in which the container was created. 
- namespace_
id str - The container namespace ID of the container.
 - container_
id str - name str
 - The unique name of the container name.
 - project_
id str The ID of the project the container is associated with.
Important Updates to
namewill recreate the container.- region str
 - (Defaults to provider 
region) The region in which the container was created. 
- namespace
Id String - The container namespace ID of the container.
 - container
Id String - name String
 - The unique name of the container name.
 - project
Id String The ID of the project the container is associated with.
Important Updates to
namewill recreate the container.- region String
 - (Defaults to provider 
region) The region in which the container was created. 
getContainer Result
The following output properties are available:
- Cpu
Limit int - The amount of vCPU computing resources to allocate to each container. Defaults to 70.
 - Cron
Status string - The cron status of the container.
 - Deploy bool
 - Boolean indicating whether the container is on a production environment.
 - Description string
 - The description of the container.
 - Domain
Name string - The container domain name.
 - Environment
Variables Dictionary<string, string> - The environment variables of the container.
 - Error
Message string - The error message of the container.
 - Http
Option string - Id string
 - The provider-assigned unique ID for this managed resource.
 - Max
Concurrency int - The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.
 - Max
Scale int - The maximum of number of instances this container can scale to. Default to 20.
 - Memory
Limit int - The memory computing resources in MB to allocate to each container. Defaults to 128.
 - Min
Scale int - The minimum of running container instances continuously. Defaults to 0.
 - Namespace
Id string - Port int
 - The port to expose the container. Defaults to 8080.
 - Privacy string
 - The privacy type define the way to authenticate to your container. Please check our dedicated section.
 - Protocol string
 - The communication protocol http1 or h2c. Defaults to http1.
 - 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.
 - Secret
Environment Dictionary<string, string>Variables  - Status string
 - The container status.
 - Timeout int
 - The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.
 - Container
Id string - Name string
 - Project
Id string - Region string
 - (Defaults to provider 
region) The region in which the container was created. 
- Cpu
Limit int - The amount of vCPU computing resources to allocate to each container. Defaults to 70.
 - Cron
Status string - The cron status of the container.
 - Deploy bool
 - Boolean indicating whether the container is on a production environment.
 - Description string
 - The description of the container.
 - Domain
Name string - The container domain name.
 - Environment
Variables map[string]string - The environment variables of the container.
 - Error
Message string - The error message of the container.
 - Http
Option string - Id string
 - The provider-assigned unique ID for this managed resource.
 - Max
Concurrency int - The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.
 - Max
Scale int - The maximum of number of instances this container can scale to. Default to 20.
 - Memory
Limit int - The memory computing resources in MB to allocate to each container. Defaults to 128.
 - Min
Scale int - The minimum of running container instances continuously. Defaults to 0.
 - Namespace
Id string - Port int
 - The port to expose the container. Defaults to 8080.
 - Privacy string
 - The privacy type define the way to authenticate to your container. Please check our dedicated section.
 - Protocol string
 - The communication protocol http1 or h2c. Defaults to http1.
 - 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.
 - Secret
Environment map[string]stringVariables  - Status string
 - The container status.
 - Timeout int
 - The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.
 - Container
Id string - Name string
 - Project
Id string - Region string
 - (Defaults to provider 
region) The region in which the container was created. 
- cpu
Limit Integer - The amount of vCPU computing resources to allocate to each container. Defaults to 70.
 - cron
Status String - The cron status of the container.
 - deploy Boolean
 - Boolean indicating whether the container is on a production environment.
 - description String
 - The description of the container.
 - domain
Name String - The container domain name.
 - environment
Variables Map<String,String> - The environment variables of the container.
 - error
Message String - The error message of the container.
 - http
Option String - id String
 - The provider-assigned unique ID for this managed resource.
 - max
Concurrency Integer - The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.
 - max
Scale Integer - The maximum of number of instances this container can scale to. Default to 20.
 - memory
Limit Integer - The memory computing resources in MB to allocate to each container. Defaults to 128.
 - min
Scale Integer - The minimum of running container instances continuously. Defaults to 0.
 - namespace
Id String - port Integer
 - The port to expose the container. Defaults to 8080.
 - privacy String
 - The privacy type define the way to authenticate to your container. Please check our dedicated section.
 - protocol String
 - The communication protocol http1 or h2c. Defaults to http1.
 - 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.
 - secret
Environment Map<String,String>Variables  - status String
 - The container status.
 - timeout Integer
 - The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.
 - container
Id String - name String
 - project
Id String - region String
 - (Defaults to provider 
region) The region in which the container was created. 
- cpu
Limit number - The amount of vCPU computing resources to allocate to each container. Defaults to 70.
 - cron
Status string - The cron status of the container.
 - deploy boolean
 - Boolean indicating whether the container is on a production environment.
 - description string
 - The description of the container.
 - domain
Name string - The container domain name.
 - environment
Variables {[key: string]: string} - The environment variables of the container.
 - error
Message string - The error message of the container.
 - http
Option string - id string
 - The provider-assigned unique ID for this managed resource.
 - max
Concurrency number - The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.
 - max
Scale number - The maximum of number of instances this container can scale to. Default to 20.
 - memory
Limit number - The memory computing resources in MB to allocate to each container. Defaults to 128.
 - min
Scale number - The minimum of running container instances continuously. Defaults to 0.
 - namespace
Id string - port number
 - The port to expose the container. Defaults to 8080.
 - privacy string
 - The privacy type define the way to authenticate to your container. Please check our dedicated section.
 - protocol string
 - The communication protocol http1 or h2c. Defaults to http1.
 - 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.
 - secret
Environment {[key: string]: string}Variables  - status string
 - The container status.
 - timeout number
 - The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.
 - container
Id string - name string
 - project
Id string - region string
 - (Defaults to provider 
region) The region in which the container was created. 
- cpu_
limit int - The amount of vCPU computing resources to allocate to each container. Defaults to 70.
 - cron_
status str - The cron status of the container.
 - deploy bool
 - Boolean indicating whether the container is on a production environment.
 - description str
 - The description of the container.
 - domain_
name str - The container domain name.
 - environment_
variables Mapping[str, str] - The environment variables of the container.
 - error_
message str - The error message of the container.
 - http_
option str - id str
 - The provider-assigned unique ID for this managed resource.
 - max_
concurrency int - The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.
 - max_
scale int - The maximum of number of instances this container can scale to. Default to 20.
 - memory_
limit int - The memory computing resources in MB to allocate to each container. Defaults to 128.
 - min_
scale int - The minimum of running container instances continuously. Defaults to 0.
 - namespace_
id str - port int
 - The port to expose the container. Defaults to 8080.
 - privacy str
 - The privacy type define the way to authenticate to your container. Please check our dedicated section.
 - protocol str
 - The communication protocol http1 or h2c. Defaults to http1.
 - 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.
 - secret_
environment_ Mapping[str, str]variables  - status str
 - The container status.
 - timeout int
 - The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.
 - container_
id str - name str
 - project_
id str - region str
 - (Defaults to provider 
region) The region in which the container was created. 
- cpu
Limit Number - The amount of vCPU computing resources to allocate to each container. Defaults to 70.
 - cron
Status String - The cron status of the container.
 - deploy Boolean
 - Boolean indicating whether the container is on a production environment.
 - description String
 - The description of the container.
 - domain
Name String - The container domain name.
 - environment
Variables Map<String> - The environment variables of the container.
 - error
Message String - The error message of the container.
 - http
Option String - id String
 - The provider-assigned unique ID for this managed resource.
 - max
Concurrency Number - The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.
 - max
Scale Number - The maximum of number of instances this container can scale to. Default to 20.
 - memory
Limit Number - The memory computing resources in MB to allocate to each container. Defaults to 128.
 - min
Scale Number - The minimum of running container instances continuously. Defaults to 0.
 - namespace
Id String - port Number
 - The port to expose the container. Defaults to 8080.
 - privacy String
 - The privacy type define the way to authenticate to your container. Please check our dedicated section.
 - protocol String
 - The communication protocol http1 or h2c. Defaults to http1.
 - 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.
 - secret
Environment Map<String>Variables  - status String
 - The container status.
 - timeout Number
 - The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.
 - container
Id String - name String
 - project
Id String - region String
 - (Defaults to provider 
region) The region in which the container was created. 
Package Details
- Repository
 - scaleway pulumiverse/pulumi-scaleway
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
scalewayTerraform Provider.