From 324801611f014a0b8fd9ed4d0b3154eb3b56c41c Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Mon, 18 Oct 2021 11:24:09 +0200 Subject: [PATCH] route53_health_check - add tagging support (#765) route53_health_check - add tagging support SUMMARY add tagging support to route53_health_check ISSUE TYPE Feature Pull Request COMPONENT NAME route53_health_check ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis Reviewed-by: None --- .../765-route53_health_check-tags.yml | 2 + plugins/module_utils/route53.py | 3 + plugins/modules/route53_health_check.py | 28 +- .../route53_health_check/tasks/main.yml | 504 +++++++++++++++++- 4 files changed, 520 insertions(+), 17 deletions(-) create mode 100644 changelogs/fragments/765-route53_health_check-tags.yml diff --git a/changelogs/fragments/765-route53_health_check-tags.yml b/changelogs/fragments/765-route53_health_check-tags.yml new file mode 100644 index 00000000000..5f233ceb3cb --- /dev/null +++ b/changelogs/fragments/765-route53_health_check-tags.yml @@ -0,0 +1,2 @@ +minor_changes: +- route53_health_check - add support for tagging health checks (https://github.com/ansible-collections/community.aws/pull/765). diff --git a/plugins/module_utils/route53.py b/plugins/module_utils/route53.py index 3d21d8b0802..3e2940a5311 100644 --- a/plugins/module_utils/route53.py +++ b/plugins/module_utils/route53.py @@ -16,6 +16,9 @@ def manage_tags(module, client, resource_type, resource_id, new_tags, purge_tags): + if new_tags is None: + return False + old_tags = get_tags(module, client, resource_type, resource_id) tags_to_set, tags_to_delete = compare_aws_tags(old_tags, new_tags, purge_tags=purge_tags) diff --git a/plugins/modules/route53_health_check.py b/plugins/modules/route53_health_check.py index af482132e56..382be93ab6d 100644 --- a/plugins/modules/route53_health_check.py +++ b/plugins/modules/route53_health_check.py @@ -86,6 +86,17 @@ - Will default to C(3) if not specified on creation. choices: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] type: int + tags: + description: + - A hash/dictionary of tags to set on the health check. + type: dict + version_added: 2.1.0 + purge_tags: + description: + - Delete any tags not specified in I(tags). + default: false + type: bool + version_added: 2.1.0 author: "zimbatm (@zimbatm)" extends_documentation_fragment: - amazon.aws.aws @@ -198,6 +209,11 @@ type: bool returned: When the health check exists. sample: false + tags: + description: A dictionary representing the tags on the health check. + type: dict + returned: When the health check exists. + sample: '{"my_key": "my_value"}' ''' import uuid @@ -212,6 +228,8 @@ from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule from ansible_collections.amazon.aws.plugins.module_utils.core import is_boto3_error_code from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry +from ansible_collections.community.aws.plugins.module_utils.route53 import get_tags +from ansible_collections.community.aws.plugins.module_utils.route53 import manage_tags def _list_health_checks(**params): @@ -332,7 +350,8 @@ def create_health_check(ip_addr_in, fqdn_in, type_in, request_interval_in, port_ except (botocore.exceptions.BotoCoreError, botocore.exceptions.ClientError) as e: module.fail_json_aws(e, msg='Failed to create health check.', health_check=health_check) - return True, 'create', result.get('HealthCheck').get('Id') + check_id = result.get('HealthCheck').get('Id') + return True, 'create', check_id def update_health_check(existing_check): @@ -396,6 +415,8 @@ def describe_health_check(id): health_check = result.get('HealthCheck', {}) health_check = camel_dict_to_snake_dict(health_check) + tags = get_tags(module, client, 'healthcheck', id) + health_check['tags'] = tags return health_check @@ -411,6 +432,8 @@ def main(): string_match=dict(), request_interval=dict(type='int', choices=[10, 30], default=30), failure_threshold=dict(type='int', choices=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), + tags=dict(type='dict'), + purge_tags=dict(type='bool', default=False), ) args_one_of = [ @@ -473,6 +496,9 @@ def main(): changed, action, check_id = create_health_check(ip_addr_in, fqdn_in, type_in, request_interval_in, port_in) else: changed, action = update_health_check(existing_check) + if check_id: + changed |= manage_tags(module, client, 'healthcheck', check_id, + module.params.get('tags'), module.params.get('purge_tags')) health_check = describe_health_check(id=check_id) health_check['action'] = action diff --git a/tests/integration/targets/route53_health_check/tasks/main.yml b/tests/integration/targets/route53_health_check/tasks/main.yml index 8164b65e5bf..426a0461703 100644 --- a/tests/integration/targets/route53_health_check/tasks/main.yml +++ b/tests/integration/targets/route53_health_check/tasks/main.yml @@ -65,6 +65,7 @@ - '"id" in _health_check' - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action == 'create' - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -123,6 +124,7 @@ - '"id" in _health_check' - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -180,6 +182,7 @@ - _health_check.id == tcp_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -236,6 +239,7 @@ - _health_check.id == tcp_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -264,14 +268,14 @@ port: '{{ port }}' type: '{{ type }}' disabled: true - register: update_threshold + register: update_disabled check_mode: true - name: 'Check result - Update TCP health check - set disabled - check_mode' assert: that: - - update_threshold is successful - - update_threshold is changed + - update_disabled is successful + - update_disabled is changed - name: 'Update TCP health check - set disabled' route53_health_check: @@ -280,18 +284,19 @@ port: '{{ port }}' type: '{{ type }}' disabled: true - register: update_threshold + register: update_disabled - name: 'Check result - Update TCP health check - set disabled' assert: that: - - update_threshold is successful - - update_threshold is changed - - '"health_check" in update_threshold' + - update_disabled is successful + - update_disabled is changed + - '"health_check" in update_disabled' - '"id" in _health_check' - _health_check.id == tcp_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -310,7 +315,7 @@ - _check_config.ip_address == ip_address - _check_config.port == port vars: - _health_check: '{{ update_threshold.health_check }}' + _health_check: '{{ update_disabled.health_check }}' _check_config: '{{ _health_check.health_check_config }}' - name: 'Update TCP health check - set disabled - idempotency - check_mode' @@ -320,14 +325,14 @@ port: '{{ port }}' type: '{{ type }}' disabled: true - register: update_threshold + register: update_disabled check_mode: true - name: 'Check result - Update TCP health check - set disabled - idempotency - check_mode' assert: that: - - update_threshold is successful - - update_threshold is not changed + - update_disabled is successful + - update_disabled is not changed - name: 'Update TCP health check - set disabled - idempotency' route53_health_check: @@ -336,18 +341,19 @@ port: '{{ port }}' type: '{{ type }}' disabled: true - register: update_threshold + register: update_disabled - name: 'Check result - Update TCP health check - set disabled - idempotency' assert: that: - - update_threshold is successful - - update_threshold is not changed - - '"health_check" in update_threshold' + - update_disabled is successful + - update_disabled is not changed + - '"health_check" in update_disabled' - '"id" in _health_check' - _health_check.id == tcp_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -366,7 +372,419 @@ - _check_config.ip_address == ip_address - _check_config.port == port vars: - _health_check: '{{ update_threshold.health_check }}' + _health_check: '{{ update_disabled.health_check }}' + _check_config: '{{ _health_check.health_check_config }}' + + - name: 'Update TCP health check - set tags - check_mode' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + CamelCase: CamelCaseValue + snake_case: snake_case_value + "with space": Some value + purge_tags: false + register: update_tags + check_mode: true + + - name: 'Check result - Update TCP health check - set tags - check_mode' + assert: + that: + - update_tags is successful + - update_tags is changed + + - name: 'Update TCP health check - set tags' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + CamelCase: CamelCaseValue + snake_case: snake_case_value + "with space": Some value + purge_tags: false + register: update_tags + + - name: 'Check result - Update TCP health check - set tags' + assert: + that: + - update_tags is successful + - update_tags is changed + - '"health_check" in update_tags' + - '"id" in _health_check' + - _health_check.id == tcp_check_id + - '"action" in _health_check' + - '"health_check_version" in _health_check' + - '"tags" in _health_check' + - '"CamelCase" in _health_check.tags' + - _health_check.tags['CamelCase'] == 'CamelCaseValue' + - '"snake_case" in _health_check.tags' + - _health_check.tags['snake_case'] == 'snake_case_value' + - '"with space" in _health_check.tags' + - _health_check.tags['with space'] == 'Some value' + - create_check.health_check.action is none + - '"health_check_config" in create_check.health_check' + - '"type" in _check_config' + - '"disabled" in _check_config' + - '"failure_threshold" in _check_config' + - '"request_interval" in _check_config' + - '"fully_qualified_domain_name" not in _check_config' + - '"ip_address" in _check_config' + - '"port" in _check_config' + - '"resource_path" not in _check_config' + - '"search_string" not in _check_config' + - _check_config.disabled == true + - _check_config.type == 'TCP' + - _check_config.request_interval == 30 + - _check_config.failure_threshold == failure_threshold_updated + - _check_config.ip_address == ip_address + - _check_config.port == port + vars: + _health_check: '{{ update_tags.health_check }}' + _check_config: '{{ _health_check.health_check_config }}' + + - name: 'Update TCP health check - set tags - idempotency - check_mode' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + CamelCase: CamelCaseValue + snake_case: snake_case_value + "with space": Some value + purge_tags: false + register: update_tags + check_mode: true + + - name: 'Check result - Update TCP health check - set tags - idempotency - check_mode' + assert: + that: + - update_tags is successful + - update_tags is not changed + + - name: 'Update TCP health check - set tags - idempotency' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + CamelCase: CamelCaseValue + snake_case: snake_case_value + "with space": Some value + purge_tags: false + register: update_tags + + - name: 'Check result - Update TCP health check - set tags - idempotency' + assert: + that: + - update_tags is successful + - update_tags is not changed + - '"health_check" in update_tags' + - '"id" in _health_check' + - _health_check.id == tcp_check_id + - '"action" in _health_check' + - '"health_check_version" in _health_check' + - '"tags" in _health_check' + - '"CamelCase" in _health_check.tags' + - _health_check.tags['CamelCase'] == 'CamelCaseValue' + - '"snake_case" in _health_check.tags' + - _health_check.tags['snake_case'] == 'snake_case_value' + - '"with space" in _health_check.tags' + - _health_check.tags['with space'] == 'Some value' + - create_check.health_check.action is none + - '"health_check_config" in create_check.health_check' + - '"type" in _check_config' + - '"disabled" in _check_config' + - '"failure_threshold" in _check_config' + - '"request_interval" in _check_config' + - '"fully_qualified_domain_name" not in _check_config' + - '"ip_address" in _check_config' + - '"port" in _check_config' + - '"resource_path" not in _check_config' + - '"search_string" not in _check_config' + - _check_config.disabled == true + - _check_config.type == 'TCP' + - _check_config.request_interval == 30 + - _check_config.failure_threshold == failure_threshold_updated + - _check_config.ip_address == ip_address + - _check_config.port == port + vars: + _health_check: '{{ update_tags.health_check }}' + _check_config: '{{ _health_check.health_check_config }}' + + - name: 'Update TCP health check - add tags - check_mode' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + anotherTag: anotherValue + purge_tags: false + register: add_tags + check_mode: true + + - name: 'Check result - Update TCP health check - add tags - check_mode' + assert: + that: + - add_tags is successful + - add_tags is changed + + - name: 'Update TCP health check - add tags' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + anotherTag: anotherValue + purge_tags: false + register: add_tags + + - name: 'Check result - Update TCP health check - add tags' + assert: + that: + - add_tags is successful + - add_tags is changed + - '"health_check" in add_tags' + - '"id" in _health_check' + - _health_check.id == tcp_check_id + - '"action" in _health_check' + - '"health_check_version" in _health_check' + - '"tags" in _health_check' + - '"CamelCase" in _health_check.tags' + - _health_check.tags['CamelCase'] == 'CamelCaseValue' + - '"snake_case" in _health_check.tags' + - _health_check.tags['snake_case'] == 'snake_case_value' + - '"with space" in _health_check.tags' + - _health_check.tags['with space'] == 'Some value' + - '"anotherTag" in _health_check.tags' + - _health_check.tags['anotherTag'] == 'anotherValue' + - create_check.health_check.action is none + - '"health_check_config" in create_check.health_check' + - '"type" in _check_config' + - '"disabled" in _check_config' + - '"failure_threshold" in _check_config' + - '"request_interval" in _check_config' + - '"fully_qualified_domain_name" not in _check_config' + - '"ip_address" in _check_config' + - '"port" in _check_config' + - '"resource_path" not in _check_config' + - '"search_string" not in _check_config' + - _check_config.disabled == true + - _check_config.type == 'TCP' + - _check_config.request_interval == 30 + - _check_config.failure_threshold == failure_threshold_updated + - _check_config.ip_address == ip_address + - _check_config.port == port + vars: + _health_check: '{{ add_tags.health_check }}' + _check_config: '{{ _health_check.health_check_config }}' + + - name: 'Update TCP health check - add tags - idempotency - check_mode' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + anotherTag: anotherValue + purge_tags: false + register: add_tags + check_mode: true + + - name: 'Check result - Update TCP health check - add tags - idempotency - check_mode' + assert: + that: + - add_tags is successful + - add_tags is not changed + + - name: 'Update TCP health check - add tags - idempotency' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + anotherTag: anotherValue + purge_tags: false + register: add_tags + + - name: 'Check result - Update TCP health check - add tags - idempotency' + assert: + that: + - add_tags is successful + - add_tags is not changed + - '"health_check" in add_tags' + - '"id" in _health_check' + - _health_check.id == tcp_check_id + - '"action" in _health_check' + - '"health_check_version" in _health_check' + - '"tags" in _health_check' + - '"CamelCase" in _health_check.tags' + - _health_check.tags['CamelCase'] == 'CamelCaseValue' + - '"snake_case" in _health_check.tags' + - _health_check.tags['snake_case'] == 'snake_case_value' + - '"with space" in _health_check.tags' + - _health_check.tags['with space'] == 'Some value' + - '"anotherTag" in _health_check.tags' + - _health_check.tags['anotherTag'] == 'anotherValue' + - create_check.health_check.action is none + - '"health_check_config" in create_check.health_check' + - '"type" in _check_config' + - '"disabled" in _check_config' + - '"failure_threshold" in _check_config' + - '"request_interval" in _check_config' + - '"fully_qualified_domain_name" not in _check_config' + - '"ip_address" in _check_config' + - '"port" in _check_config' + - '"resource_path" not in _check_config' + - '"search_string" not in _check_config' + - _check_config.disabled == true + - _check_config.type == 'TCP' + - _check_config.request_interval == 30 + - _check_config.failure_threshold == failure_threshold_updated + - _check_config.ip_address == ip_address + - _check_config.port == port + vars: + _health_check: '{{ add_tags.health_check }}' + _check_config: '{{ _health_check.health_check_config }}' + + - name: 'Update TCP health check - purge tags - check_mode' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + anotherTag: anotherValue + purge_tags: true + register: purge_tags + check_mode: true + + - name: 'Check result - Update TCP health check - purge tags - check_mode' + assert: + that: + - purge_tags is successful + - purge_tags is changed + + - name: 'Update TCP health check - purge tags' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + anotherTag: anotherValue + purge_tags: true + register: purge_tags + + - name: 'Check result - Update TCP health check - purge tags' + assert: + that: + - purge_tags is successful + - purge_tags is changed + - '"health_check" in purge_tags' + - '"id" in _health_check' + - _health_check.id == tcp_check_id + - '"action" in _health_check' + - '"health_check_version" in _health_check' + - '"tags" in _health_check' + - '"CamelCase" not in _health_check.tags' + - '"snake_case" not in _health_check.tags' + - '"with space" not in _health_check.tags' + - '"anotherTag" in _health_check.tags' + - _health_check.tags['anotherTag'] == 'anotherValue' + - create_check.health_check.action is none + - '"health_check_config" in create_check.health_check' + - '"type" in _check_config' + - '"disabled" in _check_config' + - '"failure_threshold" in _check_config' + - '"request_interval" in _check_config' + - '"fully_qualified_domain_name" not in _check_config' + - '"ip_address" in _check_config' + - '"port" in _check_config' + - '"resource_path" not in _check_config' + - '"search_string" not in _check_config' + - _check_config.disabled == true + - _check_config.type == 'TCP' + - _check_config.request_interval == 30 + - _check_config.failure_threshold == failure_threshold_updated + - _check_config.ip_address == ip_address + - _check_config.port == port + vars: + _health_check: '{{ purge_tags.health_check }}' + _check_config: '{{ _health_check.health_check_config }}' + + - name: 'Update TCP health check - purge tags - idempotency - check_mode' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + anotherTag: anotherValue + purge_tags: true + register: purge_tags + check_mode: true + + - name: 'Check result - Update TCP health check - purge tags - idempotency - check_mode' + assert: + that: + - purge_tags is successful + - purge_tags is not changed + + - name: 'Update TCP health check - purge tags - idempotency' + route53_health_check: + state: present + ip_address: '{{ ip_address }}' + port: '{{ port }}' + type: '{{ type }}' + tags: + anotherTag: anotherValue + purge_tags: true + register: purge_tags + + - name: 'Check result - Update TCP health check - purge tags - idempotency' + assert: + that: + - purge_tags is successful + - purge_tags is not changed + - '"health_check" in purge_tags' + - '"id" in _health_check' + - _health_check.id == tcp_check_id + - '"action" in _health_check' + - '"health_check_version" in _health_check' + - '"tags" in _health_check' + - '"CamelCase" not in _health_check.tags' + - '"snake_case" not in _health_check.tags' + - '"with space" not in _health_check.tags' + - '"anotherTag" in _health_check.tags' + - _health_check.tags['anotherTag'] == 'anotherValue' + - create_check.health_check.action is none + - '"health_check_config" in create_check.health_check' + - '"type" in _check_config' + - '"disabled" in _check_config' + - '"failure_threshold" in _check_config' + - '"request_interval" in _check_config' + - '"fully_qualified_domain_name" not in _check_config' + - '"ip_address" in _check_config' + - '"port" in _check_config' + - '"resource_path" not in _check_config' + - '"search_string" not in _check_config' + - _check_config.disabled == true + - _check_config.type == 'TCP' + - _check_config.request_interval == 30 + - _check_config.failure_threshold == failure_threshold_updated + - _check_config.ip_address == ip_address + - _check_config.port == port + vars: + _health_check: '{{ purge_tags.health_check }}' _check_config: '{{ _health_check.health_check_config }}' # Delete the check @@ -468,6 +886,7 @@ - _health_check.id != tcp_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -533,6 +952,7 @@ - _health_check.id == match_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -595,6 +1015,7 @@ - _health_check.id == match_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -658,6 +1079,7 @@ - _health_check.id == match_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -721,6 +1143,7 @@ - _health_check.id == match_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -784,6 +1207,7 @@ - _health_check.id == match_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -888,6 +1312,11 @@ resource_path: '{{ resource_path }}' failure_threshold: '{{ failure_threshold }}' disabled: true + tags: + CamelCase: CamelCaseValue + snake_case: snake_case_value + "with space": Some value + purge_tags: false register: create_complex check_mode: true @@ -909,6 +1338,11 @@ resource_path: '{{ resource_path }}' failure_threshold: '{{ failure_threshold }}' disabled: true + tags: + CamelCase: CamelCaseValue + snake_case: snake_case_value + "with space": Some value + purge_tags: false register: create_complex - name: 'Check result - Create Complex health check' @@ -922,6 +1356,13 @@ - _health_check.id != match_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' + - '"CamelCase" in _health_check.tags' + - _health_check.tags['CamelCase'] == 'CamelCaseValue' + - '"snake_case" in _health_check.tags' + - _health_check.tags['snake_case'] == 'snake_case_value' + - '"with space" in _health_check.tags' + - _health_check.tags['with space'] == 'Some value' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -961,6 +1402,11 @@ resource_path: '{{ resource_path }}' failure_threshold: '{{ failure_threshold }}' disabled: true + tags: + CamelCase: CamelCaseValue + snake_case: snake_case_value + "with space": Some value + purge_tags: false register: create_complex check_mode: true @@ -982,6 +1428,11 @@ resource_path: '{{ resource_path }}' failure_threshold: '{{ failure_threshold }}' disabled: true + tags: + CamelCase: CamelCaseValue + snake_case: snake_case_value + "with space": Some value + purge_tags: false register: create_complex - name: 'Check result - Create Complex health check - idempotency' @@ -994,6 +1445,13 @@ - _health_check.id == complex_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' + - '"CamelCase" in _health_check.tags' + - _health_check.tags['CamelCase'] == 'CamelCaseValue' + - '"snake_case" in _health_check.tags' + - _health_check.tags['snake_case'] == 'snake_case_value' + - '"with space" in _health_check.tags' + - _health_check.tags['with space'] == 'Some value' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -1061,6 +1519,13 @@ - _health_check.id == complex_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' + - '"CamelCase" in _health_check.tags' + - _health_check.tags['CamelCase'] == 'CamelCaseValue' + - '"snake_case" in _health_check.tags' + - _health_check.tags['snake_case'] == 'snake_case_value' + - '"with space" in _health_check.tags' + - _health_check.tags['with space'] == 'Some value' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config' @@ -1128,6 +1593,13 @@ - _health_check.id == complex_check_id - '"action" in _health_check' - '"health_check_version" in _health_check' + - '"tags" in _health_check' + - '"CamelCase" in _health_check.tags' + - _health_check.tags['CamelCase'] == 'CamelCaseValue' + - '"snake_case" in _health_check.tags' + - _health_check.tags['snake_case'] == 'snake_case_value' + - '"with space" in _health_check.tags' + - _health_check.tags['with space'] == 'Some value' - create_check.health_check.action is none - '"health_check_config" in create_check.health_check' - '"type" in _check_config'