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 Mar 21, 2024
1 parent c794d6f commit 18c96dc
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 43 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0-rc.1
0.1.0-rc.2
14 changes: 7 additions & 7 deletions ci/module-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ module "testvpn" {
cert_matching_rule_name = "testvpnCertMatchingRule"
cert_matching_rule_conditions = [
{
source = "issuer"
source = "issuer"
expression = "C = CA, ST = Ontario, L = Kanata, O = Solace Systems, OU = IT, CN = *.messaging.solace"
}
]
cert_matching_rule_attribute_filters = [
{
filter_name = "testFilter"
attribute_name = "username"
filter_name = "testFilter"
attribute_name = "username"
attribute_value = "test"
}
]
authentication_kerberos_enabled = true
}

output "created_msg_vpn" {
value = module.testvpn.msg_vpn
value = module.testvpn.msg_vpn
sensitive = true
}

Expand All @@ -63,7 +63,7 @@ output "created_client_profile" {
}

output "created_oauth_profile" {
value = module.testvpn.oauth_profile
value = module.testvpn.oauth_profile
sensitive = true
}

Expand Down Expand Up @@ -100,6 +100,6 @@ module "defaultvpn" {
source = "../.."
# version = ""

msg_vpn_name = "default"
enabled = false
msg_vpn_name = "default"
enabled = false
}
14 changes: 7 additions & 7 deletions ci/template-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ module "testvpn" {
cert_matching_rule_name = "testvpnCertMatchingRule"
cert_matching_rule_conditions = [
{
source = "issuer"
source = "issuer"
expression = "C = CA, ST = Ontario, L = Kanata, O = Solace Systems, OU = IT, CN = *.messaging.solace"
}
]
cert_matching_rule_attribute_filters = [
{
filter_name = "testFilter"
attribute_name = "username"
filter_name = "testFilter"
attribute_name = "username"
attribute_value = "test"
}
]
}

output "created_msg_vpn" {
value = module.testvpn.msg_vpn
value = module.testvpn.msg_vpn
sensitive = true
}

Expand All @@ -61,7 +61,7 @@ output "created_client_profile" {
}

output "created_oauth_profile" {
value = module.testvpn.oauth_profile
value = module.testvpn.oauth_profile
sensitive = true
}

