Gateway

class Gateway : KotlinCustomResource

Manages an AWS Storage Gateway file, tape, or volume gateway in the provider region.

NOTE: The Storage Gateway API requires the gateway to be connected to properly return information after activation. If you are receiving The specified gateway is not connected errors during resource creation (gateway activation), ensure your gateway instance meets the Storage Gateway requirements.

Example Usage

Local Cache

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.VolumeAttachment;
import com.pulumi.aws.ec2.VolumeAttachmentArgs;
import com.pulumi.aws.storagegateway.StoragegatewayFunctions;
import com.pulumi.aws.storagegateway.inputs.GetLocalDiskArgs;
import com.pulumi.aws.storagegateway.Cache;
import com.pulumi.aws.storagegateway.CacheArgs;
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 testVolumeAttachment = new VolumeAttachment("testVolumeAttachment", VolumeAttachmentArgs.builder()
.deviceName("/dev/xvdb")
.volumeId(aws_ebs_volume.test().id())
.instanceId(aws_instance.test().id())
.build());
final var testLocalDisk = StoragegatewayFunctions.getLocalDisk(GetLocalDiskArgs.builder()
.diskNode(testVolumeAttachment.deviceName())
.gatewayArn(aws_storagegateway_gateway.test().arn())
.build());
var testCache = new Cache("testCache", CacheArgs.builder()
.diskId(testLocalDisk.applyValue(getLocalDiskResult -> getLocalDiskResult).applyValue(testLocalDisk -> testLocalDisk.applyValue(getLocalDiskResult -> getLocalDiskResult.diskId())))
.gatewayArn(aws_storagegateway_gateway.test().arn())
.build());
}
}

FSx File Gateway

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.Gateway;
import com.pulumi.aws.storagegateway.GatewayArgs;
import com.pulumi.aws.storagegateway.inputs.GatewaySmbActiveDirectorySettingsArgs;
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 Gateway("example", GatewayArgs.builder()
.gatewayIpAddress("1.2.3.4")
.gatewayName("example")
.gatewayTimezone("GMT")
.gatewayType("FILE_FSX_SMB")
.smbActiveDirectorySettings(GatewaySmbActiveDirectorySettingsArgs.builder()
.domainName("corp.example.com")
.password("avoid-plaintext-passwords")
.username("Admin")
.build())
.build());
}
}

S3 File Gateway

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.Gateway;
import com.pulumi.aws.storagegateway.GatewayArgs;
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 Gateway("example", GatewayArgs.builder()
.gatewayIpAddress("1.2.3.4")
.gatewayName("example")
.gatewayTimezone("GMT")
.gatewayType("FILE_S3")
.build());
}
}

Tape Gateway

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.Gateway;
import com.pulumi.aws.storagegateway.GatewayArgs;
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 Gateway("example", GatewayArgs.builder()
.gatewayIpAddress("1.2.3.4")
.gatewayName("example")
.gatewayTimezone("GMT")
.gatewayType("VTL")
.mediumChangerType("AWS-Gateway-VTL")
.tapeDriveType("IBM-ULT3580-TD5")
.build());
}
}

Volume Gateway (Cached)

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.Gateway;
import com.pulumi.aws.storagegateway.GatewayArgs;
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 Gateway("example", GatewayArgs.builder()
.gatewayIpAddress("1.2.3.4")
.gatewayName("example")
.gatewayTimezone("GMT")
.gatewayType("CACHED")
.build());
}
}

Volume Gateway (Stored)

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.Gateway;
import com.pulumi.aws.storagegateway.GatewayArgs;
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 Gateway("example", GatewayArgs.builder()
.gatewayIpAddress("1.2.3.4")
.gatewayName("example")
.gatewayTimezone("GMT")
.gatewayType("STORED")
.build());
}
}

Import

aws_storagegateway_gateway can be imported by using the gateway Amazon Resource Name (ARN), e.g.,

$ pulumi import aws:storagegateway/gateway:Gateway example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678

