Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

Mar 8, 2024
6730db2 · Mar 8, 2024

History

History
57 lines (39 loc) · 1.43 KB

api_gateway_api_key_attachment.html.markdown

File metadata and controls

57 lines (39 loc) · 1.43 KB
subcategory layout page_title sidebar_current description
API GateWay(apigateway)
tencentcloud
TencentCloud: tencentcloud_api_gateway_api_key_attachment
docs-tencentcloud-resource-api_gateway_api_key_attachment
Use this resource to API gateway attach access key to usage plan.

tencentcloud_api_gateway_api_key_attachment

Use this resource to API gateway attach access key to usage plan.

Example Usage

resource "tencentcloud_api_gateway_api_key" "key" {
  secret_name = "my_api_key"
  status      = "on"
}

resource "tencentcloud_api_gateway_usage_plan" "plan" {
  usage_plan_name         = "my_plan"
  usage_plan_desc         = "nice plan"
  max_request_num         = 100
  max_request_num_pre_sec = 10
}

resource "tencentcloud_api_gateway_api_key_attachment" "attach" {
  api_key_id    = tencentcloud_api_gateway_api_key.key.id
  usage_plan_id = tencentcloud_api_gateway_usage_plan.plan.id
}

Argument Reference

The following arguments are supported:

  • api_key_id - (Required, String, ForceNew) ID of API key.
  • usage_plan_id - (Required, String, ForceNew) ID of the usage plan.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - ID of the resource.

Import

API gateway attach access key can be imported using the id, e.g.

$ terraform import tencentcloud_api_gateway_api_key_attachment.attach [your api_key_id]#usagePlan-gyeafpab