-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial module with template and source
- Loading branch information
Showing
23 changed files
with
127,192 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Provider Test Pipeline | ||
|
||
on: push | ||
|
||
jobs: | ||
test: | ||
name: Run Provider setup and tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
# - name: Set up Go | ||
# uses: actions/setup-go@v3 | ||
# with: | ||
# go-version: "1.21" | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Terraform latest | ||
uses: hashicorp/setup-terraform@v2 | ||
|
||
- name: Setup test broker | ||
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 \ | ||
--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: Test module from template on test broker | ||
run: | | ||
ci/scripts/test-module.sh ci/template-test | ||
- name: Test module root on test broker | ||
run: | | ||
ci/scripts/test-module.sh ci/module-test | ||
- name: Test examples | ||
run: | | ||
for dir in examples/*; do (ci/scripts/test-module.sh "$dir"); done | ||
# ci/scripts/test-module.sh examples/non-exclusive-queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.0-rc.1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
provider "solacebroker" { | ||
username = "admin" | ||
password = "admin" | ||
url = "http://localhost:8080" | ||
} | ||
|
||
module "testrdp" { | ||
source = "../.." | ||
|
||
msg_vpn_name = "default" | ||
queue_name = "my_queue" | ||
url = "http://example.com/$${msgId()}" | ||
rest_delivery_point_name = "my_rdp" | ||
rest_consumer_name = "my_consumer" | ||
request_header = [ | ||
{ | ||
header_name = "header1" | ||
header_value = "$${uuid()}" | ||
}, | ||
{ | ||
header_name = "header2" | ||
header_value = "value2" | ||
} | ||
] | ||
oauth_jwt_claim = [ | ||
{ | ||
oauth_jwt_claim_name = "scope" | ||
oauth_jwt_claim_value = "\"https://www.googleapis.com/auth/pubsub\"" | ||
}, | ||
{ | ||
oauth_jwt_claim_name = "aud" | ||
oauth_jwt_claim_value = "\"https://www.googleapis.com/oauth2/v4/token\"" | ||
}, | ||
{ | ||
oauth_jwt_claim_name = "iss" | ||
oauth_jwt_claim_value = "\"111400995554822290197\"" | ||
}, | ||
{ | ||
oauth_jwt_claim_name = "sub" | ||
oauth_jwt_claim_value = "\"111400995554822290197\"" | ||
} | ||
] | ||
|
||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Terraform configuration | ||
|
||
terraform { | ||
required_providers { | ||
solacebroker = { | ||
source = "registry.terraform.io/solaceproducts/solacebroker" | ||
} | ||
} | ||
required_version = "~> 1.2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
# Basic terraform test on a config. | ||
# Params: $1 is the directory name, $2 (optional), the module registry URL, $3 (optional), the module version | ||
set -e | ||
pushd "$1" | ||
if [ -n "$2" ] ; then sed -i "s@source =.*@source = \"$2\"@g" main.tf; fi | ||
if [ -n "$3" ] ; then sed -i "s@# version =.*@version = \"$3\"@g" main.tf; fi | ||
cat main.tf | ||
terraform init | ||
terraform validate | ||
# Create | ||
terraform plan | ||
terraform apply -auto-approve | ||
terraform plan | grep "No changes" | ||
sleep 1 | ||
terraform destroy -auto-approve | ||
popd |
Oops, something went wrong.