Expand Down Expand Up @@ -96,6 +96,6 @@ module "testvpn2" {
module "defaultvpn" {
source = "../../internal/gen-template"

msg_vpn_name = "default"
enabled = false
msg_vpn_name = "default"
enabled = false
}
16 changes: 15 additions & 1 deletion examples/basic-vpn/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 @@ -7,7 +21,7 @@ provider "solacebroker" {
module "testvpn" {
source = "../.."

msg_vpn_name = "myvpn"
msg_vpn_name = "myvpn"

// No need to set the VPN enabled, it defaults to true
// enabled = true
Expand Down
28 changes: 21 additions & 7 deletions examples/client-certificate-authentication/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 @@ -7,7 +21,7 @@ provider "solacebroker" {
module "testvpn" {
source = "../.."

msg_vpn_name = "vpn-with-mtls"
msg_vpn_name = "vpn-with-mtls"
// No need to set the VPN enabled, it defaults to true
// enabled = true

Expand All @@ -22,14 +36,14 @@ module "testvpn" {

cert_matching_rule_conditions = [
{
source = "issuer"
source = "issuer"
expression = "C = CA, ST = Ontario, L = Kanata, O = Solace Systems, OU = IT, CN = *.messaging.solace"
}
]
cert_matching_rule_attribute_filters = [
{
filter_name = "testFilter"
attribute_name = "username"
filter_name = "testFilter"
attribute_name = "username"
attribute_value = "test"
}
]
Expand All @@ -41,14 +55,14 @@ output "created_vpn" {
}

output "created_cert_matching_rule" {
value = module.testvpn.cert_matching_rule
value = module.testvpn.cert_matching_rule
}

output "created_cert_matching_rule_conditions" {
value = module.testvpn.cert_matching_rule_conditions
value = module.testvpn.cert_matching_rule_conditions
}

output "created_cert_matching_rule_attribute_filters" {
value = module.testvpn.cert_matching_rule_attribute_filters
value = module.testvpn.cert_matching_rule_attribute_filters
}

22 changes: 18 additions & 4 deletions examples/customized-acl-and-client-profiles/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 @@ -7,10 +21,10 @@ provider "solacebroker" {
module "testvpn" {
source = "../.."

msg_vpn_name = "vpn-with-acl-and-client-profiles"
msg_vpn_name = "vpn-with-acl-and-client-profiles"

// Configure an ACL profile. This example allows clients to connect from any address. All other ACL rules are default
acl_profile_name = "my-acl-profile"
acl_profile_name = "my-acl-profile"
client_connect_default_action = "allow"

// Configure a client profile. This example disables compression, which is by default enabled. All other client profile settings are default
Expand All @@ -27,10 +41,10 @@ output "created_vpn" {
}

output "created_acl_profile" {
value = module.testvpn.acl_profile
value = module.testvpn.acl_profile
}

output "created_client_profile" {
value = module.testvpn.client_profile
value = module.testvpn.client_profile
}

18 changes: 16 additions & 2 deletions examples/oauth-authentication/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 @@ -7,11 +21,11 @@ provider "solacebroker" {
module "testvpn" {
source = "../.."

msg_vpn_name = "vpn-with-oauth"
msg_vpn_name = "vpn-with-oauth"
// No need to set the VPN enabled, it defaults to true
// enabled = true

oauth_profile_name = "sampleVpnOauthProfile"
oauth_profile_name = "sampleVpnOauthProfile"
// with "oauth_profile_name" defined, OAuth authentication will be automatically enabled on the message VPN
// no need to set the following:
// authentication_oauth_enabled = true
Expand Down
18 changes: 16 additions & 2 deletions examples/services-and-listen-ports/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 @@ -7,10 +21,10 @@ provider "solacebroker" {
module "testvpn" {
source = "../.."

msg_vpn_name = "rest-enabled-vpn"
msg_vpn_name = "rest-enabled-vpn"

// Enable and configure incoming messaging protocols, for example REST. Note that plain text is not recommended for production use.
service_rest_incoming_plain_text_enabled = true
service_rest_incoming_plain_text_enabled = true
service_rest_incoming_plain_text_listen_port = 9001

// Uncomment to disable plain text SMF - however secure transport SMF requires a server certificate installed on the broker
Expand Down
2 changes: 1 addition & 1 deletion internal/gen-template/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ locals {
oauth_profile_client_required_claims_list = tolist(var.oauth_profile_client_required_claims)
oauth_profile_resource_server_required_claims_list = tolist(var.oauth_profile_resource_server_required_claims)
cert_matching_rule_conditions_list = tolist(var.cert_matching_rule_conditions)
cert_matching_rule_attribute_filters_list = tolist(var.cert_matching_rule_attribute_filters)
cert_matching_rule_attribute_filters_list = tolist(var.cert_matching_rule_attribute_filters)
}

resource "solacebroker_msg_vpn" "main" {
Expand Down
4 changes: 2 additions & 2 deletions internal/gen-template/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Output variable definitions

output "msg_vpn" {
value = try(solacebroker_msg_vpn.main, null)
value = try(solacebroker_msg_vpn.main, null)
sensitive = true
}

Expand All @@ -14,7 +14,7 @@ output "client_profile" {
}

output "oauth_profile" {
value = try(solacebroker_msg_vpn_authentication_oauth_profile.main, null)
value = try(solacebroker_msg_vpn_authentication_oauth_profile.main, null)
sensitive = true
}

Expand Down
18 changes: 9 additions & 9 deletions internal/gen-template/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,30 +98,30 @@ variable "oauth_profile_client_required_claims" {

variable "oauth_profile_resource_server_required_claims" {
description = "Additional claims to be verified in the access token. Ignored if `oauth_profile_name` is not set"
type = set(object({
type = set(object({
claim_name = string
claim_value = string
}))
default = []
default = []
}

variable "cert_matching_rule_conditions" {
description = "The conditions to be added to the Certification Matching Rule. Ignored if `cert_matching_rule_name` is not set"
type = set(object({
source = string
type = set(object({
source = string
expression = string
}))
default = []
default = []
}

variable "cert_matching_rule_attribute_filters" {
description = "The filters to be added to the Certification Matching Rule. A Cert Matching Rule Attribute Filter compares a username attribute to a string. Ignored if `cert_matching_rule_name` is not set"
type = set(object({
filter_name = string
attribute_name = string
type = set(object({
filter_name = string
attribute_name = string
attribute_value = string
}))
default = []
default = []
}

#AutoAddAttributes

0 comments on commit 18c96dc

Please sign in to comment.