Stored Iscsi Volume
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());
}
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard