Volume

class Volume : KotlinCustomResource

Manages a single EBS volume.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ebs.Volume("example", {
availabilityZone: "us-west-2a",
size: 40,
tags: {
Name: "HelloWorld",
},
});
import pulumi
import pulumi_aws as aws
example = aws.ebs.Volume("example",
availability_zone="us-west-2a",
size=40,
tags={
"Name": "HelloWorld",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ebs.Volume("example", new()
{
AvailabilityZone = "us-west-2a",
Size = 40,
Tags =
{
{ "Name", "HelloWorld" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ebs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ebs.NewVolume(ctx, "example", &ebs.VolumeArgs{
AvailabilityZone: pulumi.String("us-west-2a"),
Size: pulumi.Int(40),
Tags: pulumi.StringMap{
"Name": pulumi.String("HelloWorld"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ebs.Volume;
import com.pulumi.aws.ebs.VolumeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Volume("example", VolumeArgs.builder()
.availabilityZone("us-west-2a")
.size(40)
.tags(Map.of("Name", "HelloWorld"))
.build());
}
}
resources:
example:
type: aws:ebs:Volume
properties:
availabilityZone: us-west-2a
size: 40
tags:
Name: HelloWorld

Import

Using pulumi import, import EBS Volumes using the id. For example:

$ pulumi import aws:ebs/volume:Volume id vol-049df61146c4d7901

Properties

Link copied to clipboard
val arn: Output<String>

Volume ARN (e.g., arn:aws:ec2:us-east-1:123456789012:volume/vol-59fcb34e).

Link copied to clipboard

Availability zone where the EBS volume will exist.

Link copied to clipboard
val createTime: Output<String>

Timestamp when volume creation was initiated.

Link copied to clipboard
val encrypted: Output<Boolean>

If true, the disk will be encrypted.

Link copied to clipboard
val finalSnapshot: Output<Boolean>?

If true, snapshot will be created before volume deletion. Any tags on the volume will be migrated to the snapshot. By default set to false

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val iops: Output<Int>

Amount of IOPS to provision for the disk. Only valid for type of io1, io2 or gp3.

Link copied to clipboard
val kmsKeyId: Output<String>

ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true. Note: The provider must be running with credentials which have the GenerateDataKeyWithoutPlaintext permission on the specified KMS key as required by the EBS KMS CMK volume provisioning process to prevent a volume from being created and almost immediately deleted.

Link copied to clipboard

Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported on io1 and io2 volumes.

Link copied to clipboard
val outpostArn: Output<String>?

Amazon Resource Name (ARN) of the Outpost.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val size: Output<Int>

Size of the drive in GiBs.

Link copied to clipboard
val snapshotId: Output<String>

A snapshot to base the EBS volume off of.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val throughput: Output<Int>

Throughput that the volume supports, in MiB/s. Only valid for type of gp3.

Link copied to clipboard
val type: Output<String>

Type of EBS volume. Can be standard, gp2, gp3, io1, io2, sc1 or st1 (Default: gp2).

Link copied to clipboard
val urn: Output<String>