Ref

The intrinsic function Ref returns the value of the specified parameter or resource.

The ref method is the CloudFormation Ref equivalent.

Example Snippet

resource("MyEip", "AWS::EC2::EIP",
  InstanceId: ref("MyEc2Instance")
)

Example Output

Resources:
  MyEip:
    Type: AWS::EC2::EIP
    Properties:
      InstanceId:
        Ref: MyEc2Instance

Back to Intrinsic Functions List.