- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Try it!
Exports Terraform state file from a given deployment.
HTTP request
POST https://config.googleapis.com/v1/{parent=projects/*/locations/*/deployments/*}:exportState
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent
|
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 |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "draft" : boolean } |
Fields | |
---|---|
draft
|
Optional. If this flag is set to true, the exported deployment state file will be the draft state. This will enable the draft file to be validated before copying it over to the working state on unlock. |
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.getState
For more information, see the IAM documentation .