-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
aws: Add elb_account_id data source #8221
Conversation
I am generally 👍 on this - exposing as much information as possible via data sources to prevent hard coded values is a good idea IMO! |
a0c2499
to
e356f27
Compare
LGTM pending Travis and running acctests - sorry about the merge conflict there! |
|
I was initially kinda confused by the name of this, thinking to myself "What is an ELB account?" After reading the linked docs I understand now that this is the account id of the ELB service itself, for each region. So with that definition in mind, could we instead call this So this would look like: data "aws_elb_service_account" "current_region" {
}
data "aws_iam_policy_document" "elb_access" {
statement {
principals {
type = "AWS"
identifiers = "${data.aws_elb_service_account.current_region.id}"
}
# etc
}
} (Sorry this is a bit of a nit... just concerned that the naming as merged will be misleading and cause people to misunderstand what this is for.) |
|
||
## Argument Reference | ||
|
||
* `region` - (Optional) Region of a given AWS ELB Account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe clearer to say: "Name of the region whose ELB account id is desired. If not specified, default's to the region from the AWS provider configuration."
@apparentlymart Thanks for all the comments, agreed to all points. I'll address that in a separate PR. |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I'm not sure if data source is the right place for such static lookup, but I can't think of a better place right now.
http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy