page_title | subcategory | description |
---|---|---|
epilot-product_coupon Resource - terraform-provider-epilot-product |
Coupon Resource |
Coupon Resource
resource "epilot-product_coupon" "my_coupon" {
active = true
additional = {
key = jsonencode("value"),
}
cashback_period = "12"
category = "discount"
description = "...my_description..."
files = {
dollar_relation = [
{
entity_id = "123e4567-e89b-12d3-a456-426614174000"
tags = [
"..."
]
}
]
}
fixed_value = 3.79
fixed_value_currency = "EUR"
fixed_value_decimal = "...my_fixed_value_decimal..."
manifest = [
"123e4567-e89b-12d3-a456-426614174000"
]
name = "...my_name..."
percentage_value = "...my_percentage_value..."
prices = {
dollar_relation = [
{
entity_id = "123e4567-e89b-12d3-a456-426614174000"
tags = [
"..."
]
}
]
}
promo_code_usage = "{ \"see\": \"documentation\" }"
promo_codes = [
{
code = "...my_code..."
has_usage_limit = false
id = "...my_id..."
usage_limit = 8.12
}
]
requires_promo_code = false
schema = "coupon"
tags = [
"..."
]
type = "fixed"
}
active
(Boolean)category
(String) must be one of ["discount", "cashback"]name
(String)type
(String) must be one of ["fixed", "percentage"]
additional
(Map of String) Additional fields that are not part of the schemacashback_period
(String) The cashback period, for now it's limited to either 0 months or 12 months. must be one of ["0", "12"]description
(String)files
(Attributes) (see below for nested schema)fixed_value
(Number) Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.fixed_value_currency
(String) Use if type is set to fixed. Three-letter ISO currency code, in lowercase.fixed_value_decimal
(String) Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.manifest
(List of String) Manifest ID used to create/update the entitypercentage_value
(String) Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.prices
(Attributes) (see below for nested schema)promo_code_usage
(String) Map of ids of promo codes with their usage count. Parsed as JSON.promo_codes
(Attributes List) (see below for nested schema)requires_promo_code
(Boolean) Whether the coupon requires a promo code to be appliedschema
(String) must be "coupon"tags
(List of String)
acl
(Attributes) Access control list (ACL) for an entity. Defines sharing access to external orgs or users. (see below for nested schema)created_at
(String)id
(String) The ID of this resource.org
(String) Organization Id the entity belongs toowners
(Attributes List) (see below for nested schema)title
(String)updated_at
(String)
Optional:
dollar_relation
(Attributes List) (see below for nested schema)
Optional:
entity_id
(String)tags
(List of String)
Optional:
dollar_relation
(Attributes List) (see below for nested schema)
Optional:
entity_id
(String)tags
(List of String)
Optional:
code
(String) The code of the promo code. Not Nullhas_usage_limit
(Boolean) Whether the promo code has a usage limitid
(String) The id of the promo code. Not Nullusage_limit
(Number) The usage limit of the promo code
Read-Only:
delete
(List of String)edit
(List of String)view
(List of String)
Read-Only:
org_id
(String)user_id
(String)
Import is supported using the following syntax:
terraform import epilot-product_coupon.my_epilot-product_coupon "123e4567-e89b-12d3-a456-426614174000"