Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release v1.0.0-rc.1 #18

Merged
merged 8 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/module-test-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Terraform latest
uses: hashicorp/setup-terraform@v2
- name: Set up Terraform latest - with token
uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
terraform_wrapper: true

- name: Setup test broker
run: |
Expand All @@ -20,6 +23,15 @@ jobs:
--env system_scaling_maxconnectioncount="1000" --mount type=bind,source=$HOME/solace,destination=/var/lib/solace,ro=false solace/solace-pubsub-standard:latest
while ! curl -s localhost:8080 | grep aurelia ; do sleep 1 ; done

- name: Setup if private provider is required
run: |
export PRIVATE_PROVIDER_VERSION="1.0.0-rc.7"
if [ -n "$PRIVATE_PROVIDER_VERSION" ]; then
echo "Using private provider version $PRIVATE_PROVIDER_VERSION"
grep -rl 'source = "' . | xargs sed -i 's@source = ".*$@source = "app.terraform.io/SolaceDev/solacebroker"@g'
grep -rl 'version = "' . | xargs sed -i "s@ version = \".*\$@ version = \"${PRIVATE_PROVIDER_VERSION}\"@g"
fi

- name: Test module from template on test broker
run: |
ci/scripts/test-module.sh ci/template-test
Expand All @@ -34,6 +46,10 @@ jobs:
for d in examples/!(basic-client-username)/; do (ci/scripts/test-module.sh "$d"); done
# ci/scripts/test-module.sh examples/basic-client-username/ -var-file=secret.tfvars

- name: Discard any changes in checked out code
run: |
git checkout -- .

- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/prep-internal-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ jobs:
--env system_scaling_maxconnectioncount="1000" --mount type=bind,source=$HOME/solace,destination=/var/lib/solace,ro=false solace/solace-pubsub-standard:latest
while ! curl -s localhost:8080 | grep aurelia ; do sleep 1 ; done

- name: Check code builds and pass acceptance test
run: |
ci/scripts/test-module.sh ci/module-test
shopt -s extglob
for d in examples/!(basic-client-username)/; do (ci/scripts/test-module.sh "$d"); done
ci/scripts/test-module.sh examples/basic-client-username/ -var-file=secret.tfvars
# - name: Check code builds and pass acceptance test
# run: |
# ci/scripts/test-module.sh ci/module-test
# shopt -s extglob
# for d in examples/!(basic-client-username)/; do (ci/scripts/test-module.sh "$d"); done
# ci/scripts/test-module.sh examples/basic-client-username/ -var-file=secret.tfvars

- name: Ensure version reflects release candidate version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-registry-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
mkdir -p $HOME/solace; chmod 777 $HOME/solace
docker run -d -p 8080:8080 -p 55555:55555 --shm-size=1g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --env system_scaling_maxkafkabridgecount="10" --name=solace \
--mount type=bind,source=$HOME/solace,destination=/var/lib/solace,ro=false solace/solace-pubsub-standard:"10.6.1.52"
--mount type=bind,source=$HOME/solace,destination=/var/lib/solace,ro=false solace/solace-pubsub-standard:latest
while ! curl -s localhost:8080 | grep aurelia ; do sleep 1 ; done

- name: Set up Terraform latest - public
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Solace PubSub+ Software Event Broker Client Terraform Module

