terraform-provider-netlify icon indicating copy to clipboard operation
terraform-provider-netlify copied to clipboard

Support importing of sites

Open felipesere opened this issue 6 years ago • 5 comments
trafficstars

Importing of sites

I'm currently in the process of consolidating all of my online infrastructure into Terraform and would thus need to import my existing site into state.

Would this require special knowledge or is it I can contribute with some basic Go abilities?

felipesere avatar Aug 07 '19 20:08 felipesere

You should be able to just run

terraform import netlify_site.my_website <api_id>

You can find api_id in

https://app.netlify.com/sites/my-website/settings/general

However there is a bug in the netlify go client and it can't import. https://github.com/netlify/open-api/pull/170 needs to be merged and the package updated in this repo to fix imports.

Mongey avatar Aug 13 '19 21:08 Mongey

It looks like https://github.com/netlify/open-api/pull/200 and https://github.com/netlify/open-api/pull/164 have been merged. Possible to spin a 0.4.0 with these changes soon?

andyshinn avatar Oct 13 '19 00:10 andyshinn

I hope for the 0.4.0 release. I just hit https://github.com/netlify/open-api/issues/162 same issue. Thanks!

MH4GF avatar Nov 04 '19 15:11 MH4GF

There has been a release for the go client :) https://github.com/netlify/open-api/pull/170#issuecomment-566112522

maartenvanvliet avatar Dec 16 '19 16:12 maartenvanvliet

Pinging @kmoe since that's the last person to have contributed to the repo. Would you be able to make a release with the new Netlify version?

martijnarts avatar Dec 18 '19 17:12 martijnarts