Ezzat
Ezzat

Reputation: 901

Reuse existing resources as a parameters in cloudformation

I want to create cloudfomation template that reuse the existing resources for example I want to create a new instance and attach it to an existing loadbalancer and I want to select the loadbalancer form my existing loadbalancers in a dropdown.

Is there anyway to make cloudformation template to show the existing resource and reuse it ?

Upvotes: 0

Views: 663

Answers (1)

mahendra rathod
mahendra rathod

Reputation: 1638

You can not list the loadbalancer in the dropdown as its not available in AWS-Specific Parameter Types.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-specific-parameter-types

But you can use aws Fn::ImportValue to import existing loadbalancer value.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html

Upvotes: 2

Related Questions