From c532c52dc86de04c41589eaa63e8dca651c85917 Mon Sep 17 00:00:00 2001 From: Balazs Czoma Date: Thu, 7 Mar 2024 04:31:38 -0500 Subject: [PATCH 1/8] Allow upper case letters in URL protocol scheme --- VERSION | 2 +- ci/template-test/main.tf | 2 +- internal/gen-template/variables.tf | 2 +- variables.tf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 0d15162..9ad3f36 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.0-rc.3 +0.1.0-rc.4 diff --git a/ci/template-test/main.tf b/ci/template-test/main.tf index ebe1dc0..f683194 100644 --- a/ci/template-test/main.tf +++ b/ci/template-test/main.tf @@ -67,7 +67,7 @@ module "testrdp2" { msg_vpn_name = "default" queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name - url = "http://[2001:db8:3333:4444:5555:6666:7777:8888]:12345/$${msgId()}" + url = "HTTP://[2001:db8:3333:4444:5555:6666:7777:8888]:12345/$${msgId()}" rest_delivery_point_name = "my_rdp2" request_headers = module.testrdp.request_headers protected_request_headers = module.testrdp.protected_request_headers diff --git a/internal/gen-template/variables.tf b/internal/gen-template/variables.tf index 084e84b..7fe8ae2 100644 --- a/internal/gen-template/variables.tf +++ b/internal/gen-template/variables.tf @@ -11,7 +11,7 @@ variable "url" { description = "The URL that the messages should be delivered to. The path portion of the URL may contain substitution expressions" type = string validation { - condition = can(regex("https?://.*", var.url)) + condition = can(regex("https?://.*", lower(var.url))) error_message = "The URL must be a valid URL" } } diff --git a/variables.tf b/variables.tf index 8476811..8b88d93 100644 --- a/variables.tf +++ b/variables.tf @@ -25,7 +25,7 @@ variable "url" { description = "The URL that the messages should be delivered to. The path portion of the URL may contain substitution expressions" type = string validation { - condition = can(regex("https?://.*", var.url)) + condition = can(regex("https?://.*", lower(var.url))) error_message = "The URL must be a valid URL" } } From 482a7d108e82272c6171028e6f1683bd2cbe6dbb Mon Sep 17 00:00:00 2001 From: Balazs Czoma Date: Thu, 7 Mar 2024 04:36:54 -0500 Subject: [PATCH 2/8] Updated module test --- ci/module-test/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/module-test/main.tf b/ci/module-test/main.tf index 18fd4d3..937277a 100644 --- a/ci/module-test/main.tf +++ b/ci/module-test/main.tf @@ -68,7 +68,7 @@ module "testrdp2" { msg_vpn_name = "default" queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name - url = "http://[2001:db8:3333:4444:5555:6666:7777:8888]:12345/$${msgId()}" + url = "HTTP://[2001:db8:3333:4444:5555:6666:7777:8888]:12345/$${msgId()}" rest_delivery_point_name = "my_rdp2" request_headers = module.testrdp.request_headers protected_request_headers = module.testrdp.protected_request_headers From 0b807d708de70747f661595fe78ae63660de1f05 Mon Sep 17 00:00:00 2001 From: Balazs Czoma Date: Thu, 7 Mar 2024 09:58:23 -0500 Subject: [PATCH 3/8] README update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20b3c81..368f72f 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Refer to the following configuration examples: ## Module use recommendations -This module is expected to be used primarily by application teams. It supports provisioning endpoints or templates required by a specific application. It may be forked and adjusted with private defaults. +This module is expected to be used primarily by application teams. It supports provisioning rest delivery required by a specific application. It may be forked and adjusted with private defaults. ## Resources From 195d736896121598a2da7da99b1a6c05876819fc Mon Sep 17 00:00:00 2001 From: Balazs Czoma Date: Thu, 7 Mar 2024 11:39:36 -0500 Subject: [PATCH 4/8] Added module versions support for testing --- ci/module-test/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/module-test/main.tf b/ci/module-test/main.tf index 937277a..d40a31a 100644 --- a/ci/module-test/main.tf +++ b/ci/module-test/main.tf @@ -12,6 +12,7 @@ resource "solacebroker_msg_vpn_queue" "myqueue" { module "testrdp" { source = "../.." + # version = "" msg_vpn_name = "default" queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name From dbc69553910569d54e1b6f417f4bf5200ee0ba0a Mon Sep 17 00:00:00 2001 From: Balazs Czoma Date: Thu, 7 Mar 2024 11:55:00 -0500 Subject: [PATCH 5/8] Fixed module versions support for testing --- .github/workflows/verify-registry-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/verify-registry-release.yml b/.github/workflows/verify-registry-release.yml index 9cf2038..13835c9 100644 --- a/.github/workflows/verify-registry-release.yml +++ b/.github/workflows/verify-registry-release.yml @@ -47,12 +47,13 @@ jobs: - name: Setup token and patch module with release information run: | + MODULENAME=rest-delivery if [ "${{ github.event.inputs.public_release }}" == "false" ] ; then echo Internal release - MODULE_REF="app.terraform.io/SolaceDev/jndi/solacebroker" + MODULE_REF="app.terraform.io/SolaceDev/$MODULENAME/solacebroker" else echo Public release - MODULE_REF="SolaceProducts/jndi/solacebroker" + MODULE_REF="SolaceProducts/$MODULENAME/solacebroker" fi ci/scripts/test-module.sh ci/module-test/ "" $MODULE_REF "${{ github.event.inputs.release_version }}" From 297569a16c4b606a81789a3fd0ffa220045c9e42 Mon Sep 17 00:00:00 2001 From: Balazs Czoma Date: Thu, 7 Mar 2024 11:59:37 -0500 Subject: [PATCH 6/8] Fixed module versions support for testing --- ci/module-test/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/module-test/main.tf b/ci/module-test/main.tf index d40a31a..ca525f5 100644 --- a/ci/module-test/main.tf +++ b/ci/module-test/main.tf @@ -66,6 +66,7 @@ output "protected_request_headers" { module "testrdp2" { source = "../../internal/gen-template" + # version = "" msg_vpn_name = "default" queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name From c65f30b1b78719175220214ed332b15009b28f51 Mon Sep 17 00:00:00 2001 From: Balazs Czoma Date: Thu, 7 Mar 2024 15:01:05 -0500 Subject: [PATCH 7/8] Added sensitive designation to the protected header example --- examples/adding-headers/variables.tf | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/adding-headers/variables.tf b/examples/adding-headers/variables.tf index a563601..e9e89ef 100644 --- a/examples/adding-headers/variables.tf +++ b/examples/adding-headers/variables.tf @@ -12,10 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -variable "protected_request_headers" { - type = list(object({ - header_name = string - header_value = string - })) - default = [] -} +variable "protected_request_headers" { + type = list(object({ + header_name = string + header_value = string + })) + default = [] + sensitive = true +} From 83af31f066c5db25762d8bbae45ae869b7bffe5b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 04:37:31 -0500 Subject: [PATCH 8/8] Formatting updates [skip ci] (#8) --- examples/adding-headers/variables.tf | 2 +- examples/basic/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/adding-headers/variables.tf b/examples/adding-headers/variables.tf index e9e89ef..95efc47 100644 --- a/examples/adding-headers/variables.tf +++ b/examples/adding-headers/variables.tf @@ -17,6 +17,6 @@ variable "protected_request_headers" { header_name = string header_value = string })) - default = [] + default = [] sensitive = true } diff --git a/examples/basic/main.tf b/examples/basic/main.tf index ba178be..d24eb91 100644 --- a/examples/basic/main.tf +++ b/examples/basic/main.tf @@ -51,7 +51,7 @@ module "testrdp" { 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 + queue_name = solacebroker_msg_vpn_queue.rdp_queue.queue_name # Example configuration of a client profile. Commented out here since the "default" client profile will be used if not specified # client_profile_name = "default"