Certain resource arguments, like gateway_ip_address do not have a Storage Gateway API method for reading the information after creation, either omit the argument from the provider configuration or use ignoreChanges to hide the difference. terraform resource "aws_storagegateway_gateway" "example" {

... other configuration ...

gateway_ip_address = aws_instance.sgw.private_ip

There is no Storage Gateway API for reading gateway_ip_address

lifecycle { ignore_changes = "gateway_ip_address" } }

Properties

Link copied to clipboard
val activationKey: Output<String>

Gateway activation key during resource creation. Conflicts with gateway_ip_address. Additional information is available in the Storage Gateway User Guide.

Link copied to clipboard
val arn: Output<String>

Amazon Resource Name (ARN) of the gateway.

Link copied to clipboard

The average download bandwidth rate limit in bits per second. This is supported for the CACHED, STORED, and VTL gateway types.

Link copied to clipboard

The average upload bandwidth rate limit in bits per second. This is supported for the CACHED, STORED, and VTL gateway types.

Link copied to clipboard

The Amazon Resource Name (ARN) of the Amazon CloudWatch log group to use to monitor and log events in the gateway.

Link copied to clipboard
val ec2InstanceId: Output<String>

The ID of the Amazon EC2 instance that was used to launch the gateway.

Link copied to clipboard
val endpointType: Output<String>

The type of endpoint for your gateway.

Link copied to clipboard
val gatewayId: Output<String>

Identifier of the gateway.

Link copied to clipboard

Gateway IP address to retrieve activation key during resource creation. Conflicts with activation_key. Gateway must be accessible on port 80 from where this provider is running. Additional information is available in the Storage Gateway User Guide.

Link copied to clipboard
val gatewayName: Output<String>

Name of the gateway.

Link copied to clipboard

An array that contains descriptions of the gateway network interfaces. See Gateway Network Interface.

Link copied to clipboard
val gatewayTimezone: Output<String>

Time zone for the gateway. The time zone is of the format "GMT", "GMT-hr:mm", or "GMT+hr:mm". For example, GMT-4:00 indicates the time is 4 hours behind GMT. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.

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

Type of the gateway. The default value is STORED. Valid values: CACHED, FILE_FSX_SMB, FILE_S3, STORED, VTL.

Link copied to clipboard

VPC endpoint address to be used when activating your gateway. This should be used when your instance is in a private subnet. Requires HTTP access from client computer running this provider. More info on what ports are required by your VPC Endpoint Security group in Activating a Gateway in a Virtual Private Cloud.

Link copied to clipboard
val hostEnvironment: Output<String>

The type of hypervisor environment used by the host.

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

The gateway's weekly maintenance start time information, including day and time of the week. The maintenance time is the time in your gateway's time zone. More details below.

Link copied to clipboard

Type of medium changer to use for tape gateway. This provider cannot detect drift of this argument. Valid values: STK-L700, AWS-Gateway-VTL, IBM-03584L32-0402.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Nested argument with Active Directory domain join information for Server Message Block (SMB) file shares. Only valid for FILE_S3 and FILE_FSX_SMB gateway types. Must be set before creating ActiveDirectory authentication SMB file shares. More details below.

Link copied to clipboard

Specifies whether the shares on this gateway appear when listing shares.

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

Guest password for Server Message Block (SMB) file shares. Only valid for FILE_S3 and FILE_FSX_SMB gateway types. Must be set before creating GuestAccess authentication SMB file shares. This provider can only detect drift of the existence of a guest password, not its actual value from the gateway. This provider can however update the password with changing the argument.

Link copied to clipboard

Specifies the type of security strategy. Valid values are: ClientSpecified, MandatorySigning, and MandatoryEncryption. See Setting a Security Level for Your Gateway for more information.

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

Key-value map of resource tags. 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 tapeDriveType: Output<String>?

Type of tape drive to use for tape gateway. This provider cannot detect drift of this argument. Valid values: IBM-ULT3580-TD5.

Link copied to clipboard
val urn: Output<String>