diff --git a/examples/resources/proxmox_virtual_environment_acme_account/import.sh b/examples/resources/proxmox_virtual_environment_acme_account/import.sh new file mode 100644 index 000000000..0f08c8ff9 --- /dev/null +++ b/examples/resources/proxmox_virtual_environment_acme_account/import.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh +# ACME accounts can be imported using their name, e.g.: +terraform import proxmox_virtual_environment_acme_account.example example diff --git a/fwprovider/acme/resource_acme_account.go b/fwprovider/acme/resource_acme_account.go index cafc672ec..37c9dc42d 100644 --- a/fwprovider/acme/resource_acme_account.go +++ b/fwprovider/acme/resource_acme_account.go @@ -10,6 +10,7 @@ import ( "context" "fmt" + "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" "github.com/hashicorp/terraform-plugin-framework/types" @@ -247,4 +248,5 @@ func (r *acmeAccountResource) ImportState( req resource.ImportStateRequest, resp *resource.ImportStateResponse, ) { + resource.ImportStatePassthroughID(ctx, path.Root("name"), req, resp) }