AWS::OpsWorks::Volume
The AWS::OpsWorks::Volume resource registers an Amazon Elastic Block Store (Amazon EBS) volume with
an AWS OpsWorks stack.
Topics
Syntax
JSON
{ "Type" : "AWS::OpsWorks::Volume", "Properties" : { "Ec2VolumeId" :String, "MountPoint" :String, "Name" :String, "StackId" :String} }
YAML
Type: "AWS::OpsWorks::Volume" Properties: Ec2VolumeId:StringMountPoint:StringName:StringStackId:String
Properties
Ec2VolumeId-
The ID of the Amazon EBS volume to register with the AWS OpsWorks stack.
Required: Yes
Type: String
Update requires: Replacement
MountPoint-
The mount point for the Amazon EBS volume, such as
/mnt/disk1.Required: No
Type: String
Update requires: No interruption
Name-
A name for the Amazon EBS volume.
Required: No
Type: String
Update requires: No interruption
StackId-
The ID of the AWS OpsWorks stack that AWS OpsWorks registers the volume to.
Required: Yes
Type: String
Update requires: Replacement
Return Value
Ref
When the logical ID of this resource is provided to the Ref intrinsic
function, Ref returns the AWS OpsWorks volume ID, such as
1ab23cd4-92ff-4501-b37c-example.
For more information about using the Ref function, see Ref.
Example
The following example registers the ec2volume volume with the
opsworksstack stack, both of which are declared elsewhere in the same
template.
JSON
"opsworksVolume": { "Type": "AWS::OpsWorks::Volume", "Properties": { "Ec2VolumeId": { "Ref": "ec2volume" }, "MountPoint": "/dev/sdb", "Name": "testOpsWorksVolume", "StackId": { "Ref": "opsworksstack" } } }
YAML
opsworksVolume: Type: AWS::OpsWorks::Volume Properties: Ec2VolumeId: !Ref 'ec2volume' MountPoint: /dev/sdb Name: testOpsWorksVolume StackId: !Ref 'opsworksstack'
