Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Documented order of parameters in sample command for Command-Line Terraform Configuration Generator differs from actual parameter order. #82

Open
Ushnash opened this issue Dec 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Ushnash
Copy link

Ushnash commented Dec 3, 2024

Bug Description

This is in reference to the example generate command provided in the documentation. The example states that the order of parameters provided to generate can be:

./terraform-provider-solacebroker_v1.1.0 generate
--username=<some_name>
--password=<some_value>
--url=https://<broker_url>
solacebroker_msg_vpn_queue.q demo-service/sample_queue my-message-vpn-queue.tf`

This parameter order fails with Error: Terraform resource address is not in correct format. Should be in the format <resource_type>.<resource_name>

Expected Behavior

I expected the documented generate command to dump the broker configuration to a file.

The correct order of parameters as provided by ./terraform-provider-solacebroker_v1.1.0 generate --help is:

./terraform-provider-solacebroker_v1.1.0 generate
solacebroker_msg_vpn_queue.q demo-service/sample_queue out.tf
--username=<some_name>
--password=<some_value>
--url=https://<broker_url>

Specifically, the <resource_type>.<resource_name> & output filename should be provided right after the generate command.

Please update the documentation to reflect the correct parameter order.

Steps to Reproduce

Run the sample generate command provided in the documentation. It should fail with Error: Terraform resource address is not in correct format. Should be in the format <resource_type>.<resource_name>

Solace Broker version

10.9.1.119-2

Solace API

No response

Solace API version

No response

@Ushnash Ushnash added the bug Something isn't working label Dec 3, 2024
@bczoma
Copy link
Collaborator

bczoma commented Dec 3, 2024

Hi @Ushnash , I have just tried following combinations after a simple configuration and they all worked for me:

SOLACEBROKER_USERNAME=admin SOLACEBROKER_PASSWORD=admin terraform-provider-solacebroker generate --url=http://localhost:8080 solacebroker_msg_vpn_queue.q default/test my-message-vpn-queue.tf
#
terraform-provider-solacebroker generate  --username=admin --password=admin --url=http://localhost:8080 solacebroker_msg_vpn_queue.q default/test my-message-vpn-queue.tf
#
terraform-provider-solacebroker generate  solacebroker_msg_vpn_queue.q default/test my-message-vpn-queue.tf --username=admin --password=admin --url=http://localhost:8080

From the error reported, it appears the issue is with the Terraform resource address format. Can you double check if exactly the same format was used between your working and non-working examples (an accidental space or need for URL-encoding could matter)? Also, can you check how my tests above work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants