Skip to content

Commit

Permalink
Formatting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Feb 29, 2024
1 parent 8a5d025 commit fffe564
Show file tree
Hide file tree
Showing 17 changed files with 285 additions and 131 deletions.
38 changes: 19 additions & 19 deletions ci/module-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ resource "solacebroker_msg_vpn_queue" "myqueue" {
}

module "testrdp" {
source = "../.."
msg_vpn_name = "default"
queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name
url = "http://example.com/$${msgId()}"
source = "../.."

msg_vpn_name = "default"
queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name
url = "http://example.com/$${msgId()}"
rest_delivery_point_name = "my_rdp"
enabled = false
enabled = false
request_headers = [
{
header_name = "header1"
Expand All @@ -41,19 +41,19 @@ module "testrdp" {
oauth_jwt_claims = [
{
oauth_jwt_claim_name = "scope"
oauth_jwt_claim_value = "\"https://www.googleapis.com/auth/pubsub\""
oauth_jwt_claim_value = "\"https://www.googleapis.com/auth/pubsub\""
},
{
oauth_jwt_claim_name = "aud"
oauth_jwt_claim_value = "\"https://www.googleapis.com/oauth2/v4/token\""
oauth_jwt_claim_value = "\"https://www.googleapis.com/oauth2/v4/token\""
},
{
oauth_jwt_claim_name = "iss"
oauth_jwt_claim_value = "\"111400995554822290197\""
oauth_jwt_claim_value = "\"111400995554822290197\""
},
{
oauth_jwt_claim_name = "sub"
oauth_jwt_claim_value = "\"111400995554822290197\""
oauth_jwt_claim_value = "\"111400995554822290197\""
}
]
}
Expand All @@ -63,7 +63,7 @@ output "rdp" {
}

output "consumer" {
value = module.testrdp.rest_consumer
value = module.testrdp.rest_consumer
sensitive = true
}

Expand All @@ -76,7 +76,7 @@ output "request_headers" {
}

output "protected_request_headers" {
value = module.testrdp.protected_request_headers
value = module.testrdp.protected_request_headers
sensitive = true
}

Expand All @@ -85,12 +85,12 @@ output "oauth_jwt_claims" {
}

module "testrdp2" {
source = "../../internal/gen-template"
msg_vpn_name = "default"
queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name
url = "http://example.com/$${msgId()}"
rest_delivery_point_name = "my_rdp2"
request_headers = module.testrdp.request_headers
source = "../../internal/gen-template"

msg_vpn_name = "default"
queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name
url = "http://example.com/$${msgId()}"
rest_delivery_point_name = "my_rdp2"
request_headers = module.testrdp.request_headers
protected_request_headers = module.testrdp.protected_request_headers
}
38 changes: 19 additions & 19 deletions ci/template-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ resource "solacebroker_msg_vpn_queue" "myqueue" {
}

module "testrdp" {
source = "../../internal/gen-template"
msg_vpn_name = "default"
queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name
url = "http://example.com/$${msgId()}"
source = "../../internal/gen-template"

msg_vpn_name = "default"
queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name
url = "http://example.com/$${msgId()}"
rest_delivery_point_name = "my_rdp"
enabled = false
enabled = false
request_headers = [
{
header_name = "header1"
Expand All @@ -41,19 +41,19 @@ module "testrdp" {
oauth_jwt_claims = [
{
oauth_jwt_claim_name = "scope"
oauth_jwt_claim_value = "\"https://www.googleapis.com/auth/pubsub\""
oauth_jwt_claim_value = "\"https://www.googleapis.com/auth/pubsub\""
},
{
oauth_jwt_claim_name = "aud"
oauth_jwt_claim_value = "\"https://www.googleapis.com/oauth2/v4/token\""
oauth_jwt_claim_value = "\"https://www.googleapis.com/oauth2/v4/token\""
},
{
oauth_jwt_claim_name = "iss"
oauth_jwt_claim_value = "\"111400995554822290197\""
oauth_jwt_claim_value = "\"111400995554822290197\""
},
{
oauth_jwt_claim_name = "sub"
oauth_jwt_claim_value = "\"111400995554822290197\""
oauth_jwt_claim_value = "\"111400995554822290197\""
}
]
}
Expand All @@ -63,7 +63,7 @@ output "rdp" {
}

output "consumer" {
value = module.testrdp.rest_consumer
value = module.testrdp.rest_consumer
sensitive = true
}

Expand All @@ -76,7 +76,7 @@ output "request_headers" {
}

output "protected_request_headers" {
value = module.testrdp.protected_request_headers
value = module.testrdp.protected_request_headers
sensitive = true
}

Expand All @@ -85,12 +85,12 @@ output "oauth_jwt_claims" {
}

module "testrdp2" {
source = "../../internal/gen-template"
msg_vpn_name = "default"
queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name
url = "http://example.com/$${msgId()}"
rest_delivery_point_name = "my_rdp2"
request_headers = module.testrdp.request_headers
source = "../../internal/gen-template"

msg_vpn_name = "default"
queue_name = solacebroker_msg_vpn_queue.myqueue.queue_name
url = "http://example.com/$${msgId()}"
rest_delivery_point_name = "my_rdp2"
request_headers = module.testrdp.request_headers
protected_request_headers = module.testrdp.protected_request_headers
}
34 changes: 24 additions & 10 deletions examples/adding-headers/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# 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"
Expand All @@ -23,21 +37,21 @@ provider "solacebroker" {
# # 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 = "rdp_queue"
permission = "consume"
msg_vpn_name = "default"
queue_name = "rdp_queue"
permission = "consume"
ingress_enabled = true
egress_enabled = true
egress_enabled = true
}

module "testrdp" {
source = "../.."
msg_vpn_name = "default"
source = "../.."

msg_vpn_name = "default"
rest_delivery_point_name = "basic_rdp"
url = "https://example.com/test"
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
request_headers = [
{
header_name = "header1"
Expand All @@ -56,7 +70,7 @@ output "rdp" {
}

output "consumer" {
value = module.testrdp.rest_consumer
value = module.testrdp.rest_consumer
sensitive = true
}

Expand Down
14 changes: 14 additions & 0 deletions examples/adding-headers/providers.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# 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.

# Terraform configuration

terraform {
Expand Down
20 changes: 10 additions & 10 deletions examples/adding-headers/secret.tfvars
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
protected_request_headers = [
{
header_name = "protected_header1"
header_value = "protected_value1"
},
{
header_name = "protected_header2"
header_value = "protected_value2"
}
]
protected_request_headers = [
{
header_name = "protected_header1"
header_value = "protected_value1"
},
{
header_name = "protected_header2"
header_value = "protected_value2"
}
]
28 changes: 21 additions & 7 deletions examples/adding-headers/variables.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
variable "protected_request_headers" {
type = list(object({
header_name = string
header_value = string
}))
default = []
}
# 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.

variable "protected_request_headers" {
type = list(object({
header_name = string
header_value = string
}))
default = []
}
34 changes: 24 additions & 10 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# 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"
Expand All @@ -23,29 +37,29 @@ provider "solacebroker" {
# # 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 = "rdp_queue"
permission = "consume"
msg_vpn_name = "default"
queue_name = "rdp_queue"
permission = "consume"
ingress_enabled = true
egress_enabled = true
egress_enabled = true
}

module "testrdp" {
source = "../.."
msg_vpn_name = "default"
source = "../.."

msg_vpn_name = "default"
rest_delivery_point_name = "basic_rdp"
url = "https://example.com/test"
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
}

output "rdp" {
value = module.testrdp.rest_delivery_point
}

output "consumer" {
value = module.testrdp.rest_consumer
value = module.testrdp.rest_consumer
sensitive = true
}

Expand Down
14 changes: 14 additions & 0 deletions examples/basic/providers.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# 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.

# Terraform configuration

terraform {
Expand Down
Loading

0 comments on commit fffe564

Please sign in to comment.