Skip to content

Commit

Permalink
New release v1.0.0-rc.1 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jul 10, 2024
1 parent 9c7c70b commit 614c551
Show file tree
Hide file tree
Showing 23 changed files with 2,038 additions and 172 deletions.
22 changes: 19 additions & 3 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.3"
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/solacebrokerappliance"@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 Expand Up @@ -105,4 +121,4 @@ jobs:
CURRENT_BRANCH=${GITHUB_REF_NAME}
gh pr create -B ${CURRENT_BRANCH} -H "GeneratedSourceUpdates-${CURRENT_BRANCH}" --title "Merge updates into ${CURRENT_BRANCH}" --body 'Created by Github action'
echo Review and approve PR before push can continue
exit 1 // force actions stop here
exit 1 // force actions stop here
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
4 changes: 2 additions & 2 deletions .github/workflows/verify-registry-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ jobs:
MODULENAME=client
if [ "${{ github.event.inputs.public_release }}" == "false" ] ; then
echo Internal release
MODULE_REF="app.terraform.io/SolaceDev/$MODULENAME/solacebroker"
MODULE_REF="app.terraform.io/SolaceDev/$MODULENAME/solacebrokerappliance"
else
echo Public release
MODULE_REF="SolaceProducts/$MODULENAME/solacebroker"
MODULE_REF="SolaceProducts/$MODULENAME/solacebrokerappliance"
fi
ci/scripts/test-module.sh ci/module-test/ "" $MODULE_REF "${{ github.event.inputs.release_version }}"
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
# Solace PubSub+ Appliance 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+ Appliance](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 |
|---------------|
|[solacebroker_msg_vpn_client_username](https://registry.terraform.io/providers/solaceproducts/solacebrokerappliance/latest/docs/resources/msg_vpn_client_username#optional)|
|[solacebroker_msg_vpn_authorization_group](https://registry.terraform.io/providers/solaceproducts/solacebrokerappliance/latest/docs/resources/msg_vpn_authorization_group#optional)|
|[solacebroker_msg_vpn_acl_profile_publish_topic_exception](https://registry.terraform.io/providers/solaceproducts/solacebrokerappliance/latest/docs/resources/msg_vpn_acl_profile_publish_topic_exception#optional)|
|[solacebroker_msg_vpn_acl_profile_subscribe_share_name_exception](https://registry.terraform.io/providers/solaceproducts/solacebrokerappliance/latest/docs/resources/msg_vpn_acl_profile_subscribe_share_name_exception#optional)|
|[solacebroker_msg_vpn_acl_profile_subscribe_topic_exception](https://registry.terraform.io/providers/solaceproducts/solacebrokerappliance/latest/docs/resources/msg_vpn_acl_profile_subscribe_topic_exception#optional)|
|[solacebroker_msg_vpn_acl_profile_client_connect_exception](https://registry.terraform.io/providers/solaceproducts/solacebrokerappliance/latest/docs/resources/msg_vpn_acl_profile_client_connect_exception#optional)|
|[solacebroker_msg_vpn_client_username_attribute](https://registry.terraform.io/providers/solaceproducts/solacebrokerappliance/latest/docs/resources/msg_vpn_client_username_attribute#optional)|
|[solacebroker_msg_vpn_client_username](https://registry.terraform.io/providers/SolaceProducts/solacebrokerappliance/latest/docs/resources/msg_vpn_client_username#optional)|
|[solacebroker_msg_vpn_authorization_group](https://registry.terraform.io/providers/SolaceProducts/solacebrokerappliance/latest/docs/resources/msg_vpn_authorization_group#optional)|
|[solacebroker_msg_vpn_acl_profile_publish_topic_exception](https://registry.terraform.io/providers/SolaceProducts/solacebrokerappliance/latest/docs/resources/msg_vpn_acl_profile_publish_topic_exception#optional)|
|[solacebroker_msg_vpn_acl_profile_subscribe_share_name_exception](https://registry.terraform.io/providers/SolaceProducts/solacebrokerappliance/latest/docs/resources/msg_vpn_acl_profile_subscribe_share_name_exception#optional)|
|[solacebroker_msg_vpn_acl_profile_subscribe_topic_exception](https://registry.terraform.io/providers/SolaceProducts/solacebrokerappliance/latest/docs/resources/msg_vpn_acl_profile_subscribe_topic_exception#optional)|
|[solacebroker_msg_vpn_acl_profile_client_connect_exception](https://registry.terraform.io/providers/SolaceProducts/solacebrokerappliance/latest/docs/resources/msg_vpn_acl_profile_client_connect_exception#optional)|
|[solacebroker_msg_vpn_client_username_attribute](https://registry.terraform.io/providers/SolaceProducts/solacebrokerappliance/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/solacebrokerappliance/latest) | ~> 0.9 |
| <a name="provider_solacebrokerappliance"></a> [solacebrokerappliance](https://registry.terraform.io/providers/SolaceProducts/solacebrokerappliance/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.3
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/solacebrokerappliance"
version = "~> 0.9"
version = "~> 1.0"
}
}
required_version = "~> 1.2"
Expand Down
1 change: 1 addition & 0 deletions ci/scripts/test-module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cat main.tf
terraform init
terraform validate
# Create
export SOLACEBROKER_SKIP_API_CHECK=true
terraform plan $2
terraform apply -auto-approve $2
# terraform plan $2 | grep "No changes"
Expand Down
Loading

0 comments on commit 614c551

Please sign in to comment.