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

Expose naked aws_mq_broker hostname #5913

Closed
izeau opened this issue Sep 18, 2018 · 5 comments
Closed

Expose naked aws_mq_broker hostname #5913

izeau opened this issue Sep 18, 2018 · 5 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/mq Issues and PRs that pertain to the mq service.

Comments

@izeau
Copy link

izeau commented Sep 18, 2018

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Currently aws_mq_broker resources only expose their hostname via console_url and the endpoints list under the instances list:

aws_mq_broker.broker:
  instances:
    - console_url: 'https://<hostname>:8162'
      endpoints:
        - 'ssl://<hostname>:61617'
        - 'amqp+ssl://<hostname>:5671'
        - 'stomp+ssl://<hostname>:61614'
        - 'mqtt+ssl://<hostname>:8883'
        - 'wss://<hostname>:61619'

I'd like to access the hostname directly in order to create CNAME for it. At the time I’m using multiple replace() calls to remove the protocol and port but it's kind of a pain, plus the nested structure makes it quite difficult to access them when using an arbitrary number of instances.

Maybe a hostname attribute on the instances field would help.

New or Affected Resource(s)

  • aws_mq_broker
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/mq Issues and PRs that pertain to the mq service. labels Sep 20, 2018
@chrislewisdev
Copy link
Contributor

The AWS SDK exposes an IpAddress field on every Broker Instance - https://docs.aws.amazon.com/sdk-for-go/api/service/mq/#BrokerInstance - if my understanding is correct, that should allow this to be supported fairly easily.

I'd like to have a go at putting together a PR for this issue as my first Terraform contribution - so keep your eyes peeled :)

@chrislewisdev
Copy link
Contributor

chrislewisdev commented Oct 8, 2018

It's worth noting that the IpAddress field of course lists only the IP Address and not the exact same hostname value (e.g. xxxx-xxxxx-xxxx.mq.ap-southeast-2.amazonaws.com) that you're looking for. Would exposing the raw IP Address solve your needs the same way that hostname would? Seeing as you're looking to create DNS records for it, I'm under the impression that it should suit just as well.

@chrislewisdev
Copy link
Contributor

I just opened a PR to add the new ip_address property. Although I feel this is a worthwhile contribution on its own, I'd definitely like to know if this will address your needs @izeau! If it doesn't, I guess additional PRs would be required to add the exact hostname property you're looking for.

@izeau
Copy link
Author

izeau commented Oct 11, 2018

That is perfect @chrislewisdev! Thanks a lot.

@izeau izeau closed this as completed Oct 11, 2018
@ghost
Copy link

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/mq Issues and PRs that pertain to the mq service.
Projects
None yet
Development

No branches or pull requests

3 participants