terraform-provider-stripe icon indicating copy to clipboard operation
terraform-provider-stripe copied to clipboard

importing price with tiered/graduated price

Open dbarrosop opened this issue 6 months ago • 3 comments

Hello, thanks for this awesome terraform provider. I am trying to import a price with a tiered/graduate scheme and looks like the tiers aren't correctly imported:

$ terraform state show stripe_price.xxx
# stripe_price.xxx:
resource "stripe_price" "xxx" {
    active         = true
    billing_scheme = "tiered"
    currency       = "usd"
    id             = "price_xxxx"
    lookup_key     = null
    metadata       = {}
    nickname       = null
    product        = "prod_xxx"
    tax_behavior   = "inclusive"
    tiers_mode     = "graduated"
    type           = "recurring"

    recurring {
        aggregate_usage = "max"
        interval        = "month"
        interval_count  = 1
        usage_type      = "metered"
    }
}

This is a problem because if I try to apply afterwards it wants to add all the tiers causing the price to be destroyed and recreated.

Regards

dbarrosop avatar Aug 23 '24 10:08 dbarrosop