franckverrot / terraform-provider-stripe

A Terraform Provider for Stripe
https://registry.terraform.io/providers/franckverrot/stripe/latest
Mozilla Public License 2.0
242 stars 51 forks source link

Managing prices #48

Open cornerman opened 3 years ago

cornerman commented 3 years ago

Updating certain properties of a price will force a replacement of the stripe_price resource. But prices are not deletable via the API - so we have to do this manually in the dashboard. But furthermore, prices can only be deleted in the dashboard as long as they have not been used. If they have been used, the way to go is to update them as inactive.

Now, managing these with terraform becomes a bit tedious. Deleting/deactivating the price in the dashboard, then do a manually terraform state rm on the resource.

Does it make sense to update them as inactive in this terraform provider in case of destroy? Thereby, we could have a working flow - and if they have not been used, I can still go into the dashboard and delete them.

dmaevac commented 2 years ago

This could be great, but it would also mean that the product delete logic would need to be aware of the state of its prices and archive (instead of delete) the product if it contains any archived prices.