diff --git a/VERSION b/VERSION index 3738566..f2e984b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.0-rc.1 +0.1.0-rc.2 diff --git a/ci/module-test/main.tf b/ci/module-test/main.tf index e899365..0abc538 100644 --- a/ci/module-test/main.tf +++ b/ci/module-test/main.tf @@ -35,14 +35,14 @@ 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" } ] @@ -50,7 +50,7 @@ module "testvpn" { } output "created_msg_vpn" { - value = module.testvpn.msg_vpn + value = module.testvpn.msg_vpn sensitive = true } @@ -63,7 +63,7 @@ output "created_client_profile" { } output "created_oauth_profile" { - value = module.testvpn.oauth_profile + value = module.testvpn.oauth_profile sensitive = true } @@ -100,6 +100,6 @@ module "defaultvpn" { source = "../.." # version = "" - msg_vpn_name = "default" - enabled = false + msg_vpn_name = "default" + enabled = false } diff --git a/ci/template-test/main.tf b/ci/template-test/main.tf index 0c27234..8108c83 100644 --- a/ci/template-test/main.tf +++ b/ci/template-test/main.tf @@ -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 } @@ -61,7 +61,7 @@ output "created_client_profile" { } output "created_oauth_profile" { - value = module.testvpn.oauth_profile + value = module.testvpn.oauth_profile sensitive = true } @@ -96,6 +96,6 @@ module "testvpn2" { module "defaultvpn" { source = "../../internal/gen-template" - msg_vpn_name = "default" - enabled = false + msg_vpn_name = "default" + enabled = false } diff --git a/examples/basic-vpn/main.tf b/examples/basic-vpn/main.tf index c3b5c76..b52d203 100644 --- a/examples/basic-vpn/main.tf +++ b/examples/basic-vpn/main.tf @@ -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" @@ -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 diff --git a/examples/client-certificate-authentication/main.tf b/examples/client-certificate-authentication/main.tf index 1a66a42..24a4b7b 100644 --- a/examples/client-certificate-authentication/main.tf +++ b/examples/client-certificate-authentication/main.tf @@ -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" @@ -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 @@ -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" } ] @@ -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 } diff --git a/examples/customized-acl-and-client-profiles/main.tf b/examples/customized-acl-and-client-profiles/main.tf index 21bb942..dc306da 100644 --- a/examples/customized-acl-and-client-profiles/main.tf +++ b/examples/customized-acl-and-client-profiles/main.tf @@ -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" @@ -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 @@ -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 } diff --git a/examples/oauth-authentication/main.tf b/examples/oauth-authentication/main.tf index e08d325..398abd5 100644 --- a/examples/oauth-authentication/main.tf +++ b/examples/oauth-authentication/main.tf @@ -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" @@ -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 diff --git a/examples/services-and-listen-ports/main.tf b/examples/services-and-listen-ports/main.tf index 24ededc..72c4508 100644 --- a/examples/services-and-listen-ports/main.tf +++ b/examples/services-and-listen-ports/main.tf @@ -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" @@ -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 diff --git a/internal/gen-template/main.tf b/internal/gen-template/main.tf index 0e478e9..923c66b 100644 --- a/internal/gen-template/main.tf +++ b/internal/gen-template/main.tf @@ -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" { diff --git a/internal/gen-template/outputs.tf b/internal/gen-template/outputs.tf index 3c0c889..09e41b9 100644 --- a/internal/gen-template/outputs.tf +++ b/internal/gen-template/outputs.tf @@ -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 } @@ -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 } diff --git a/internal/gen-template/variables.tf b/internal/gen-template/variables.tf index d24ec61..957647e 100644 --- a/internal/gen-template/variables.tf +++ b/internal/gen-template/variables.tf @@ -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