Giter VIP home page Giter VIP logo

Comments (6)

arai-ta avatar arai-ta commented on June 20, 2024 1

Hello @lukasaron,
I wrote a blog about how this Stripe Provider has helped me in my work.
It is written in Japanese, but if you would like to read it. Thank you!!
https://creators-note.chatwork.com/entry/terraform-meets-stripe

from terraform-provider-stripe.

lukasaron avatar lukasaron commented on June 20, 2024 1

Thanks a lot @arai-ta I am glad the Stripe provider helped you achieve your goals!
Unfortunately, my Japanese is very bad and I believe you wrote something nice there.

from terraform-provider-stripe.

lukasaron avatar lukasaron commented on June 20, 2024

Hello,
According to the Stripe API documentation:

"An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account."

Therefore I let Stripe generate the ID. However, when there is a desire to have individual ID I can update the logic.

You don't usually need the ID of the product.

May I ask what is the reason or use case?

from terraform-provider-stripe.

arai-ta avatar arai-ta commented on June 20, 2024

Of course. Thanks for the reply.

I am trying to replace the subscription function of an existing web application with Stripe.
There are multiple ways to map Products in the application to Products in Stripe.

For example;

  • Embed the generated Stripe Product ID in the application code
  • Set the application identifier in the Product metadata
  • Set the Product ID as the application identifier

I think the last case is one of the simpler solutions.

To use this method, it is necessary to set the specified product ID in multiple environments, including Live and Test mode.
I wanted to use Terraform and this Stripe Provider for this purpose.

Also, the document following suggested using the same ID in Live and Test mode.

https://stripe.com/docs/development/checklist#:~:text=use%20the%20same%20ID%20values

When recreating necessary objects in live mode, be certain to use the same ID values (for example, the same plan ID, not the same name) to guarantee your code will continue to work without issue.

So, I think if Terraform can create a Product resource by specifying the ID, it would be useful. :)

Hope this helps your understanding.

from terraform-provider-stripe.

lukasaron avatar lukasaron commented on June 20, 2024

Please have a look at the newly released version 1.6.5 where you can specify the product_id field.

from terraform-provider-stripe.

arai-ta avatar arai-ta commented on June 20, 2024

I've tried version 1.6.6 and confirmed that the product_id field works.
Thank you!

from terraform-provider-stripe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.