You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, and thank you for this provider! Looking forward to making use of it.
I was fiddling with some of the basic usage stuff outlined in the README and ran into a snag.
Created the example MLK coupon with code = "MLK_DAY"
Changed the code value in my .tf file
Ran terraform apply --auto-approve
Noted in the Stripe Dashboard UI that the coupon code did not change, and remained as MLK_DAY
Ran terraform apply --auto-approve again
Coupon code still stubbornly staying on MLK_DAY
Deleted coupon manually in Stripe Dashboard UI
Ran terraform apply --auto-approve again and got the following:
Error: {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"status": 404,
"message": "No such coupon: 'MLK_DAY'",
"param": "coupon",
"request_id": "req_bCoPRMtuRHTxLW",
"type": "invalid_request_error"
}
Will take a quick look and see if I can put a PR together to straighten things out.
The 2 issues as I see them:
can't update coupon code, even if it requires deletion and (re)creation of said coupon
if coupon was previously created by Terraform but then deleted outside of a Terraform operation, Terraform should handle it a little more gracefully, and probably attempt to recreate as it sees fit
The text was updated successfully, but these errors were encountered:
For other folks landing on this issue with the same problem: a workaround is to manually remove all resources that this TF provider reports as missing and then re-running TF plan/apply.
For example, for an output like this:
$ terraform apply
Acquiring state lock. This may take a few moments...
stripe_plan.tier_0_monthly_subscription: Refreshing state... [id=plan_JMq4PtQeTJIdrZ]
Error: {"code":"resource_missing","doc_url":"https://stripe.com/docs/error-codes/resource-missing","status":404,"message":"No such plan: 'plan_JMq4PtQeTJIdrZ'","param":"plan","request_id":"req_hdinACXCrr1Mw0","type":"invalid_request_error"}
Running
terraform state rm 'stripe_plan.tier_0_monthly_subscription'
and then re-running terraform apply would likely fix the problem. It's possible that the TF provider will complain of other missing resources, so just keep terraform state rming them until it doesn't complain.
Hi there, and thank you for this provider! Looking forward to making use of it.
I was fiddling with some of the basic usage stuff outlined in the README and ran into a snag.
code = "MLK_DAY"
code
value in my.tf
fileterraform apply --auto-approve
MLK_DAY
terraform apply --auto-approve
againMLK_DAY
terraform apply --auto-approve
again and got the following:Will take a quick look and see if I can put a PR together to straighten things out.
The 2 issues as I see them:
The text was updated successfully, but these errors were encountered: