stocky-spring-27341
02/17/2022, 1:28 PMaws.cloudwatch.MetricAlarm
and I want to use <http://aws.lb|aws.lb>.TargetGroup.name
to construct the resource_name
I get this error.
source:
aws.cloudwatch.MetricAlarm(
resource_name=Output.concat("", target_group.name, "-CPUHigh-alarm"),
error:
raise TypeError("Expected resource name to be a string")
TypeError: Expected resource name to be a string
error: an unhandled error occurred: Program exited with non-zero exit code: 1
Surprisingly, this same approach works for aws.cloudwatch.MetricAlarm.dimensions
treat_missing_data="breaching",
dimensions={
"TargetGroup": Output.concat("", args.target_group.name),
},
I haven't been able to figure out how to use existing resource fields when creating new resources. What am I missing?millions-furniture-75402
02/17/2022, 2:11 PMalert-zebra-27114
02/18/2022, 12:25 PMstocky-spring-27341
02/18/2022, 2:06 PMresource_name
from an existing Resource
object? Seeing that resource_name
is a required
property for creating new resources, how do you suggest we set this value dynamically?