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

Add support for getting EndpointURL directly from ElasticBeanstalk Environment resource #9873

Closed
wants to merge 0 commits into from

Conversation

xsalazar
Copy link
Contributor

Summary

This PR adds the ability to pull the endpoint_url directly from the aws_elastic_beanstalk_environment resource. Previously, (one way) to get this value was: register an aws_elb data source using the registered load_balancers from the aws_elastic_beanstalk_environment; with this data source, you can reference the dns_name that corresponds to the load balancer.

data "aws_elb" "elb" {
  name = aws_elastic_beanstalk_environment.environment.load_balancers[0]
}

// ...

resource "aws_route53_record" "dns" {
  name    = var.hostname
  type    = "CNAME"
  zone_id = var.dns_hosted_zone_id
  ttl     = 600
  records = [data.aws_elb.elb.dns_name]
}

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Release Notes

Release note for CHANGELOG:

Add support for retrieving endpoint_url from the ElasticBeanstalk Environment.

For example:

resource "aws_route53_record" "dns" {
  name    = var.hostname
  type    = "CNAME"
  zone_id = var.dns_hosted_zone_id
  ttl     = 600
  records = [aws_elastic_beanstalk_environment.environment.endpoint_url]
}

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSBeanstalkEnv_outputs' TEST=./aws
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAWSBeanstalkEnv_outputs -timeout 120m
=== RUN   TestAccAWSBeanstalkEnv_outputs
=== PAUSE TestAccAWSBeanstalkEnv_outputs
=== CONT  TestAccAWSBeanstalkEnv_outputs
--- PASS: TestAccAWSBeanstalkEnv_outputs (378.61s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	378.838s

@xsalazar xsalazar requested a review from a team August 23, 2019 22:44
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 23, 2019
@xsalazar xsalazar closed this Sep 5, 2019
@ghost
Copy link

ghost commented Nov 1, 2019

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 Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant