So how can we reference each value of the array, e.g. the endpoint of the first element? As far as I read the document, there is no way to handle an array of objects with GetAtt intrinsic function.
Usecase: I want to pass the endpoint of the cluster to Lambda environment variable.
Expected Behavior
We can access clusterEndpoints return value just like other string return values.
Observed Behavior
We cannot access clusterEndpoints return value.
Test Cases
Template to test (Note that ARC can only be deployed in us-east-1 region):
{
"Resources": {
"Cluster": {
"Type": "AWS::Route53RecoveryControl::Cluster",
"Properties": {
"Name": "ARC-test"
}
}
},
// THE BELOW IS INVALID
"Outputs": {
"Exportaa": {
"Value": {
"Fn::Select": [
0,
{
"Fn::GetAtt": [
"Cluster",
"ClusterEndpoints" // How can we reference the endpoint?
]
}
]
},
"Export": {
"Name": "aa"
}
}
}
}
Other Details
Workaround: use custom resource to get these values. CDK Example:
Name of the resource
AWS::Route53RecoveryControl::Cluster
Resource Name
No response
Issue Description
Hi, AWS::Route53RecoveryControl::Cluster returns a value called
ClusterEndpoints
, which is an array of objects ClusterEndpoint.So how can we reference each value of the array, e.g. the endpoint of the first element? As far as I read the document, there is no way to handle an array of objects with GetAtt intrinsic function.
Usecase: I want to pass the endpoint of the cluster to Lambda environment variable.
Expected Behavior
We can access clusterEndpoints return value just like other string return values.
Observed Behavior
We cannot access clusterEndpoints return value.
Test Cases
Template to test (Note that ARC can only be deployed in us-east-1 region):
Other Details
Workaround: use custom resource to get these values. CDK Example: