Document permissions needed for ec2_sd_configs (#11119)

Currently, it's not explicitly called out which permissions are needed
for service discovery of EC2 instances. It's not super hard to figure
out, but it did involve a bit of guesswork when I did it yesterday, and
I figure it's worth saving people that effort.

I've also seen examples around the internet where people are granting
much broader permissions than they need to, so maybe we can save on that
by explicitly saying what's needed.

Signed-off-by: Chris Sinjakli <chris@sinjakli.co.uk>
This commit is contained in:
Chris Sinjakli 2022-08-05 14:49:38 +01:00 committed by GitHub
parent 8bcad096ed
commit fba20567c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -993,6 +993,11 @@ EC2 SD configurations allow retrieving scrape targets from AWS EC2
instances. The private IP address is used by default, but may be changed to
the public IP address with relabeling.
The IAM credentials used must have the `ec2:DescribeInstances` permission to
discover scrape targets, and may optionally have the
`ec2:DescribeAvailabilityZones` permission if you want the availability zone ID
available as a label (see below).
The following meta labels are available on targets during [relabeling](#relabel_config):
* `__meta_ec2_ami`: the EC2 Amazon Machine Image