anyone know of any godaddy providers already avail...
# general
r
anyone know of any godaddy providers already available? if not I was going to take a stab at converting
terraform-godaddy
a bit later today
b
AFAICT, there isn't anything available today but please feel free to convert it and let me know if you need help
r
thanks, will ping you if I run into issues 🙂
b
Not sure which TF provider you want to use for it?
r
I need it to fully-automate my fargate service deploy for work so I'm pretty motivated. Was looking at this one: https://github.com/n3integration/terraform-godaddy
b
ok, so I can give you a few tips here
r
was looking at this issue for main sets of pointers: https://github.com/pulumi/docs/issues/595
b
You can't really use https://github.com/pulumi/pulumi-tf-provider-boilerplate for this as this is an old provider that isn't migrated to the terraform-plugin-sdk
😥 1
I would suggest you look at the implementation of https://github.com/pulumi/pulumi-cloudamqp
it's not an impossible job btw - just needs to use the cloudamqp as an example
👍 1
(I need to make this process much smoother)
r
this
stack72
person is all over this repo
😂 1
🤣
b
😉
hacker
r
so where's
tfgen
com into this? is it a binary result of the
<https://github.com/pulumi/pulumi-terraform>
repo?
b
tfgen is a way of mapping the values in resources.go into our schema for the bridge between the 2 products
r
so it's a proprietary thing? mostly wondering if I've got to mimic the
CustomResource
and
Provider
mappings I see in the
cloudamqp
mappings or if I can follow the 'gen most and customize via golang files' pattern
b
you need to follow the mapping in resources.go
👍 1
the key value pairs of TF resources to their Pulumi counterparts
r
oh I see, resources.go is the definition file which is the main input into tfgen, then?
the makefile makes everything clear
b
yessir
r
ok, I begin to see what you mean about the provider not supporting the new sdk style. So where I'm at is I've got my resources filled out, and the next step would be to build, however the type of the
provider
I'd be imported from the terrform-godaddy project is a different kind of schema than the one that the
tfbridge.ProviderInfo
is expecting. So there's not really a way to map across this, from what I'm seeing?
plus the go cli is yelling at me for trying to import a program rather than a library
here's current state (some paths modified to work for my repo, because naturally I don't have access to the pulumi org 🙂 )
I suppose I could make some helper types as part of this 'wrapper' that define the requisite provider and resources, then call into the
api
types provided by the terraform-godaddy library
b
I can have a look over this and see what's up with it
wait, did you use the pulumi-cloudamqp repo as a starting point here? It looks to me like this is pointing to the wrong deps in go.mod
it shouldn't have a dep on terraform-plugin-sdk
it should be terraform directly
r
ah you meant using cloudamqp as a base
lemme try that then
I thought you meant using it as a 'model' more so than literal 'start with this code'
b
sorry, my bad - the cloudamqp has the correct deps to deal with a structure like that TF provider as it was built off an old provider
r
cool, lemme hack around on this then
ok, re-did my defintions, imports, etc on top of the cloudamqp source code. I see two odd things: * when I run
make
, a reference is added to the pulumi-godaddy package to my
go.mod
file. This is the current package. This strikes me as odd. * when I run
make
, I get the import error about trying to import a program, not a library. This I think is a bug in the upstream library, because the provider is part of
package main
instead of
package godaddy
.
b
Ok can you push your code and I can look again?
r
yeah, it's been updated
b
Just grabbing a bite then can look
r
anything I can look into here to help?