alicloud_apig_http_api
更新时间:
Provides a APIG Http Api resource.
For information about APIG Http Api and how to use it, see What is Http Api.
-> NOTE: Available since v1.240.0.
Example Usage
Basic Usage
variable "name" {
default = "terraform-example"
}
provider "alicloud" {
region = "cn-hangzhou"
}
variable "protocol" {
default = "HTTP"
}
variable "protocol_https" {
default = "HTTPS"
}
data "alicloud_resource_manager_resource_groups" "default" {}
resource "alicloud_apig_http_api" "default" {
http_api_name = var.name
protocols = ["${var.protocol}"]
base_path = "/v1"
description = "zhiwei_pop_examplecase"
type = "Rest"
}
Argument Reference
The following arguments are supported:
base_path
- (Optional) API pathdescription
- (Optional) Description of APIhttp_api_name
- (Required, ForceNew) The name of the resourceprotocols
- (Required, List) API protocolresource_group_id
- (Optional, Computed) The ID of the resource grouptype
- (Optional, ForceNew) API type
Attributes Reference
The following attributes are exported:
id
- The ID of the resource supplied above.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Http Api.delete
- (Defaults to 5 mins) Used when delete the Http Api.update
- (Defaults to 5 mins) Used when update the Http Api.
Import
APIG Http Api can be imported using the id, e.g.
$ terraform import alicloud_apig_http_api.example <id>
文档内容是否对您有帮助?