alicloud_api_gateway_plugin

Provides a Api Gateway Plugin resource.

For information about Api Gateway Plugin and how to use it, see What is Plugin.

Example Usage

Basic Usage

resource "alicloud_api_gateway_plugin" "default" {
  description = "tf_example"
  plugin_name = "tf_example"
  plugin_data = "{\"allowOrigins\": \"api.foo.com\",\"allowMethods\": \"GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH\",\"allowHeaders\": \"Authorization,Accept,Accept-Ranges,Cache-Control,Range,Date,Content-Type,Content-Length,Content-MD5,User-Agent,X-Ca-Signature,X-Ca-Signature-Headers,X-Ca-Signature-Method,X-Ca-Key,X-Ca-Timestamp,X-Ca-Nonce,X-Ca-Stage,X-Ca-Request-Mode,x-ca-deviceid\",\"exposeHeaders\": \"Content-MD5,Server,Date,Latency,X-Ca-Request-Id,X-Ca-Error-Code,X-Ca-Error-Message\",\"maxAge\": 172800,\"allowCredentials\": true}"
  plugin_type = "cors"
  tags = {
    Created = "TF",
    For     = "example",
  }
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Api Gateway Plugin can be imported using the id, e.g.

$ terraform import alicloud_api_gateway_plugin.example <id>