Skip to content

Commit

Permalink
Formatting updates [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: bczoma <[email protected]>
  • Loading branch information
github-actions[bot] and bczoma authored Mar 11, 2024
1 parent 81c7db6 commit b91b7d7
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 111 deletions.
46 changes: 23 additions & 23 deletions ci/module-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,57 @@ provider "solacebroker" {
module "testclientusername" {
source = "../.."

msg_vpn_name = "default"
client_identifier_name = "myclient"
client_identifier_type = "client_username"
client_profile_name = "default"
acl_profile_name = "default"
password = "mypassword"
msg_vpn_name = "default"
client_identifier_name = "myclient"
client_identifier_type = "client_username"
client_profile_name = "default"
acl_profile_name = "default"
password = "mypassword"
acl_profile_publish_topic_exceptions = [
{
publish_topic_exception = "pub_test1"
publish_topic_exception = "pub_test1"
publish_topic_exception_syntax = "smf"
},
{
publish_topic_exception = "pub_test2"
publish_topic_exception = "pub_test2"
publish_topic_exception_syntax = "mqtt"
}
]
acl_profile_subscribe_share_name_exceptions = [
{
subscribe_share_name_exception = "share_test1"
subscribe_share_name_exception = "share_test1"
subscribe_share_name_exception_syntax = "smf"
},
{
subscribe_share_name_exception = "share_test2"
subscribe_share_name_exception = "share_test2"
subscribe_share_name_exception_syntax = "mqtt"
}
]
acl_profile_subscribe_topic_exceptions = [
{
subscribe_topic_exception = "sub_test1"
subscribe_topic_exception = "sub_test1"
subscribe_topic_exception_syntax = "smf"
},
{
subscribe_topic_exception = "sub_test2"
subscribe_topic_exception = "sub_test2"
subscribe_topic_exception_syntax = "mqtt"
}
]
acl_profile_client_connect_exceptions = [ "192.0.2.0/24", "2001:db8::/32" ]
client_username_attributes = [
acl_profile_client_connect_exceptions = ["192.0.2.0/24", "2001:db8::/32"]
client_username_attributes = [
{
attribute_name = "client-username-attribute1"
attribute_name = "client-username-attribute1"
attribute_value = "client-username-attribute-value1"
},
{
attribute_name = "client-username-attribute2"
attribute_name = "client-username-attribute2"
attribute_value = "client-username-attribute-value2"
}
]
}

output "client_username" {
value = module.testclientusername.client_username
value = module.testclientusername.client_username
sensitive = true
}

Expand All @@ -84,15 +84,15 @@ output "client_username_attributes" {
module "testauthorizationgroup" {
source = "../../internal/gen-template"

msg_vpn_name = "default"
client_identifier_name = "myauthorizationgroup"
client_identifier_type = "authorization_group"
client_profile_name = "default"
acl_profile_name = "default"
msg_vpn_name = "default"
client_identifier_name = "myauthorizationgroup"
client_identifier_type = "authorization_group"
client_profile_name = "default"
acl_profile_name = "default"
}

output "authorization_group" {
value = module.testauthorizationgroup.authorization_group
value = module.testauthorizationgroup.authorization_group
sensitive = true
}

44 changes: 22 additions & 22 deletions ci/template-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,56 @@ provider "solacebroker" {
module "testclientusername" {
source = "../../internal/gen-template"

msg_vpn_name = "default"
client_identifier_name = "myclient"
client_identifier_type = "client_username"
client_profile_name = "default"
acl_profile_name = "default"
msg_vpn_name = "default"
client_identifier_name = "myclient"
client_identifier_type = "client_username"
client_profile_name = "default"
acl_profile_name = "default"
acl_profile_publish_topic_exceptions = [
{
publish_topic_exception = "pub_test1"
publish_topic_exception = "pub_test1"
publish_topic_exception_syntax = "smf"
},
{
publish_topic_exception = "pub_test2"
publish_topic_exception = "pub_test2"
publish_topic_exception_syntax = "mqtt"
}
]
acl_profile_subscribe_share_name_exceptions = [
{
subscribe_share_name_exception = "share_test1"
subscribe_share_name_exception = "share_test1"
subscribe_share_name_exception_syntax = "smf"
},
{
subscribe_share_name_exception = "share_test2"
subscribe_share_name_exception = "share_test2"
subscribe_share_name_exception_syntax = "mqtt"
}
]
acl_profile_subscribe_topic_exceptions = [
{
subscribe_topic_exception = "sub_test1"
subscribe_topic_exception = "sub_test1"
subscribe_topic_exception_syntax = "smf"
},
{
subscribe_topic_exception = "sub_test2"
subscribe_topic_exception = "sub_test2"
subscribe_topic_exception_syntax = "mqtt"
}
]
acl_profile_client_connect_exceptions = [ "192.0.2.0/24", "2001:db8::/32" ]
client_username_attributes = [
acl_profile_client_connect_exceptions = ["192.0.2.0/24", "2001:db8::/32"]
client_username_attributes = [
{
attribute_name = "client-username-attribute1"
attribute_name = "client-username-attribute1"
attribute_value = "client-username-attribute-value1"
},
{
attribute_name = "client-username-attribute2"
attribute_name = "client-username-attribute2"
attribute_value = "client-username-attribute-value2"
}
]
}

output "client_username" {
value = module.testclientusername.client_username
value = module.testclientusername.client_username
sensitive = true
}

Expand All @@ -83,15 +83,15 @@ output "client_username_attributes" {
module "testauthorizationgroup" {
source = "../../internal/gen-template"

msg_vpn_name = "default"
client_identifier_name = "myauthorizationgroup"
client_identifier_type = "authorization_group"
client_profile_name = "default"
acl_profile_name = "default"
msg_vpn_name = "default"
client_identifier_name = "myauthorizationgroup"
client_identifier_type = "authorization_group"
client_profile_name = "default"
acl_profile_name = "default"
}

output "authorization_group" {
value = module.testauthorizationgroup.authorization_group
value = module.testauthorizationgroup.authorization_group
sensitive = true
}

24 changes: 12 additions & 12 deletions examples/acl-profile-exceptions/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,51 +21,51 @@ provider "solacebroker" {
module "testclient" {
source = "../.."

msg_vpn_name = "default"
client_identifier_type = "client_username"
client_identifier_name = "myclient"
client_profile_name = "default"
acl_profile_name = "default"
msg_vpn_name = "default"
client_identifier_type = "client_username"
client_identifier_name = "myclient"
client_profile_name = "default"
acl_profile_name = "default"

// The "default" ACL profile, used in the example, default actions are "allow", exceptions are "deny"

// example of multiple publish topic exceptions
acl_profile_publish_topic_exceptions = [
{
publish_topic_exception = "a/b/c* d/e/f",
publish_topic_exception = "a/b/c* d/e/f",
publish_topic_exception_syntax = "smf"
},
{
publish_topic_exception = "g/h/i",
publish_topic_exception = "g/h/i",
publish_topic_exception_syntax = "mqtt"
}
]

// example subscribe topic exception
acl_profile_subscribe_topic_exceptions = [
{
subscribe_topic_exception = "j/k/l",
subscribe_topic_exception = "j/k/l",
subscribe_topic_exception_syntax = "smf"
}
]

// example subscribe share name exception
acl_profile_subscribe_share_name_exceptions = [
{
subscribe_share_name_exception = "share-test1",
subscribe_share_name_exception = "share-test1",
subscribe_share_name_exception_syntax = "smf"
}
]

// example client connect exceptions
acl_profile_client_connect_exceptions = [ "192.0.2.0/24", "2001:db8::/32" ]
acl_profile_client_connect_exceptions = ["192.0.2.0/24", "2001:db8::/32"]

// No need to set enabled, it defaults to true
// enabled = true
}

output "client_username" {
value = module.testclient.client_username
value = module.testclient.client_username
sensitive = true
}

Expand Down
12 changes: 6 additions & 6 deletions examples/authorization-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ provider "solacebroker" {
module "testauthgroup" {
source = "../.."

msg_vpn_name = "default"
client_identifier_type = "authorization_group"
client_identifier_name = "myauthgroup"
client_profile_name = "default"
acl_profile_name = "default"
msg_vpn_name = "default"
client_identifier_type = "authorization_group"
client_identifier_name = "myauthgroup"
client_profile_name = "default"
acl_profile_name = "default"

// No need to set enabled, it defaults to true
// enabled = true
}

output "authorization_group" {
value = module.testauthgroup.authorization_group
value = module.testauthgroup.authorization_group
sensitive = true
}

12 changes: 6 additions & 6 deletions examples/basic-client-username/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ provider "solacebroker" {
module "testclient" {
source = "../.."

msg_vpn_name = "default"
client_identifier_type = "client_username"
client_identifier_name = "myclient"
client_profile_name = "default"
acl_profile_name = "default"
msg_vpn_name = "default"
client_identifier_type = "client_username"
client_identifier_name = "myclient"
client_profile_name = "default"
acl_profile_name = "default"

// Configuring a password for the client_username
password = var.password
Expand All @@ -35,7 +35,7 @@ module "testclient" {
}

output "client_username" {
value = module.testclient.client_username
value = module.testclient.client_username
sensitive = true
}

16 changes: 15 additions & 1 deletion examples/basic-client-username/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# 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 "password" {
type = string
type = string
sensitive = true
}
18 changes: 9 additions & 9 deletions examples/client-username-attributes/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ provider "solacebroker" {
module "testclient" {
source = "../.."

msg_vpn_name = "default"
client_identifier_type = "client_username"
client_identifier_name = "myclient"
client_profile_name = "default"
acl_profile_name = "default"
msg_vpn_name = "default"
client_identifier_type = "client_username"
client_identifier_name = "myclient"
client_profile_name = "default"
acl_profile_name = "default"

// Optional attributes example. One of the main use cases is client certificates authentication, no password is set here
client_username_attributes = [
client_username_attributes = [
{
attribute_name = "ou"
attribute_value = "Unit1"
attribute_name = "ou"
attribute_value = "Unit1"
}
]

Expand All @@ -40,7 +40,7 @@ module "testclient" {
}

output "client_username" {
value = module.testclient.client_username
value = module.testclient.client_username
sensitive = true
}

Expand Down
Loading

0 comments on commit b91b7d7

Please sign in to comment.