-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
82 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
# .tfstate files | ||
*.tfstate | ||
*.tfstate.* | ||
*.lock.hcl | ||
|
||
# Crash log files | ||
crash.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,54 @@ | ||
# Copyright 2024 Solace Corporation. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
provider "solacebroker" { | ||
username = "admin" | ||
password = "admin" | ||
url = "http://localhost:8080" | ||
} | ||
|
||
module "testcf" { | ||
# update with the module location | ||
source = "../.." | ||
# The RDP requires a queue to bind to. | ||
# Recommended: Use the queue-endpoint module to create the queue | ||
# TODO: Uncomment the following block and replace the resource block once the queue-endpoint module is available | ||
# module "rdp_queue" { | ||
# source = SolaceProducts/queue-endpoint/solacebroker | ||
# | ||
# msg_vpn_name = "default" | ||
# endpoint_type = "queue" | ||
# endpoint_name = "my_queue" | ||
# | ||
# # The REST delivery point must have permission to consume messages from the queue | ||
# # — to achieve this, either the queue’s owner must be set to `#rdp/<rest_delivery_point_name>` | ||
# # owner = "#rdp/my_rdp" | ||
# # or the queue’s permissions for non-owner clients must be set to at least `consume` level access | ||
# permission = "consume" | ||
# | ||
# # The queue must also be enabled for ingress and egress, which is the default for the rdp_queue module | ||
# } | ||
resource "solacebroker_msg_vpn_queue" "rdp_queue" { | ||
msg_vpn_name = "default" | ||
queue_name = "my_queue" | ||
permission = "consume" | ||
ingress_enabled = true | ||
egress_enabled = true | ||
} | ||
|
||
module "testrdp" { | ||
source = "../.." | ||
|
||
msg_vpn_name = "default" | ||
connection_factory_name = "/JNDI/CF/GettingStarted" | ||
rest_delivery_point_name = "basic_rdp" | ||
url = "https://example.com/test" | ||
# queue_name = module.rdp_queue.queue.queue_name | ||
queue_name = solacebroker_msg_vpn_queue.rdp_queue.queue_name | ||
} | ||
|
||
output "provisioned_connection_factory" { | ||
value = module.testcf.connection_factory | ||
description = "The provisioned connection factory" | ||
output "rdp" { | ||
value = module.testrdp.rest_delivery_point | ||
} | ||
|
||
# Note that for a non-XA connection factory the output module.testcf.xa_connection_factory is null | ||
output "consumer" { | ||
value = module.testrdp.rest_consumer | ||
sensitive = true | ||
} | ||
|
||
output "queue_binding" { | ||
value = module.testrdp.queue_binding | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters