Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
102 lines (78 sloc) 3.82 KB

AWS::OpsWorks::Volume

Describes an instance's Amazon EBS volume.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{
  "Type" : "AWS::OpsWorks::Volume",
  "Properties" : {
      "[Ec2VolumeId](#cfn-opsworks-volume-ec2volumeid)" : String,
      "[MountPoint](#cfn-opsworks-volume-mountpoint)" : String,
      "[Name](#cfn-opsworks-volume-name)" : String,
      "[StackId](#cfn-opsworks-volume-stackid)" : String
    }
}

YAML

Type: AWS::OpsWorks::Volume
Properties: 
  [Ec2VolumeId](#cfn-opsworks-volume-ec2volumeid): String
  [MountPoint](#cfn-opsworks-volume-mountpoint): String
  [Name](#cfn-opsworks-volume-name): String
  [StackId](#cfn-opsworks-volume-stackid): String

Properties

Ec2VolumeId The Amazon EC2 volume ID.
Required: Yes
Type: String
Update requires: Replacement

MountPoint The volume mount point. For example, "/mnt/disk1".
Required: No
Type: String
Update requires: No interruption

Name The volume name.
Required: No
Type: String
Update requires: No interruption

StackId The stack ID.
Required: Yes
Type: String
Update requires: Replacement

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref 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.

Examples

Template Snippet

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'

See Also

You can’t perform that action at this time.