Skip to content

Commit

Permalink
Added non-exclusive queue example
Browse files Browse the repository at this point in the history
  • Loading branch information
bczoma committed Feb 7, 2024
1 parent 51124f2 commit 6367c0c
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Solace PubSub+ Software Event Broker Queue Endpoint Terraform Module

Terraform module to configure a "guaranteed messaging endpoint" or an "endpoint template" on the PubSub+ event broker. Note: "queue endpoint" in the title also refers to all these types as a generic name.
Terraform module to configure a "guaranteed messaging endpoint" or an "endpoint template" on the [Solace PubSub+ Event Broker](https://solace.com/products/event-broker/). Note: "queue endpoint" in the title also refers to all these types as a generic name.

This module supports the configuration of one of the followings:

Expand Down
17 changes: 17 additions & 0 deletions examples/non-exclusive-queue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Non-exclusive queue example

Configuration in [this directory] creates a non-exclusive queue on the PubSub+ event broker leveraging the Queue Endpoint Terraform module.

## Mandatory inputs

* `msg_vpn_name` - set to `default` in the example
* `endpoint_type` - set to `queue`
* `endpoint_name`

While an optional input, `access_type` is set to `non-exclusive` to configure a non-exclusive queue.

## Optional Inputs

Optional module input variables have the same name and defaults if omitted, as the attributes of the underlying provider resource. Refer to the [documentation of `solacebroker_msg_vpn_queue`](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_queue#optional).


26 changes: 26 additions & 0 deletions examples/non-exclusive-queue/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
provider solacebroker {
username = "admin"
password = "admin"
url = "http://localhost:8080"
}

module "non_exclusive_queue" {
source = "../.."

msg_vpn_name = "default"
endpoint_type = "queue"
endpoint_name = "testQ"
access_type = "non-exclusive"

# ingress and egress are enabled by default in the module
# ingress_enabled = true
# egress_enabled = true

# other optional module variables example
permission = "consume"
}

output "provisioned_queue" {
value = module.non_exclusive_queue.queue
}

10 changes: 10 additions & 0 deletions examples/non-exclusive-queue/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Terraform configuration

terraform {
required_providers {
solacebroker = {
source = "registry.terraform.io/solaceproducts/solacebroker"
}
}
required_version = "~> 1.2"
}

0 comments on commit 6367c0c

Please sign in to comment.