Volume Args
data class VolumeArgs(val availabilityZone: Output<String>? = null, val encrypted: Output<Boolean>? = null, val finalSnapshot: Output<Boolean>? = null, val iops: Output<Int>? = null, val kmsKeyId: Output<String>? = null, val multiAttachEnabled: Output<Boolean>? = null, val outpostArn: Output<String>? = null, val size: Output<Int>? = null, val snapshotId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val throughput: Output<Int>? = null, val type: Output<String>? = null) : ConvertibleToJava<VolumeArgs>
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",
},
});Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.ebs.Volume("example",
availability_zone="us-west-2a",
size=40,
tags={
"Name": "HelloWorld",
})Content copied to clipboard
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" },
},
});
});Content copied to clipboard
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
})
}Content copied to clipboard
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());
}
}Content copied to clipboard
resources:
example:
type: aws:ebs:Volume
properties:
availabilityZone: us-west-2a
size: 40
tags:
Name: HelloWorldContent copied to clipboard
NOTE: At least one of
sizeorsnapshot_idis required when specifying an EBS volume
Import
Using pulumi import, import EBS Volumes using the id. For example:
$ pulumi import aws:ebs/volume:Volume id vol-049df61146c4d7901Content copied to clipboard
Constructors
Link copied to clipboard
fun VolumeArgs(availabilityZone: Output<String>? = null, encrypted: Output<Boolean>? = null, finalSnapshot: Output<Boolean>? = null, iops: Output<Int>? = null, kmsKeyId: Output<String>? = null, multiAttachEnabled: Output<Boolean>? = null, outpostArn: Output<String>? = null, size: Output<Int>? = null, snapshotId: Output<String>? = null, tags: Output<Map<String, String>>? = null, throughput: Output<Int>? = null, type: Output<String>? = null)
Functions
Properties
Link copied to clipboard
Link copied to clipboard
The 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
Link copied to clipboard