Configuration in this directory creates a client username on the PubSub+ appliance, leveraging the Client Terraform module.
The example shows how to set the sensitive password
variable with a .tfvars
file, as described in the Protect sensitive input variables Terraform tutorial.
msg_vpn_name
- Set todefault
in the example.client_identifier_type
- Set toclient_username
in the example.client_identifier_name
- Set tomyclient
in the example.client_profile_name
- Set todefault
in the example.acl_profile_name
- Set todefault
in the example.
password
- this example demonstrates when the client username is also used for authentication purposes if basic authentication with internal database has been configured for the Message VPN. In this case a password needs to be specified, which is shown in the example.
Optional module input variables have the same name as the attributes of the underlying provider resource. If omitted, then the default for the related resource attribute will be configured on the broker. For a list of attributes and the corresponding defaults, see the documentation of "solacebroker_msg_vpn_client_username".
The module default for the enabled
variable is true, which enables the client username.
The module client_username
output refers to the created client username.
This example will create the following resources:
solacebroker_msg_vpn_client_username
If you don't already have access to a broker, see the Developers page for options to get started.
The sample is available from the module GitHub repo:
git clone https://github.com/SolaceProducts/terraform-solacebrokerappliance-rest-delivery.git
cd examples/basic-client-username
Adjust the provider parameters in main.tf
according to your broker. The example configuration shows settings for a local broker running in Docker.
Tip: You can verify configuration changes on the broker, before and after, using the PubSub+ Broker Manager Web UI.
Execute from this folder:
terraform init
terraform plan -var-file="secret.tfvars"
terraform apply -var-file="secret.tfvars"
Run terraform destroy
to clean up the created resources when they are no longer needed.
For more information, see Configuring Client Authorization section in the PubSub+ documentation.