Stored Iscsi Volume Args
Manages an AWS Storage Gateway stored iSCSI volume.
NOTE: The gateway must have a working storage added (e.g., via the
aws.storagegateway.WorkingStorage
resource) before the volume is operational to clients, however the Storage Gateway API will allow volume creation without error in that case and return volume status asWORKING STORAGE NOT CONFIGURED
.
Example Usage
Create Empty Stored iSCSI Volume
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.StoredIscsiVolume;
import com.pulumi.aws.storagegateway.StoredIscsiVolumeArgs;
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 StoredIscsiVolume("example", StoredIscsiVolumeArgs.builder()
.gatewayArn(aws_storagegateway_cache.example().gateway_arn())
.networkInterfaceId(aws_instance.example().private_ip())
.targetName("example")
.preserveExistingData(false)
.diskId(data.aws_storagegateway_local_disk().test().id())
.build());
}
}
Create Stored iSCSI Volume From Snapshot
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.StoredIscsiVolume;
import com.pulumi.aws.storagegateway.StoredIscsiVolumeArgs;
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 StoredIscsiVolume("example", StoredIscsiVolumeArgs.builder()
.gatewayArn(aws_storagegateway_cache.example().gateway_arn())
.networkInterfaceId(aws_instance.example().private_ip())
.snapshotId(aws_ebs_snapshot.example().id())
.targetName("example")
.preserveExistingData(false)
.diskId(data.aws_storagegateway_local_disk().test().id())
.build());
}
}
Import
aws_storagegateway_stored_iscsi_volume
can be imported by using the volume Amazon Resource Name (ARN), e.g.,
$ pulumi import aws:storagegateway/storedIscsiVolume:StoredIscsiVolume example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678
Constructors
Properties
The Amazon Resource Name (ARN) of the gateway.
true
to use Amazon S3 server side encryption with your own AWS KMS key, or false
to use a key managed by Amazon S3. Optional.
The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted.
Specify this field as true
if you want to preserve the data on the local disk. Otherwise, specifying this field as false creates an empty volume.
The snapshot ID of the snapshot to restore as the new stored volumeE.g., snap-1122aabb
.
The name of the iSCSI target used by initiators to connect to the target and as a suffix for the target ARN. The target name must be unique across all volumes of a gateway.