1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Add a Name tag to Route53 healthchecks for UI purposes

This commit is contained in:
Ross McFarland
2019-04-01 09:13:57 -07:00
parent b8be28c1dc
commit f83eeb0a9c
2 changed files with 17 additions and 0 deletions

View File

@@ -640,6 +640,20 @@ class Route53Provider(BaseProvider):
HealthCheckConfig=config)
health_check = resp['HealthCheck']
id = health_check['Id']
# Set a Name for the benefit of the UI
name = '{}:{} - {}'.format(record.fqdn, record._type, value)
self._conn.change_tags_for_resource(ResourceType='healthcheck',
ResourceId=id,
AddTags=[{
'Key': 'Name',
'Value': name,
}])
# Manually add it to our cache
health_check['Tags'] = {
'Name': name
}
# store the new health check so that we'll be able to find it in the
# future
self._health_checks[id] = health_check