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

Improvement to Amazon MQ - export instances IP addresses to allow ELB creation #2821

Closed
nestorbolivar opened this issue Jan 2, 2018 · 7 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/mq Issues and PRs that pertain to the mq service.
Milestone

Comments

@nestorbolivar
Copy link

Hi There,

It would be great to export Amazon MQ instances IDs or IP addresses. We could create ELBs placed in public subnets and redirect them to the admin consoles.

Cheers,
Nestor

@radeksimko radeksimko added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 2, 2018
@radeksimko radeksimko added the service/mq Issues and PRs that pertain to the mq service. label Jan 25, 2018
@loivis
Copy link
Contributor

loivis commented Jan 27, 2018

I think AWS doesn't expose such info, at least not in DescribeBrokerResponse? BrokerInstance has only attributes as ConsoleURL and Endpoints, which are already exported.

@nestorbolivar
Copy link
Author

@loivis I'm getting the 'Endpoints' ip addresses using the dns data provider. Then I associate an ELB to those IP addresses... It would be great if it could be handled as part of the MQ data source. e.g. primayMQendpointIP & secondaryMQendpoint ... ;)

@nestorbolivar
Copy link
Author

nestorbolivar commented Jan 29, 2018

I get the IP address as follows;

data "dns_a_record_set" "elb1" {
  count = "${var.enable_aamq == "True" ? 1 : 0}"
  host = "${aws_mq_broker.lp_aamq_brk.id}-1.mq.${var.aws_region}.amazonaws.com"
}

This os for the target group:

resource "aws_lb_target_group_attachment" "mq_ip_attach_1" {
  count = "${var.enable_aamq == "True" ? 1 : 0}"
  depends_on = ["aws_mq_broker.lp_aamq_brk"]
  target_group_arn = "${aws_lb_target_group.aamq_elb_tg.arn}"
  target_id        = "${data.dns_a_record_set.elb1.addrs[0]}"
  port             = 8162
}

@loivis
Copy link
Contributor

loivis commented Jan 29, 2018

In you case, I think it's reasonable that terraform ouputs hostname attributes for mq_broker. Then you don't need to concatenate strings to get the hostname. But dns_a_record_set data source is still need to get ip from hostname. IMPO, I don't think terraform should do this dns lookup.

@loivis
Copy link
Contributor

loivis commented Jan 29, 2018

Seems like it's possible to query eni to get those IPs. AWS is following the similar rule as elb to have mq id within description.

@bflad bflad added this to the v1.40.0 milestone Oct 16, 2018
@bflad
Copy link
Contributor

bflad commented Oct 16, 2018

The ip_address attribute inside instances has been exposed via #6103 and released in version 1.40.0 of the AWS provider last week. Please reach out if this is not what you were looking for here.

@bflad bflad closed this as completed Oct 16, 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. service/mq Issues and PRs that pertain to the mq service.
Projects
None yet
Development

No branches or pull requests

4 participants