Skip to content

Commit

Permalink
minor naming adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
bczoma committed Nov 3, 2023
1 parent 494ce55 commit 714c783
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ This command would create a file my-messagevpn.tf that contains a resource defin
brokerSempVersion := result["sempVersion"].(string)
brokerPlatform := result["platform"].(string)
if !skipApiCheck && brokerPlatform != generated.Platform {
command.LogCLIError(fmt.Sprintf("Broker platform \"%s\" does not meet generator supported platform: %s", BrokerPlatformName[brokerPlatform], BrokerPlatformName[generated.Platform]))
command.LogCLIError(fmt.Sprintf("Broker platform \"%s\" does not match generator supported platform: %s", BrokerPlatformName[brokerPlatform], BrokerPlatformName[generated.Platform]))
os.Exit(1)
}
command.LogCLIInfo("Connection successful")
Expand Down
2 changes: 1 addition & 1 deletion internal/broker/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func checkBrokerRequirements(ctx context.Context, client *semp.Client) error {
}
brokerPlatform := result["platform"].(string)
if brokerPlatform != SempDetail.Platform {
return fmt.Errorf("broker platform \"%s\" does not meet provider supported platform: %s", BrokerPlatformName[brokerPlatform], BrokerPlatformName[SempDetail.Platform])
return fmt.Errorf("broker platform \"%s\" does not match provider supported platform: %s", BrokerPlatformName[brokerPlatform], BrokerPlatformName[SempDetail.Platform])
}
apiAlreadyChecked = true
}
Expand Down
1 change: 0 additions & 1 deletion internal/broker/testacc/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"github.com/testcontainers/testcontainers-go/wait"

"terraform-provider-solacebroker/internal/broker/generated"
_ "terraform-provider-solacebroker/internal/broker/generated"
)

var ProviderConfig string
Expand Down
27 changes: 16 additions & 11 deletions templates/guides/config-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,23 @@ Message VPN, `default`, assuming a msg_vpn_queue resource called `test` exists f

### Supported Options

The following parameters can be set as ENVIRONMENT VARIABLES. When used as environment variables
The following parameters can be set as ENVIRONMENT VARIABLES. When used as environment variable,
each parameter must be preceded with _SOLACEBROKER__. For example for a PubSub+ broker using username and password
_**admin/password**_
would be:

`SOLACEBROKER_USERNAME=admin SOLACEBROKER_PASSWORD=password`

- `bearer_token`, (String, Sensitive, Mandatory if `password` not provided)
- `insecure_skip_verify` (Boolean) Disable validation of server SSL certificates, accept/ignore self-signed.
- `password` (String, Sensitive, Mandatory if `bearer_token` not provided)
- `request_min_interval` (String)
- `request_timeout_duration` (String)
- `retries` (Number)
- `retry_max_interval` (String)
- `retry_min_interval` (String)
- `skip_api_check` (String) Disable validation of the broker SEMP API for supported platform and minimum version.
- `username` (String, Mandatory) The username for the broker request.
- `SOLACEBROKER_BEARER_TOKEN` (String, Sensitive, Mandatory if `password` not provided)
- `SOLACEBROKER_INSECURE_SKIP_VERIFY` (Boolean) Disable validation of server SSL certificates, accept/ignore self-signed.
- `SOLACEBROKER_PASSWORD` (String, Sensitive, Mandatory if `bearer_token` not provided)
- `SOLACEBROKER_REQUEST_MIN_INTERVAL` (String)
- `SOLACEBROKER_REQUEST_TIMEOUT_DURATION` (String)
- `SOLACEBROKER_RETRIES` (Number)
- `SOLACEBROKER_RETRY_MAX_INTERVAL` (String)
- `SOLACEBROKER_RETRY_MIN_INTERVAL` (String)
- `SOLACEBROKER_SKIP_API_CHECK` (String) Disable validation of the broker SEMP API for supported platform and minimum version.
- `SOLACEBROKER_USERNAME` (String, Mandatory) The username for the broker request.

## Troubleshooting

Expand Down Expand Up @@ -109,3 +109,8 @@ The following issues may arise while using the generator.
|-----------------|------------------------------------------------------------------------------------------------------------|
| Explanation | This indicates the resource by name _xxx_ is not recognized by the generator. |
| Possible Action | Ensure the resource name used is available as a Terraform resource for the version of the provider in use. |

| Error | Error: Broker check failed |
|-----------------|-------------------------------------------------------------------------------------------------------------|
| Explanation | This indicates that broker platform does not match provider supported platform |
| Possible Action | Ensure that an appliance provider is used against an appliance platform and not a software broker platform. |

0 comments on commit 714c783

Please sign in to comment.