True or false: In a CloudFormation template, you can reuse the same logical ID several times to reference the resources in other parts of the template.
A.
True, a logical ID can be used several times to reference the resources in other parts of the template.
B.
False, a logical ID must be unique within the template.
C.
False, you can mention a resource only once and you cannot reference it in other parts of a template.
D.
False, you cannot reference other parts of the template.
Again the wording "reuse" can you reuse it? No, can you reference it to add a resource to it i.e an EBS store yes. Does it have to be unique within a template yes.
So if I am understanding the wording here...Can you "reference" a logical id more than once? Yes i.e adding 2 EBS volumes to it...You would use the logical ID to add each volume. Can you "reuse" that ID for a different resource? No...So what am I missing here? Seems like A to me.
A.
Logical ID
"The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance." From http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/concept-resources.html
Shouldn't this be A, according to it's own supporting information: In AWS CloudFormation, the logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. You use the logical name to reference the resource in other parts of the template. http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/concept-resources.html
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
acloudguru
Highly Voted 3 years, 9 months agoSkyZeroZx
Most Recent 2 years, 2 months agorostykm
2 years, 10 months agojyrajan69
3 years, 6 months agocldy
3 years, 8 months agoMIU
3 years, 9 months agoMerlin1
3 years, 9 months agosantanu77
3 years, 10 months agolephi16
3 years, 10 months agolephi16
3 years, 10 months ago