oci_apigateway_usage_plan

This resource provides the Usage Plan resource in Oracle Cloud Infrastructure API Gateway service.

Creates a new usage plan.

Example Usage

resource "oci_apigateway_usage_plan" "test_usage_plan" {
	#Required
	compartment_id = var.compartment_id
	entitlements {
		#Required
		name = var.usage_plan_entitlements_name

		#Optional
		description = var.usage_plan_entitlements_description
		quota {
			#Required
			operation_on_breach = var.usage_plan_entitlements_quota_operation_on_breach
			reset_policy = var.usage_plan_entitlements_quota_reset_policy
			unit = var.usage_plan_entitlements_quota_unit
			value = var.usage_plan_entitlements_quota_value
		}
		rate_limit {
			#Required
			unit = var.usage_plan_entitlements_rate_limit_unit
			value = var.usage_plan_entitlements_rate_limit_value
		}
		targets {
			#Required
			deployment_id = oci_apigateway_deployment.test_deployment.id
		}
	}

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	display_name = var.usage_plan_display_name
	freeform_tags = {"Department"= "Finance"}
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Usage Plan * update - (Defaults to 20 minutes), when updating the Usage Plan * delete - (Defaults to 20 minutes), when destroying the Usage Plan

Import

UsagePlans can be imported using the id, e.g.

$ terraform import oci_apigateway_usage_plan.test_usage_plan "id"