Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{projectId}/locations/{location}/deployments/{deployment}'. It takes the form projects/{project}/locations/{location}/deployments/{deployment}.
Request body
The request body contains data with the following structure:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-14 UTC."],[[["\u003cp\u003eThis webpage details the process of importing a Terraform state file into a specific deployment, which requires the deployment to be unlocked beforehand.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request for importing the state file is a \u003ccode\u003ePOST\u003c/code\u003e request to a specific URL, using gRPC Transcoding syntax, including a required \u003ccode\u003eparent\u003c/code\u003e path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include a \u003ccode\u003elockId\u003c/code\u003e, verifying the user has locked the deployment prior to importing the state file, which can be supplied via JSON.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful state file import results in a response body containing an instance of \u003ccode\u003eStatefile\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eImporting a state file requires the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e and the IAM permission \u003ccode\u003econfig.googleapis.com/config.deployments.updateState\u003c/code\u003e on the parent resource.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.deployments.importState\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n- [Try it!](#try-it)\n\nImports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.\n\n### HTTP request\n\n`POST https://config.googleapis.com/v1/{parent=projects/*/locations/*/deployments/*}:importState`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Statefile](/infrastructure-manager/docs/reference/rest/v1/Statefile).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:\n\n- `config.googleapis.com/config.deployments.updateState`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]