Closed wmuizelaar closed 5 years ago
@wmuizelaar The issue description is confusing to me - is this a reference to an issue on another tracker? This is something we would like to have. @paddycarver I was considering looking into this as a first contribution and getting inside TF - anything particular that makes this a breaking change?
@Legogris I definitely copy-pasted too much - editted the description to fit better :)
Hey @Legogris!
For a bit of context: We don't currently support import because the (v1
) API at the time that we implemented the feature didn't expose enough information to do so. It didn't have support for clusters yet, so part of what a cluster does is baked into google_bigtable_instance
. There is now a v2
API that introduces clusters & it should have all the information necessary to do an import.
Cloud Bigtable is also using a different API client than most of the provider. We normally use the Go REST api clients but Cloud Bigtable is only supported by a Cloud Client Library. This means that some of the patterns in the rest of the codebase aren't very useful to reference.
It's definitely on my (personal) radar to look at our Cloud Bigtable support and bring it up to date with the v2
API, but I haven't had the time to sit down and work out how to get it there (and have no timeline/estimate for when I will unfortunately 🙁 ).
If import support is really important for you, we will gladly accept a community contribution here! I just wanted to be transparent that "Here be dragons"
and that it may not be a great candidate for a first contribution. You would be working with a different client than the rest of the provider & google_bigtable_instance
is an amalgam of an instance and a cluster and it may a little grungy to get all the right fields in the right place without introducing any breaking changes.
Any news on this one? We migrated all of our codebase to 0.12, and the only service we have left is Bigtable. Is there any workaround for importing a cluster?
Other than manual remediation of state, not really. I'm likely picking up a general goal next quarter to improve the UX for Bigtable resources, which would include import. There should be news by EOQ depending exactly what order that work falls in.
about a quarter later -- any update on this?
This is assigned to me to complete by EOQ, I'm hoping to get to it soon after HashiConf.
Some fields aren't exposed in the client library that are needed to import the resource. I've made a change upstreaming one so far- once I can get https://code-review.googlesource.com/c/gocloud/+/45770 to land, I have a PR drafted locally which will add support for google_bigtable_instance
.
google_bigtable_table
will follow after that, I may need to expose fields upstream in the client lib for that as well.
Hi @rileykarson! Just curious if you had any update on google_bigtable_table
import support, and if you're also working on import functionality for google_bigtable_gc_policy
.
I haven't gotten around to this yet- getting the library changes for google_bigtable_instance
took longer than expected, and I had some time sensitive work come up. I'm hoping to finish up google_bigtable_table
and hopefully google_bigtable_gc_policy
within the next few weeks.
google_bigtable_table
will have import support in 2.20.0
, ~midway next week probably. Sorry for how drawn out resolving this was!
google_bigtable_gc_policy
isn't currently possible to support, the client library only lets us read back a string representation of the GCPolicy. While we could modify the client again, it's less clear-cut of a modification than the change with instances/clusters.
Given that, I'm going to close out this issue based on having instance/table supported. Please open a new issue if anyone is interested in import support for GCPolicy!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
Terraform Version
0.11.1
Affected Resource(s)
Please list the resources as a list, for example:
Expected Behavior
I can import the resources on my tfstate
Actual Behavior
Import is not supported for resource:
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform import <resource> xxxx