Determine some sensible tags to pass non-critical information to Ansible or other CM solutions:
resource "aws_instance" "main" {
...
tags {
...
"some_tag" = "waka"
| { | |
| "builders": [ | |
| { | |
| "access_key": "{{user `var_aws_access_key`}}", | |
| "ami_description": "My new AMI", | |
| "ami_name": "CentOS 7 x86_64 Base {{timestamp}}", | |
| "associate_public_ip_address": true, | |
| "enhanced_networking": true, | |
| "instance_type": "{{user `var_aws_instance_type`}}", | |
| "region": "{{user `var_aws_region`}}", |
| APIMETHOD="/repos/${OWNER}/${REPO}/issues/$ISSUE/labels" | |
| URL="https://api.github.com/${APIMETHOD}" | |
| curl --header "Authorization: token ${TOKEN}" \ | |
| -s \ | |
| -XPOST \ | |
| --data '{["enhancement"]}' \ | |
| --location "${URL}" | |
| ------------------------------------------- |
| - hosts: localhost | |
| connection: local | |
| tasks: | |
| - ec2_remote_facts: | |
| region: us-east-1 | |
| filters: | |
| instance-state-name: running | |
| "tag:ENV": prod | |
| "tag:ROLES": consul-server | |
| register: ec2_facts |