Method: projects.locations.deployments.importState

Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.

HTTP request

POST https://config.googleapis.com/v1/{parent=projects/*/locations/*/deployments/*}:importState

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

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:

JSON representation
{
  "lockId": string
}
Fields
lockId

string (int64 format)

Required. Lock ID of the lock file to verify that the user who is importing the state file previously locked the Deployment.

Response body

If successful, the response body contains an instance of Statefile.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • config.googleapis.com/config.deployments.updateState

For more information, see the IAM documentation.