1. Packages
  2. Scaleway
  3. API Docs
  4. ContainerTrigger
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.ContainerTrigger

Explore with Pulumi AI

Deprecated: scaleway.index/containertrigger.ContainerTrigger has been deprecated in favor of scaleway.containers/trigger.Trigger

The scaleway.containers.Trigger resource allows you to create and manage triggers for Scaleway Serverless Containers.

Refer to the Containers triggers documentation and API documentation for more information.

Example Usage

SQS

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const main = new scaleway.containers.Trigger("main", {
    containerId: mainScalewayContainer.id,
    name: "my-trigger",
    sqs: {
        projectId: mainScalewayMnqSqs.projectId,
        queue: "MyQueue",
        region: mainScalewayMnqSqs.region,
    },
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.containers.Trigger("main",
    container_id=main_scaleway_container["id"],
    name="my-trigger",
    sqs={
        "project_id": main_scaleway_mnq_sqs["projectId"],
        "queue": "MyQueue",
        "region": main_scaleway_mnq_sqs["region"],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/containers"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := containers.NewTrigger(ctx, "main", &containers.TriggerArgs{
			ContainerId: pulumi.Any(mainScalewayContainer.Id),
			Name:        pulumi.String("my-trigger"),
			Sqs: &containers.TriggerSqsArgs{
				ProjectId: pulumi.Any(mainScalewayMnqSqs.ProjectId),
				Queue:     pulumi.String("MyQueue"),
				Region:    pulumi.Any(mainScalewayMnqSqs.Region),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.Containers.Trigger("main", new()
    {
        ContainerId = mainScalewayContainer.Id,
        Name = "my-trigger",
        Sqs = new Scaleway.Containers.Inputs.TriggerSqsArgs
        {
            ProjectId = mainScalewayMnqSqs.ProjectId,
            Queue = "MyQueue",
            Region = mainScalewayMnqSqs.Region,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.containers.Trigger;
import com.pulumi.scaleway.containers.TriggerArgs;
import com.pulumi.scaleway.containers.inputs.TriggerSqsArgs;
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 Trigger("main", TriggerArgs.builder()
            .containerId(mainScalewayContainer.id())
            .name("my-trigger")
            .sqs(TriggerSqsArgs.builder()
                .projectId(mainScalewayMnqSqs.projectId())
                .queue("MyQueue")
                .region(mainScalewayMnqSqs.region())
                .build())
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:containers:Trigger
    properties:
      containerId: ${mainScalewayContainer.id}
      name: my-trigger
      sqs:
        projectId: ${mainScalewayMnqSqs.projectId}
        queue: MyQueue
        region: ${mainScalewayMnqSqs.region}
Copy

NATS

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const main = new scaleway.containers.Trigger("main", {
    containerId: mainScalewayContainer.id,
    name: "my-trigger",
    nats: {
        accountId: mainScalewayMnqNatsAccount.id,
        subject: "MySubject",
        region: mainScalewayMnqNatsAccount.region,
    },
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.containers.Trigger("main",
    container_id=main_scaleway_container["id"],
    name="my-trigger",
    nats={
        "account_id": main_scaleway_mnq_nats_account["id"],
        "subject": "MySubject",
        "region": main_scaleway_mnq_nats_account["region"],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/containers"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := containers.NewTrigger(ctx, "main", &containers.TriggerArgs{
			ContainerId: pulumi.Any(mainScalewayContainer.Id),
			Name:        pulumi.String("my-trigger"),
			Nats: &containers.TriggerNatsArgs{
				AccountId: pulumi.Any(mainScalewayMnqNatsAccount.Id),
				Subject:   pulumi.String("MySubject"),
				Region:    pulumi.Any(mainScalewayMnqNatsAccount.Region),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.Containers.Trigger("main", new()
    {
        ContainerId = mainScalewayContainer.Id,
        Name = "my-trigger",
        Nats = new Scaleway.Containers.Inputs.TriggerNatsArgs
        {
            AccountId = mainScalewayMnqNatsAccount.Id,
            Subject = "MySubject",
            Region = mainScalewayMnqNatsAccount.Region,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.containers.Trigger;
import com.pulumi.scaleway.containers.TriggerArgs;
import com.pulumi.scaleway.containers.inputs.TriggerNatsArgs;
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 Trigger("main", TriggerArgs.builder()
            .containerId(mainScalewayContainer.id())
            .name("my-trigger")
            .nats(TriggerNatsArgs.builder()
                .accountId(mainScalewayMnqNatsAccount.id())
                .subject("MySubject")
                .region(mainScalewayMnqNatsAccount.region())
                .build())
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:containers:Trigger
    properties:
      containerId: ${mainScalewayContainer.id}
      name: my-trigger
      nats:
        accountId: ${mainScalewayMnqNatsAccount.id}
        subject: MySubject
        region: ${mainScalewayMnqNatsAccount.region}
Copy

Create ContainerTrigger Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ContainerTrigger(name: string, args: ContainerTriggerArgs, opts?: CustomResourceOptions);
@overload
def ContainerTrigger(resource_name: str,
                     args: ContainerTriggerArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def ContainerTrigger(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     container_id: Optional[str] = None,
                     description: Optional[str] = None,
                     name: Optional[str] = None,
                     nats: Optional[ContainerTriggerNatsArgs] = None,
                     region: Optional[str] = None,
                     sqs: Optional[ContainerTriggerSqsArgs] = None)
func NewContainerTrigger(ctx *Context, name string, args ContainerTriggerArgs, opts ...ResourceOption) (*ContainerTrigger, error)
public ContainerTrigger(string name, ContainerTriggerArgs args, CustomResourceOptions? opts = null)
public ContainerTrigger(String name, ContainerTriggerArgs args)
public ContainerTrigger(String name, ContainerTriggerArgs args, CustomResourceOptions options)
type: scaleway:ContainerTrigger
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ContainerTriggerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ContainerTriggerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ContainerTriggerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ContainerTriggerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ContainerTriggerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ContainerTrigger 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 ContainerTrigger resource accepts the following input properties:

ContainerId This property is required. string
The unique identifier of the container to create a trigger for.
Description string
The description of the trigger.
Name string
The unique name of the trigger. If not provided, a random name is generated.
Nats Changes to this property will trigger replacement. Pulumiverse.Scaleway.Inputs.ContainerTriggerNats
The configuration for the Scaleway NATS account used by the trigger
Region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
Sqs Changes to this property will trigger replacement. Pulumiverse.Scaleway.Inputs.ContainerTriggerSqs
The configuration of the Scaleway SQS queue used by the trigger
ContainerId This property is required. string
The unique identifier of the container to create a trigger for.
Description string
The description of the trigger.
Name string
The unique name of the trigger. If not provided, a random name is generated.
Nats Changes to this property will trigger replacement. ContainerTriggerNatsArgs
The configuration for the Scaleway NATS account used by the trigger
Region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
Sqs Changes to this property will trigger replacement. ContainerTriggerSqsArgs
The configuration of the Scaleway SQS queue used by the trigger
containerId This property is required. String
The unique identifier of the container to create a trigger for.
description String
The description of the trigger.
name String
The unique name of the trigger. If not provided, a random name is generated.
nats Changes to this property will trigger replacement. ContainerTriggerNats
The configuration for the Scaleway NATS account used by the trigger
region Changes to this property will trigger replacement. String
region). The region in which the namespace is created.
sqs Changes to this property will trigger replacement. ContainerTriggerSqs
The configuration of the Scaleway SQS queue used by the trigger
containerId This property is required. string
The unique identifier of the container to create a trigger for.
description string
The description of the trigger.
name string
The unique name of the trigger. If not provided, a random name is generated.
nats Changes to this property will trigger replacement. ContainerTriggerNats
The configuration for the Scaleway NATS account used by the trigger
region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
sqs Changes to this property will trigger replacement. ContainerTriggerSqs
The configuration of the Scaleway SQS queue used by the trigger
container_id This property is required. str
The unique identifier of the container to create a trigger for.
description str
The description of the trigger.
name str
The unique name of the trigger. If not provided, a random name is generated.
nats Changes to this property will trigger replacement. ContainerTriggerNatsArgs
The configuration for the Scaleway NATS account used by the trigger
region Changes to this property will trigger replacement. str
region). The region in which the namespace is created.
sqs Changes to this property will trigger replacement. ContainerTriggerSqsArgs
The configuration of the Scaleway SQS queue used by the trigger
containerId This property is required. String
The unique identifier of the container to create a trigger for.
description String
The description of the trigger.
name String
The unique name of the trigger. If not provided, a random name is generated.
nats Changes to this property will trigger replacement. Property Map
The configuration for the Scaleway NATS account used by the trigger
region Changes to this property will trigger replacement. String
region). The region in which the namespace is created.
sqs Changes to this property will trigger replacement. Property Map
The configuration of the Scaleway SQS queue used by the trigger

Outputs

All input properties are implicitly available as output properties. Additionally, the ContainerTrigger resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ContainerTrigger Resource

Get an existing ContainerTrigger 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?: ContainerTriggerState, opts?: CustomResourceOptions): ContainerTrigger
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        container_id: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        nats: Optional[ContainerTriggerNatsArgs] = None,
        region: Optional[str] = None,
        sqs: Optional[ContainerTriggerSqsArgs] = None) -> ContainerTrigger
func GetContainerTrigger(ctx *Context, name string, id IDInput, state *ContainerTriggerState, opts ...ResourceOption) (*ContainerTrigger, error)
public static ContainerTrigger Get(string name, Input<string> id, ContainerTriggerState? state, CustomResourceOptions? opts = null)
public static ContainerTrigger get(String name, Output<String> id, ContainerTriggerState state, CustomResourceOptions options)
resources:  _:    type: scaleway:ContainerTrigger    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
ContainerId string
The unique identifier of the container to create a trigger for.
Description string
The description of the trigger.
Name string
The unique name of the trigger. If not provided, a random name is generated.
Nats Changes to this property will trigger replacement. Pulumiverse.Scaleway.Inputs.ContainerTriggerNats
The configuration for the Scaleway NATS account used by the trigger
Region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
Sqs Changes to this property will trigger replacement. Pulumiverse.Scaleway.Inputs.ContainerTriggerSqs
The configuration of the Scaleway SQS queue used by the trigger
ContainerId string
The unique identifier of the container to create a trigger for.
Description string
The description of the trigger.
Name string
The unique name of the trigger. If not provided, a random name is generated.
Nats Changes to this property will trigger replacement. ContainerTriggerNatsArgs
The configuration for the Scaleway NATS account used by the trigger
Region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
Sqs Changes to this property will trigger replacement. ContainerTriggerSqsArgs
The configuration of the Scaleway SQS queue used by the trigger
containerId String
The unique identifier of the container to create a trigger for.
description String
The description of the trigger.
name String
The unique name of the trigger. If not provided, a random name is generated.
nats Changes to this property will trigger replacement. ContainerTriggerNats
The configuration for the Scaleway NATS account used by the trigger
region Changes to this property will trigger replacement. String
region). The region in which the namespace is created.
sqs Changes to this property will trigger replacement. ContainerTriggerSqs
The configuration of the Scaleway SQS queue used by the trigger
containerId string
The unique identifier of the container to create a trigger for.
description string
The description of the trigger.
name string
The unique name of the trigger. If not provided, a random name is generated.
nats Changes to this property will trigger replacement. ContainerTriggerNats
The configuration for the Scaleway NATS account used by the trigger
region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
sqs Changes to this property will trigger replacement. ContainerTriggerSqs
The configuration of the Scaleway SQS queue used by the trigger
container_id str
The unique identifier of the container to create a trigger for.
description str
The description of the trigger.
name str
The unique name of the trigger. If not provided, a random name is generated.
nats Changes to this property will trigger replacement. ContainerTriggerNatsArgs
The configuration for the Scaleway NATS account used by the trigger
region Changes to this property will trigger replacement. str
region). The region in which the namespace is created.
sqs Changes to this property will trigger replacement. ContainerTriggerSqsArgs
The configuration of the Scaleway SQS queue used by the trigger
containerId String
The unique identifier of the container to create a trigger for.
description String
The description of the trigger.
name String
The unique name of the trigger. If not provided, a random name is generated.
nats Changes to this property will trigger replacement. Property Map
The configuration for the Scaleway NATS account used by the trigger
region Changes to this property will trigger replacement. String
region). The region in which the namespace is created.
sqs Changes to this property will trigger replacement. Property Map
The configuration of the Scaleway SQS queue used by the trigger

Supporting Types

ContainerTriggerNats
, ContainerTriggerNatsArgs

Subject
This property is required.
Changes to this property will trigger replacement.
string
The subject to listen to.
AccountId Changes to this property will trigger replacement. string
unique identifier of the Messaging and Queuing NATS account.
ProjectId Changes to this property will trigger replacement. string
THe ID of the project that contains the Messaging and Queuing NATS account (defaults to provider project_id)
Region Changes to this property will trigger replacement. string
Region where the Messaging and Queuing NATS account is enabled (defaults to provider region)
Subject
This property is required.
Changes to this property will trigger replacement.
string
The subject to listen to.
AccountId Changes to this property will trigger replacement. string
unique identifier of the Messaging and Queuing NATS account.
ProjectId Changes to this property will trigger replacement. string
THe ID of the project that contains the Messaging and Queuing NATS account (defaults to provider project_id)
Region Changes to this property will trigger replacement. string
Region where the Messaging and Queuing NATS account is enabled (defaults to provider region)
subject
This property is required.
Changes to this property will trigger replacement.
String
The subject to listen to.
accountId Changes to this property will trigger replacement. String
unique identifier of the Messaging and Queuing NATS account.
projectId Changes to this property will trigger replacement. String
THe ID of the project that contains the Messaging and Queuing NATS account (defaults to provider project_id)
region Changes to this property will trigger replacement. String
Region where the Messaging and Queuing NATS account is enabled (defaults to provider region)
subject
This property is required.
Changes to this property will trigger replacement.
string
The subject to listen to.
accountId Changes to this property will trigger replacement. string
unique identifier of the Messaging and Queuing NATS account.
projectId Changes to this property will trigger replacement. string
THe ID of the project that contains the Messaging and Queuing NATS account (defaults to provider project_id)
region Changes to this property will trigger replacement. string
Region where the Messaging and Queuing NATS account is enabled (defaults to provider region)
subject
This property is required.
Changes to this property will trigger replacement.
str
The subject to listen to.
account_id Changes to this property will trigger replacement. str
unique identifier of the Messaging and Queuing NATS account.
project_id Changes to this property will trigger replacement. str
THe ID of the project that contains the Messaging and Queuing NATS account (defaults to provider project_id)
region Changes to this property will trigger replacement. str
Region where the Messaging and Queuing NATS account is enabled (defaults to provider region)
subject
This property is required.
Changes to this property will trigger replacement.
String
The subject to listen to.
accountId Changes to this property will trigger replacement. String
unique identifier of the Messaging and Queuing NATS account.
projectId Changes to this property will trigger replacement. String
THe ID of the project that contains the Messaging and Queuing NATS account (defaults to provider project_id)
region Changes to this property will trigger replacement. String
Region where the Messaging and Queuing NATS account is enabled (defaults to provider region)

ContainerTriggerSqs
, ContainerTriggerSqsArgs

Queue
This property is required.
Changes to this property will trigger replacement.
string
The name of the SQS queue.
NamespaceId string
ID of the Messaging and Queuing namespace. This argument is deprecated.

Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

ProjectId Changes to this property will trigger replacement. string
The ID of the project in which SQS is enabled, (defaults to provider project_id)
Region Changes to this property will trigger replacement. string
Region where SQS is enabled (defaults to provider region)
Queue
This property is required.
Changes to this property will trigger replacement.
string
The name of the SQS queue.
NamespaceId string
ID of the Messaging and Queuing namespace. This argument is deprecated.

Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

ProjectId Changes to this property will trigger replacement. string
The ID of the project in which SQS is enabled, (defaults to provider project_id)
Region Changes to this property will trigger replacement. string
Region where SQS is enabled (defaults to provider region)
queue
This property is required.
Changes to this property will trigger replacement.
String
The name of the SQS queue.
namespaceId String
ID of the Messaging and Queuing namespace. This argument is deprecated.

Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

projectId Changes to this property will trigger replacement. String
The ID of the project in which SQS is enabled, (defaults to provider project_id)
region Changes to this property will trigger replacement. String
Region where SQS is enabled (defaults to provider region)
queue
This property is required.
Changes to this property will trigger replacement.
string
The name of the SQS queue.
namespaceId string
ID of the Messaging and Queuing namespace. This argument is deprecated.

Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

projectId Changes to this property will trigger replacement. string
The ID of the project in which SQS is enabled, (defaults to provider project_id)
region Changes to this property will trigger replacement. string
Region where SQS is enabled (defaults to provider region)
queue
This property is required.
Changes to this property will trigger replacement.
str
The name of the SQS queue.
namespace_id str
ID of the Messaging and Queuing namespace. This argument is deprecated.

Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

project_id Changes to this property will trigger replacement. str
The ID of the project in which SQS is enabled, (defaults to provider project_id)
region Changes to this property will trigger replacement. str
Region where SQS is enabled (defaults to provider region)
queue
This property is required.
Changes to this property will trigger replacement.
String
The name of the SQS queue.
namespaceId String
ID of the Messaging and Queuing namespace. This argument is deprecated.

Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

projectId Changes to this property will trigger replacement. String
The ID of the project in which SQS is enabled, (defaults to provider project_id)
region Changes to this property will trigger replacement. String
Region where SQS is enabled (defaults to provider region)

Import

Container Triggers can be imported using {region}/{id}, as shown below:

bash

$ pulumi import scaleway:index/containerTrigger:ContainerTrigger main fr-par/11111111-1111-1111-1111-111111111111
Copy

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.