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

Documentation: Information on how to use HTTP API #264

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions docs/guides/info_http_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
layout: "cloudamqp"
page_title: "HTTP API"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make it more clear as just "HTTP API" is very generic term (needs updating in more places)

Suggested change
page_title: "HTTP API"
page_title: "Message Broker HTTP API"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

subcategory: "info"
description: |-
Example of using HTTP API to create user, vhost etc.
---

# HTTP API

This provider doesn't support using the HTTP API to create user, vhost etc. on the underlying
RabbitMQ or LavinMQ instance.

There are other provider here at the registry that are built for this. Example of the current
unofficial RabbitMQ provider with most downloads:
https://registry.terraform.io/providers/cyrilgdn/rabbitmq/latest

## Example Usage

This can be used together with the CloudAMQP provider to access the HTTP API to create
user, vhost etc.

```hcl
data "cloudamqp_credentials" "credentials" {
instance_id = cloudamqp_instance.instance.id
}

provider "rabbitmq" {
endpoint = "https://${cloudamqp_instance.instance.host}"
username = data.cloudamqp_credentials.credentials.username
password = data.cloudamqp_credentials.credentials.password
}
```