Skip to content

Commit

Permalink
Adjusted modules to appliance
Browse files Browse the repository at this point in the history
  • Loading branch information
bczoma committed Mar 25, 2024
1 parent db6e018 commit df61894
Show file tree
Hide file tree
Showing 13 changed files with 9,415 additions and 12,966 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/module-test-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
SWAGGER_SPEC_NAME=`ls ci/swagger_spec`
echo "Generating code using spec $SWAGGER_SPEC_NAME"
rm ./*.tf
SEMP_V2_SWAGGER_CONFIG_EXTENDED_JSON="ci/swagger_spec/$SWAGGER_SPEC_NAME" MODULE_TEMPLATE_FOLDER="internal/gen-template" ~/go/bin/broker-terraform-code-generator software-module
SEMP_V2_SWAGGER_CONFIG_EXTENDED_JSON="ci/swagger_spec/$SWAGGER_SPEC_NAME" MODULE_TEMPLATE_FOLDER="internal/gen-template" ~/go/bin/broker-terraform-code-generator appliance-module
- name: Add copyright headers where needed
run: |
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Solace PubSub+ Software Event Broker REST Delivery Terraform Module
# Solace PubSub+ Appliance REST Delivery Terraform Module

Terraform module to support the setup of a [REST consumer](https://docs.solace.com/API/REST/REST-Consumers.htm) on the [Solace PubSub+ Event Broker](https://solace.com/products/event-broker/).

Expand Down Expand Up @@ -34,11 +34,11 @@ Additional optional module variables names are the same as the underlying resour

| Resource name |
|---------------|
|[solacebroker_msg_vpn_rest_delivery_point](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point#optional)|
|[solacebroker_msg_vpn_rest_delivery_point_rest_consumer](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_rest_consumer#optional)|
|[solacebroker_msg_vpn_rest_delivery_point_queue_binding](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_queue_binding#optional)|
|[solacebroker_msg_vpn_rest_delivery_point_queue_binding_request_header](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_queue_binding_request_header#optional)|
|[solacebroker_msg_vpn_rest_delivery_point_queue_binding_protected_request_header](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_queue_binding_protected_request_header#optional)|
|[solacebroker_msg_vpn_rest_delivery_point](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point#optional)|
|[solacebroker_msg_vpn_rest_delivery_point_rest_consumer](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_rest_consumer#optional)|
|[solacebroker_msg_vpn_rest_delivery_point_queue_binding](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_queue_binding#optional)|
|[solacebroker_msg_vpn_rest_delivery_point_queue_binding_request_header](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_queue_binding_request_header#optional)|
|[solacebroker_msg_vpn_rest_delivery_point_queue_binding_protected_request_header](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_queue_binding_protected_request_header#optional)|

Most optional variables' default value is `null`, meaning that if not provided then the resource default value will be provisioned on the broker.

Expand All @@ -54,7 +54,7 @@ Note that the "rest consumer" and the "protected request headers" outputs are [s

| 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) | ~> 0.9 |

## Resources

Expand Down
1 change: 1 addition & 0 deletions ci/module-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ provider "solacebroker" {
username = "admin"
password = "admin"
url = "http://localhost:8080"
skip_api_check = true
}

resource "solacebroker_msg_vpn_queue" "myqueue" {
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/test-module.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ terraform validate
# Create
terraform plan $2
terraform apply -auto-approve $2
terraform plan $2 | grep "No changes"
# terraform plan $2 | grep "No changes"
sleep 1
terraform destroy -auto-approve
popd

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ci/template-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ provider "solacebroker" {
username = "admin"
password = "admin"
url = "http://localhost:8080"
skip_api_check = true
}

resource "solacebroker_msg_vpn_queue" "myqueue" {
Expand Down
4 changes: 2 additions & 2 deletions examples/adding-headers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Important: The REST delivery point must have permission to consume messages from
* `request_headers` - provided as a set of objects in the example. Also check the [using-substitution-expressions](/examples/using-substitution-expressions) example for additional samples.
* `protected_request_headers` - provided as a set of objects 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 attributes and defaults, refer to the [documentation of "solacebroker_msg_vpn_rest_delivery_point_queue_binding"](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_queue_binding#optional).
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 attributes and defaults, refer to the [documentation of "solacebroker_msg_vpn_rest_delivery_point_queue_binding"](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_queue_binding#optional).

The module default for the `enabled` variable is true, which enables both the RDP and the REST consumer resources.

Expand Down Expand Up @@ -65,7 +65,7 @@ cd examples/adding-headers

### Adjust Provider Configuration

Adjust the [provider parameters](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs#schema) in `main.tf` according to your broker. The example configuration shows settings for a local broker running in Docker.
Adjust the [provider parameters](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs#schema) in `main.tf` according to your broker. The example configuration shows settings for a local broker running in Docker.

### Create the resource

Expand Down
29 changes: 15 additions & 14 deletions examples/adding-headers/main.tf
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# 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.

# 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"
url = "http://localhost:8080"
skip_api_check = true
}

# The RDP requires a queue to bind to.
Expand Down
4 changes: 2 additions & 2 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Important: The REST delivery point must have permission to consume messages from

### Optional Inputs

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 attributes and defaults, refer to the [documentation of "solacebroker_msg_vpn_rest_delivery_point_rest_consumer"](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_rest_consumer#optional).
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 attributes and defaults, refer to the [documentation of "solacebroker_msg_vpn_rest_delivery_point_rest_consumer"](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_rest_consumer#optional).

The module default for the `enabled` variable is true, which enables both the RDP and the REST consumer resources.

Expand Down Expand Up @@ -50,7 +50,7 @@ cd examples/basic

### Adjust Provider Configuration

Adjust the [provider parameters](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs#schema) in `main.tf` according to your broker. The example configuration shows settings for a local broker running in Docker.
Adjust the [provider parameters](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs#schema) in `main.tf` according to your broker. The example configuration shows settings for a local broker running in Docker.

### Create the resource

Expand Down
1 change: 1 addition & 0 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ provider "solacebroker" {
username = "admin"
password = "admin"
url = "http://localhost:8080"
skip_api_check = true
}

# The RDP requires a queue to bind to.
Expand Down
4 changes: 2 additions & 2 deletions examples/using-substitution-expressions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Important: The REST delivery point must have permission to consume messages from

Note that substitution expressions are not supported for `protected_request_headers`.

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 attributes and defaults, refer to the [documentation of "solacebroker_msg_vpn_rest_delivery_point_rest_consumer"](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_rest_consumer#optional).
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 attributes and defaults, refer to the [documentation of "solacebroker_msg_vpn_rest_delivery_point_rest_consumer"](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs/resources/msg_vpn_rest_delivery_point_rest_consumer#optional).

The module default for the `enabled` variable is true, which enables both the RDP and the REST consumer resources.

Expand Down Expand Up @@ -63,7 +63,7 @@ cd examples/using-substitution-expressions

### Adjust Provider Configuration

Adjust the [provider parameters](https://registry.terraform.io/providers/SolaceProducts/solacebroker/latest/docs#schema) in `main.tf` according to your broker. The example configuration shows settings for a local broker running in Docker.
Adjust the [provider parameters](https://registry.terraform.io/providers/solaceproducts/solacebroker/latest/docs#schema) in `main.tf` according to your broker. The example configuration shows settings for a local broker running in Docker.

### Create the resource

Expand Down
29 changes: 15 additions & 14 deletions examples/using-substitution-expressions/main.tf
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# 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.

# 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"
url = "http://localhost:8080"
skip_api_check = true
}

# The RDP requires a queue to bind to.
Expand Down
2 changes: 1 addition & 1 deletion provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
terraform {
required_providers {
solacebroker = {
source = "registry.terraform.io/solaceproducts/solacebroker"
source = "registry.terraform.io/solaceproducts/solacebrokerappliance"
version = "~> 0.9"
}
}
Expand Down

0 comments on commit df61894

Please sign in to comment.