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 19, 2024
1 parent 34c2eb0 commit 8d4d9e3
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 25 deletions.
10 changes: 5 additions & 5 deletions ci/module-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,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"
}
]
Expand All @@ -58,6 +58,6 @@ module "testvpn2" {
module "defaultvpn" {
source = "../.."

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
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
14 changes: 14 additions & 0 deletions 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.

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)
Expand Down
14 changes: 14 additions & 0 deletions outputs.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.

# Output variable definitions

output "msg_vpn" {
Expand Down
14 changes: 14 additions & 0 deletions provider.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
14 changes: 14 additions & 0 deletions variables.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.

# Input variable definitions

# Required variables
Expand Down

0 comments on commit 8d4d9e3

Please sign in to comment.