Terraform module to provision a client identifier for [authorization](https://docs.solace.com/Security/Client-Authorization-Overview.htm) when connecting to the [Solace PubSub+ Event Broker](https://solace.com/products/event-broker/). The module also provides the option to adjust the assigned ACL profile through defining ACL profile exceptions, and to define additional attributes for client usernames.
This Terraform module provisions a client identifier for [authorization](https://docs.solace.com/Security/Client-Authorization-Overview.htm) when connecting to the [Solace PubSub+ Event Broker](https://solace.com/products/event-broker/). The module also provides the option to adjust the assigned ACL profile through defining ACL profile exceptions, and to define additional attributes for client usernames.

The identifier may be one of:
* [Client username](https://docs.solace.com/Security/Configuring-Client-Usernames.htm); or
* Authorization group (used for [OAuth](https://docs.solace.com/Security/Client-Authorization-Overview.htm#Authoriz2) or [LDAP](https://docs.solace.com/Security/Client-Authorization-Overview.htm#LDAP-Groups))

Specific use case details are provided in the [Examples](#examples).
Specific use case details are provided in the [Examples](#examples) section.

## Module input variables

### Required

* `msg_vpn_name` - client usernames or authorization groups are specific to a Message VPN on the broker
* `client_identifier_type` - One of `client_username` or `authorization_group`
* `client_identifier_name` - The name of the client identifier
* `acl_profile_name` - The ACL profile to be assigned for authorization
* `client_profile_name` - The client profile to be assigned for authorization
* `msg_vpn_name` - Client usernames or authorization groups are specific to a Message VPN on the broker.
* `client_identifier_type` - One of `client_username` or `authorization_group`.
* `client_identifier_name` - The name of the client identifier.
* `acl_profile_name` - The ACL profile to be assigned for authorization.
* `client_profile_name` - The client profile to be assigned for authorization.

### Optional

* `password` - If using a client username to identify the client and configured basic authentication with internal database for the Message VPN, this variable provisions a password for authentication.
* `acl_profile_publish_topic_exceptions`, `acl_profile_subscribe_share_name_exceptions`, `acl_profile_subscribe_topic_exceptions`, `acl_profile_client_connect_exceptions` - Optional exceptions that may be added to modify the assigned ACL profile, to support specific needs of the client.
* `client_username_attributes` - A set of attributes that may be defined in case of using a client username.
* `password` - If you are using a client username to identify the client and configured basic authentication with internal database for the Message VPN, this variable provisions a password for authentication.
* `acl_profile_publish_topic_exceptions`, `acl_profile_subscribe_share_name_exceptions`, `acl_profile_subscribe_topic_exceptions`, `acl_profile_client_connect_exceptions` - Optional exceptions that you can add to modify the assigned ACL profile, to support specific needs of the client.
* `client_username_attributes` - A set of attributes that you can define in case of using a client username.

Additional optional module variable names are the same as the underlying resource attributes. The recommended approach to determine variable name mappings is to look up the resource's documentation for matching attribute names:
Additional optional module variable names are the same as the underlying resource attributes. To determine the variable name mappings, we recommend that you look for matching attribute names in the documentation for the resource:

| Resource name |
|---------------|
Expand All @@ -36,7 +36,7 @@ Additional optional module variable names are the same as the underlying resourc
|[solacebroker_msg_vpn_acl_profile_client_connect_exception](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_acl_profile_client_connect_exception#optional)|
|[solacebroker_msg_vpn_client_username_attribute](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_client_username_attribute#optional)|

Most optional variables' default value is `null`, meaning that if not provided then the resource default value will be provisioned on the broker.
The default value for most of the optional variables is `null`, meaning that if you don’t provide a value then the default value of the resource is provisioned on the event broker.

-> The module default for the `enabled` optional variable is `true`, which differs from the resource attribute default.

Expand All @@ -50,11 +50,11 @@ Note that the "client username" and the "authorization group" outputs are [sensi

| Name | Version |
|------|---------|
| <a name="provider_solacebroker"></a> [solacebroker](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest) | ~> 0.9 |
| <a name="provider_solacebroker"></a> [solacebroker](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest) | ~> 1.0 |

## Resources

The following table shows the resources created for each `client_identifier_type` value. "X" denotes a resource always created, "O" is a resource that may be created optionally
The following table shows the resources created for each `client_identifier_type` value. "X" denotes a resource that is always created, "O" denotes a resource that you have the option to create.

| Name | client_username | authorization_group |
|------|------|------|
Expand All @@ -69,7 +69,7 @@ The following table shows the resources created for each `client_identifier_type

## Examples

Refer to the following configuration examples:
The following examples demonstrate several specific use cases for this module:

- [Client username](examples/basic-client-username)
- [Client username attributes](examples/client-username-attributes)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0-rc.4
1.0.0-rc.1
2 changes: 1 addition & 1 deletion ci/module-test/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
solacebroker = {
source = "registry.terraform.io/solaceproducts/solacebroker"
version = "~> 0.9"
version = "~> 1.0"
}
}
required_version = "~> 1.2"
Expand Down
Loading
Loading