aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

AWS::Route53::HealthCheck - [BUG] - Ignores update to HealthCheckConfig.RoutingControlArn

Open
#2,028 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::Route53::HealthCheck

### Resource Name

_No response_

### Issue Description

When I update the property HealthCheckConfig.RoutingControlArn of AWS::Route53::HealthCheck resource, the changeset is successfully deployed but the actual resource does not reflect the update.

### Expected Behavior

The changes to HealthCheckConfig.RoutingControlArn is reflected to the actual resource.

### Observed Behavior

The changes to HealthCheckConfig.RoutingControlArn is NOT reflected to the actual resource.

### Test Cases

First, we deploy the template below:

```json
{
"Resources": {
"Cluster": {
"Type": "AWS::Route53RecoveryControl::Cluster",
"Properties": {
"Name": "ARC-Test"
}
},
"RoutingControlPrimary": {
"Type": "AWS::Route53RecoveryControl::RoutingControl",
"Properties": {
"ClusterArn": {
"Ref": "Cluster"
},
"Name": "rc-primary"
}
},
"RoutingControlSecondary": {
"Type": "AWS::Route53RecoveryControl::RoutingControl",
"Properties": {
"ClusterArn": {
"Ref": "Cluster"
},
"Name": "rc-secondary"
}
},
"HealthCheckPrimary": {
"Type": "AWS::Route53::HealthCheck",
"Properties": {
"HealthCheckConfig": {
"RoutingControlArn": {
"Ref": "RoutingControlPrimary"
},
"Type": "RECOVERY_CONTROL"
},
"HealthCheckTags": [
{
"Key": "Name",
"Value": "hc-primary"
}
]
}
},
"HealthCheckSecondary": {
"Type": "AWS::Route53::HealthCheck",
"Properties": {
"HealthCheckConfig": {
"RoutingControlArn": {
"Ref": "RoutingControlPrimary"
},
"Type": "RECOVERY_CONTROL"
},
"HealthCheckTags": [
{
"Key": "Name",
"Value": "hc-secondary"
}
]
}
}
}
}
```

The rc-primary routing control has two health checks assigned (expected).

Screenshot 2024-04-27 at 16 46 21

And rc-secondary does not have any health check (expected).

Screenshot 2024-04-27 at 17 08 46

Next, update a `RoutingControlArn` property with the following template:

```json
{
"Resources": {
"Cluster": {
"Type": "AWS::Route53RecoveryControl::Cluster",
"Properties": {
"Name": "ARC-Test"
}
},
"RoutingControlPrimary": {
"Type": "AWS::Route53RecoveryControl::RoutingControl",
"Properties": {
"ClusterArn": {
"Ref": "Cluster"
},
"Name": "rc-primary"
}
},
"RoutingControlSecondary": {
"Type": "AWS::Route53RecoveryControl::RoutingControl",
"Properties": {
"ClusterArn": {
"Ref": "Cluster"
},
"Name": "rc-secondary"
}
},
"HealthCheckPrimary": {
"Type": "AWS::Route53::HealthCheck",
"Properties": {
"HealthCheckConfig": {
"RoutingControlArn": {
"Ref": "RoutingControlPrimary"
},
"Type": "RECOVERY_CONTROL"
},
"HealthCheckTags": [
{
"Key": "Name",
"Value": "hc-primary"
}
]
}
},
"HealthCheckSecondary": {
"Type": "AWS::Route53::HealthCheck",
"Properties": {
"HealthCheckConfig": {
"RoutingControlArn": {
"Ref": "RoutingControlSecondary"
},
"Type": "RECOVERY_CONTROL"
},
"HealthCheckTags": [
{
"Key": "Name",
"Value": "hc-secondary"
}
]
}
}
}
}
```

The diff is:

```diff
"HealthCheckSecondary": {
"Type": "AWS::Route53::HealthCheck",
"Properties": {
"HealthCheckConfig": {
"RoutingControlArn": {
- "Ref": "RoutingControlPrimary"
+ "Ref": "RoutingControlSecondary"
},
```

Deploy the stack to update the template. Now rc-primary and rc-secondary should be assigned one healthcheck each, but actually rc-primary still has two healthchecks and rc-secondary has none, which means the update is not reflected. (**unexpected**)

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two CloudFormation deployments in the issue, changing HealthCheckSecondary.HealthCheckConfig.RoutingControlArn from RoutingControlPrimary to RoutingControlSecondary. Compare the resulting health-check assignments for rc-primary and rc-secondary. Done means the update moves one health check from the primary routing control to the secondary one.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.