diff --git a/spacelift/resource_bitbucket_datacenter_integration.go b/spacelift/resource_bitbucket_datacenter_integration.go index 470f9565..5521e9d7 100644 --- a/spacelift/resource_bitbucket_datacenter_integration.go +++ b/spacelift/resource_bitbucket_datacenter_integration.go @@ -23,6 +23,9 @@ func resourceBitbucketDatacenterIntegration() *schema.Resource { ReadContext: resourceBitbucketDatacenterIntegrationRead, UpdateContext: resourceBitbucketDatacenterIntegrationUpdate, DeleteContext: resourceBitbucketDatacenterIntegrationDelete, + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, Schema: map[string]*schema.Schema{ bitbucketDatacenterID: { diff --git a/spacelift/resource_bitbucket_datacenter_integration_test.go b/spacelift/resource_bitbucket_datacenter_integration_test.go index 1bb4c5b2..963aa23c 100644 --- a/spacelift/resource_bitbucket_datacenter_integration_test.go +++ b/spacelift/resource_bitbucket_datacenter_integration_test.go @@ -89,6 +89,12 @@ func TestBitbucketDatacenterIntegrationResource(t *testing.T) { Attribute("labels.#", Equals("0")), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"access_token"}, // specified only in the config + }, { Config: configBitbucket("newUserName", host, token, "new descr", `["new label1"]`), Check: Resource(