scaleway / terraform-provider-scaleway

Terraform Scaleway provider
https://www.terraform.io/docs/providers/scaleway/
Mozilla Public License 2.0
199 stars 123 forks source link

Serverless Functions & Containers: support for NATS triggers #2147

Closed cyclimse closed 10 months ago

cyclimse commented 11 months ago

Community Note

Description

Hey team!

Previously the API only supported SQS triggers. It is now possible to create Scaleway MnQ NATS triggers as well via the API.

This should be more likely added to the scaleway_function_trigger & scaleway_container_trigger resources

See: https://www.scaleway.com/en/developers/api/serverless-containers/#path-triggers-create-a-trigger-body-scwnatsconfig for the API docs

Cheers!

New or Affected Resource(s)

Potential Terraform Configuration

resource scaleway_function_trigger main {
  function_id = scaleway_function.main.id
  name = "my-trigger"
  nats {
    namespace_id = scaleway_mnq_namespace.main.id
    subject = "weather"
    # If project or region is different
    project_id = scaleway_mnq_namespace.main.project_id
    region = scaleway_mnq_namespace.main.region
  }
}

References

cyclimse commented 10 months ago

Closing as this was completed in: https://github.com/scaleway/terraform-provider-scaleway/pull/2174

Thanks again :D!