Open peterschmidt85 opened 3 months ago
Hi, I am working on this issue and will raise PR soon
@Er-Sadiq Great to hear! If you plan on implementing this, I'd strongly recommend sharing the implementation plan in advance so we can align, ideally with examples.
Also, please note that dstack run
is deprecated and dstack apply
is used instead. So, I suppose the Terraform provider will build on top of dstack apply
. If you have any questions, don't hesitate to write here directly or ping me via Discord.
BTW, one more example: https://registry.terraform.io/providers/databricks/databricks/latest/docs
@peterschmidt85 Hi , I am really sorry but i have been trying to implement terrafrom,and i have made some progress tho i am unable to finish it up i am stuck ,and confused about a certain things here is how i tried to implement it
func Provider() schema.Provider { return &schema.Provider{ Schema: map[string]schema.Schema{ "server_url": { Type: schema.TypeString, Required: true, Description: "The URL of the dstack server.", }, "api_key": { Type: schema.TypeString, Required: true, Description: "The API key for authenticating with the dstack server.", }, }, ResourcesMap: map[string]*schema.Resource{ // here is where i am going to map resource }, ConfigureFunc: configureProvider, } }
func configureProvider(d *schema.ResourceData) (interface{}, error) { return NewDstackClient( d.Get("server_url").(string), d.Get("api_key").(string), ), nil } and so on i am just confused if this the write direction to go with i have Just a little experience with terrafrom altho i have been trying to learn it ,it is still new for me so i use some directions Thank You !!
Can I work on this issue?
Example: https://developer.hashicorp.com/terraform/tutorials/kubernetes/kubernetes-provider
Using terraform will allow to manage multiple configurations at once and reuse the terraform ecosystem.