subcategory | page_title |
---|---|
Containers |
Scaleway: scaleway_container_trigger |
Creates and manages Scaleway Container Triggers. For more information see the documentation.
resource scaleway_container_trigger main {
container_id = scaleway_container.main.id
name = "my-trigger"
sqs {
project_id = scaleway_mnq_sqs.main.project_id
queue = "MyQueue"
# If region is different
region = scaleway_mnq_sqs.main.region
}
}
resource scaleway_container_trigger main {
container_id = scaleway_container.main.id
name = "my-trigger"
nats {
account_id = scaleway_mnq_nats_account.main.id
subject = "MySubject"
# If region is different
region = scaleway_mnq_nats_account.main.region
}
}
The following arguments are supported:
-
container_id
(Required) The ID of the container to create a trigger for -
name
- (Optional) The unique name of the trigger. Default to a generated name. -
description
(Optional) The description of the trigger. -
sqs
The configuration of the Scaleway's SQS used by the triggernamespace_id
(Deprecated) ID of the mnq namespace. Deprecated.queue
(Required) Name of the queueproject_id
(Optional) ID of the project where sqs is enabled, defaults to provider's projectregion
(Optional) Region where sqs is enabled, defaults to provider's region
-
nats
The configuration for the Scaleway's Nats used by the triggeraccount_id
(Required) ID of the mnq nats account.subject
(Required) The subject to listen toproject_id
(Optional) ID of the project that contain the mnq nats account, defaults to provider's projectregion
(Optional) Region where the mnq nats account is, defaults to provider's region
-
region
- (Defaults to providerregion
). The region in which the namespace should be created.
In addition to all arguments above, the following attributes are exported:
-
id
- The ID of the container trigger -
~> Important: Container Triggers' IDs are regional, which means they are of the form
{region}/{id}
, e.g.fr-par/11111111-1111-1111-1111-111111111111
Container Triggers can be imported using the {region}/{id}
, e.g.
$ terraform import scaleway_container_trigger.main fr-par/11111111-1111-1111-1111-111111111111