alicloud_cloud_storage_gateway_gateway
更新时间:
Provides a Cloud Storage Gateway Gateway resource.
For information about Cloud Storage Gateway Gateway and how to use it, see What is Gateway.
-> NOTE: Available since v1.132.0.
Example Usage
Basic Usage
variable "name" {
default = "terraform-example"
}
data "alicloud_zones" "default" {
}
resource "random_integer" "default" {
min = 10000
max = 99999
}
resource "alicloud_cloud_storage_gateway_storage_bundle" "default" {
storage_bundle_name = "${var.name}-${random_integer.default.result}"
}
resource "alicloud_vpc" "default" {
vpc_name = "${var.name}-${random_integer.default.result}"
cidr_block = "192.168.0.0/16"
}
resource "alicloud_vswitch" "default" {
vswitch_name = "${var.name}-${random_integer.default.result}"
vpc_id = alicloud_vpc.default.id
cidr_block = "192.168.192.0/24"
zone_id = data.alicloud_zones.default.zones.0.id
}
resource "alicloud_cloud_storage_gateway_gateway" "default" {
storage_bundle_id = alicloud_cloud_storage_gateway_storage_bundle.default.id
type = "File"
location = "Cloud"
gateway_name = var.name
gateway_class = "Standard"
vswitch_id = alicloud_vswitch.default.id
public_network_bandwidth = 50
payment_type = "PayAsYouGo"
description = var.name
}
Argument Reference
The following arguments are supported:
storage_bundle_id- (Required, ForceNew) The ID of the gateway cluster.type- (Required, ForceNew) The type of the gateway. Valid values:File,Iscsi.location- (Required, ForceNew) The location of the gateway. Valid values:Cloud,On_Premise.gateway_name- (Required) The name of the gateway. The name must be1to60characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.gateway_class- (Optional) The specification of the gateway. Valid values:Basic,Standard,Enhanced,Advanced. NOTE: Iflocationis set toCloud,gateway_classis required. Otherwise,gateway_classwill be ignored. Ifpayment_typeis set toSubscription,gateway_classcannot be modified.vswitch_id- (Optional, ForceNew) The ID of the VSwitch. NOTE: Iflocationis set toCloud,vswitch_idis required. Otherwise,vswitch_idwill be ignored.public_network_bandwidth- (Optional, Int) The public bandwidth of the gateway. Default value:5. Valid values:5to200. NOTE:public_network_bandwidthis only valid whenlocationisCloud. Ifpayment_typeis set toSubscription,public_network_bandwidthcannot be modified.payment_type- (Optional, ForceNew) The Payment type of gateway. Valid values:PayAsYouGo,Subscription. NOTE: Since version 1.233.0,payment_typecan be set toSubscription, but even after the gateway is created by Terraform, you still need to make purchases on the console.description- (Optional) The description of the gateway.release_after_expiration- (Optional, Bool, ForceNew) Specifies whether to release the gateway after the subscription expires. Valid values:true: The gateway is released after it expires. The gateway becomes unavailable seven days after the gateway expires.false: The gateway is not released after it expires. After the gateway expires, its billing method is changed toPayAsYouGo. -> NOTE:release_after_expirationis only valid whenpayment_typeisSubscription.
reason_type- (Optional) The type of the reason why you want to delete the gateway.reason_detail- (Optional) The detailed reason why you want to delete the gateway.
Attributes Reference
The following attributes are exported:
id- The resource ID in terraform of Gateway.status- The status of the Gateway.
Timeouts
The timeouts block allows you to specify timeouts for certain actions:
create- (Defaults to 5 mins) Used when create the Gateway.update- (Defaults to 5 mins) Used when update the Gateway.delete- (Defaults to 5 mins) Used when delete the Gateway.
Import
Cloud Storage Gateway Gateway can be imported using the id, e.g.
$ terraform import alicloud_cloud_storage_gateway_gateway.example <id>
该文章对您有帮助吗?