Provides a Api Gateway Instance resource.
For information about Api Gateway Instance and how to use it, see What is Instance.
Basic Usage
variable "name" {
default = "terraform-example"
}
provider "alicloud" {
region = "cn-hangzhou"
}
resource "alicloud_api_gateway_instance" "default" {
instance_name = var.name
instance_spec = "api.s1.small"
https_policy = "HTTPS2_TLS1_0"
zone_id = "cn-hangzhou-MAZ6"
payment_type = "PayAsYouGo"
user_vpc_id = "1709116870"
instance_type = "normal"
}
The following arguments are supported:
duration
- (Optional) The time of the instance package. Valid values:
When the value of> ChargeType is PrePaid, this parameter is available and must be passed in.
egress_ipv6_enable
- (Optional) Does IPV6 Capability Support.https_policy
- (Required) Https policy.instance_name
- (Required) Instance name.instance_spec
- (Required, ForceNew) Instance type.instance_type
- (Optional, ForceNew, Computed) Instance type-normal: traditional exclusive instance.payment_type
- (Required, ForceNew) The payment type of the resource.pricing_cycle
- (Optional) The subscription instance is of the subscription year or month type. The value range is as follows:
The following attributes are exported:
id
- The ID of the resource supplied above.create_time
- Creation time.status
- The status of the resource.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Instance.delete
- (Defaults to 5 mins) Used when delete the Instance.update
- (Defaults to 5 mins) Used when update the Instance.Api Gateway Instance can be imported using the id, e.g.
$ terraform import alicloud_api_gateway_instance.example <id>