1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.config.v1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/field_info.proto"; 23import "google/api/resource.proto"; 24import "google/longrunning/operations.proto"; 25import "google/protobuf/empty.proto"; 26import "google/protobuf/field_mask.proto"; 27import "google/protobuf/struct.proto"; 28import "google/protobuf/timestamp.proto"; 29import "google/rpc/status.proto"; 30 31option csharp_namespace = "Google.Cloud.Config.V1"; 32option go_package = "cloud.google.com/go/config/apiv1/configpb;configpb"; 33option java_multiple_files = true; 34option java_outer_classname = "ConfigProto"; 35option java_package = "com.google.cloud.config.v1"; 36option php_namespace = "Google\\Cloud\\Config\\V1"; 37option ruby_package = "Google::Cloud::ConfigService::V1"; 38option (google.api.resource_definition) = { 39 type: "iam.googleapis.com/ServiceAccount" 40 pattern: "projects/{project}/serviceAccounts/{service_account}" 41}; 42option (google.api.resource_definition) = { 43 type: "cloudbuild.googleapis.com/WorkerPool" 44 pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}" 45}; 46 47// Infrastructure Manager is a managed service that automates the deployment and 48// management of Google Cloud infrastructure resources. 49service Config { 50 option (google.api.default_host) = "config.googleapis.com"; 51 option (google.api.oauth_scopes) = 52 "https://www.googleapis.com/auth/cloud-platform"; 53 54 // Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project 55 // and location. 56 rpc ListDeployments(ListDeploymentsRequest) 57 returns (ListDeploymentsResponse) { 58 option (google.api.http) = { 59 get: "/v1/{parent=projects/*/locations/*}/deployments" 60 }; 61 option (google.api.method_signature) = "parent"; 62 } 63 64 // Gets details about a [Deployment][google.cloud.config.v1.Deployment]. 65 rpc GetDeployment(GetDeploymentRequest) returns (Deployment) { 66 option (google.api.http) = { 67 get: "/v1/{name=projects/*/locations/*/deployments/*}" 68 }; 69 option (google.api.method_signature) = "name"; 70 } 71 72 // Creates a [Deployment][google.cloud.config.v1.Deployment]. 73 rpc CreateDeployment(CreateDeploymentRequest) 74 returns (google.longrunning.Operation) { 75 option (google.api.http) = { 76 post: "/v1/{parent=projects/*/locations/*}/deployments" 77 body: "deployment" 78 }; 79 option (google.api.method_signature) = "parent,deployment,deployment_id"; 80 option (google.longrunning.operation_info) = { 81 response_type: "Deployment" 82 metadata_type: "OperationMetadata" 83 }; 84 } 85 86 // Updates a [Deployment][google.cloud.config.v1.Deployment]. 87 rpc UpdateDeployment(UpdateDeploymentRequest) 88 returns (google.longrunning.Operation) { 89 option (google.api.http) = { 90 patch: "/v1/{deployment.name=projects/*/locations/*/deployments/*}" 91 body: "deployment" 92 }; 93 option (google.api.method_signature) = "deployment,update_mask"; 94 option (google.longrunning.operation_info) = { 95 response_type: "Deployment" 96 metadata_type: "OperationMetadata" 97 }; 98 } 99 100 // Deletes a [Deployment][google.cloud.config.v1.Deployment]. 101 rpc DeleteDeployment(DeleteDeploymentRequest) 102 returns (google.longrunning.Operation) { 103 option (google.api.http) = { 104 delete: "/v1/{name=projects/*/locations/*/deployments/*}" 105 }; 106 option (google.api.method_signature) = "name"; 107 option (google.longrunning.operation_info) = { 108 response_type: "Deployment" 109 metadata_type: "OperationMetadata" 110 }; 111 } 112 113 // Lists [Revision][google.cloud.config.v1.Revision]s of a deployment. 114 rpc ListRevisions(ListRevisionsRequest) returns (ListRevisionsResponse) { 115 option (google.api.http) = { 116 get: "/v1/{parent=projects/*/locations/*/deployments/*}/revisions" 117 }; 118 option (google.api.method_signature) = "parent"; 119 } 120 121 // Gets details about a [Revision][google.cloud.config.v1.Revision]. 122 rpc GetRevision(GetRevisionRequest) returns (Revision) { 123 option (google.api.http) = { 124 get: "/v1/{name=projects/*/locations/*/deployments/*/revisions/*}" 125 }; 126 option (google.api.method_signature) = "name"; 127 } 128 129 // Gets details about a [Resource][google.cloud.config.v1.Resource] deployed 130 // by Infra Manager. 131 rpc GetResource(GetResourceRequest) returns (Resource) { 132 option (google.api.http) = { 133 get: "/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}" 134 }; 135 option (google.api.method_signature) = "name"; 136 } 137 138 // Lists [Resource][google.cloud.config.v1.Resource]s in a given revision. 139 rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) { 140 option (google.api.http) = { 141 get: "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources" 142 }; 143 option (google.api.method_signature) = "parent"; 144 } 145 146 // Exports Terraform state file from a given deployment. 147 rpc ExportDeploymentStatefile(ExportDeploymentStatefileRequest) 148 returns (Statefile) { 149 option (google.api.http) = { 150 post: "/v1/{parent=projects/*/locations/*/deployments/*}:exportState" 151 body: "*" 152 }; 153 } 154 155 // Exports Terraform state file from a given revision. 156 rpc ExportRevisionStatefile(ExportRevisionStatefileRequest) 157 returns (Statefile) { 158 option (google.api.http) = { 159 post: "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState" 160 body: "*" 161 }; 162 } 163 164 // Imports Terraform state file in a given deployment. The state file does not 165 // take effect until the Deployment has been unlocked. 166 rpc ImportStatefile(ImportStatefileRequest) returns (Statefile) { 167 option (google.api.http) = { 168 post: "/v1/{parent=projects/*/locations/*/deployments/*}:importState" 169 body: "*" 170 }; 171 option (google.api.method_signature) = "parent,lock_id"; 172 } 173 174 // Deletes Terraform state file in a given deployment. 175 rpc DeleteStatefile(DeleteStatefileRequest) returns (google.protobuf.Empty) { 176 option (google.api.http) = { 177 post: "/v1/{name=projects/*/locations/*/deployments/*}:deleteState" 178 body: "*" 179 }; 180 option (google.api.method_signature) = "name"; 181 } 182 183 // Locks a deployment. 184 rpc LockDeployment(LockDeploymentRequest) 185 returns (google.longrunning.Operation) { 186 option (google.api.http) = { 187 post: "/v1/{name=projects/*/locations/*/deployments/*}:lock" 188 body: "*" 189 }; 190 option (google.api.method_signature) = "name"; 191 option (google.longrunning.operation_info) = { 192 response_type: "Deployment" 193 metadata_type: "OperationMetadata" 194 }; 195 } 196 197 // Unlocks a locked deployment. 198 rpc UnlockDeployment(UnlockDeploymentRequest) 199 returns (google.longrunning.Operation) { 200 option (google.api.http) = { 201 post: "/v1/{name=projects/*/locations/*/deployments/*}:unlock" 202 body: "*" 203 }; 204 option (google.api.method_signature) = "name,lock_id"; 205 option (google.longrunning.operation_info) = { 206 response_type: "Deployment" 207 metadata_type: "OperationMetadata" 208 }; 209 } 210 211 // Exports the lock info on a locked deployment. 212 rpc ExportLockInfo(ExportLockInfoRequest) returns (LockInfo) { 213 option (google.api.http) = { 214 get: "/v1/{name=projects/*/locations/*/deployments/*}:exportLock" 215 }; 216 option (google.api.method_signature) = "name"; 217 } 218 219 // Creates a [Preview][google.cloud.config.v1.Preview]. 220 rpc CreatePreview(CreatePreviewRequest) 221 returns (google.longrunning.Operation) { 222 option (google.api.http) = { 223 post: "/v1/{parent=projects/*/locations/*}/previews" 224 body: "preview" 225 }; 226 option (google.api.method_signature) = "parent,preview"; 227 option (google.longrunning.operation_info) = { 228 response_type: "Preview" 229 metadata_type: "OperationMetadata" 230 }; 231 } 232 233 // Gets details about a [Preview][google.cloud.config.v1.Preview]. 234 rpc GetPreview(GetPreviewRequest) returns (Preview) { 235 option (google.api.http) = { 236 get: "/v1/{name=projects/*/locations/*/previews/*}" 237 }; 238 option (google.api.method_signature) = "name"; 239 } 240 241 // Lists [Preview][google.cloud.config.v1.Preview]s in a given project and 242 // location. 243 rpc ListPreviews(ListPreviewsRequest) returns (ListPreviewsResponse) { 244 option (google.api.http) = { 245 get: "/v1/{parent=projects/*/locations/*}/previews" 246 }; 247 option (google.api.method_signature) = "parent"; 248 } 249 250 // Deletes a [Preview][google.cloud.config.v1.Preview]. 251 rpc DeletePreview(DeletePreviewRequest) 252 returns (google.longrunning.Operation) { 253 option (google.api.http) = { 254 delete: "/v1/{name=projects/*/locations/*/previews/*}" 255 }; 256 option (google.api.method_signature) = "name"; 257 option (google.longrunning.operation_info) = { 258 response_type: "Preview" 259 metadata_type: "OperationMetadata" 260 }; 261 } 262 263 // Export [Preview][google.cloud.config.v1.Preview] results. 264 rpc ExportPreviewResult(ExportPreviewResultRequest) 265 returns (ExportPreviewResultResponse) { 266 option (google.api.http) = { 267 post: "/v1/{parent=projects/*/locations/*/previews/*}:export" 268 body: "*" 269 }; 270 } 271 272 // Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a 273 // given project and location. 274 rpc ListTerraformVersions(ListTerraformVersionsRequest) 275 returns (ListTerraformVersionsResponse) { 276 option (google.api.http) = { 277 get: "/v1/{parent=projects/*/locations/*}/terraformVersions" 278 }; 279 option (google.api.method_signature) = "parent"; 280 } 281 282 // Gets details about a 283 // [TerraformVersion][google.cloud.config.v1.TerraformVersion]. 284 rpc GetTerraformVersion(GetTerraformVersionRequest) 285 returns (TerraformVersion) { 286 option (google.api.http) = { 287 get: "/v1/{name=projects/*/locations/*/terraformVersions/*}" 288 }; 289 option (google.api.method_signature) = "name"; 290 } 291} 292 293// Enum values to control quota checks for resources in terraform 294// configuration files. 295enum QuotaValidation { 296 // The default value. 297 // QuotaValidation on terraform configuration files will be disabled in 298 // this case. 299 QUOTA_VALIDATION_UNSPECIFIED = 0; 300 301 // Enable computing quotas for resources in terraform configuration files to 302 // get visibility on resources with insufficient quotas. 303 ENABLED = 1; 304 305 // Enforce quota checks so deployment fails if there isn't sufficient quotas 306 // available to deploy resources in terraform configuration files. 307 ENFORCED = 2; 308} 309 310// A Deployment is a group of resources and configs managed and provisioned by 311// Infra Manager. 312message Deployment { 313 option (google.api.resource) = { 314 type: "config.googleapis.com/Deployment" 315 pattern: "projects/{project}/locations/{location}/deployments/{deployment}" 316 }; 317 318 // Possible states of a deployment. 319 enum State { 320 // The default value. This value is used if the state is omitted. 321 STATE_UNSPECIFIED = 0; 322 323 // The deployment is being created. 324 CREATING = 1; 325 326 // The deployment is healthy. 327 ACTIVE = 2; 328 329 // The deployment is being updated. 330 UPDATING = 3; 331 332 // The deployment is being deleted. 333 DELETING = 4; 334 335 // The deployment has encountered an unexpected error. 336 FAILED = 5; 337 338 // The deployment is no longer being actively reconciled. 339 // This may be the result of recovering the project after deletion. 340 SUSPENDED = 6; 341 342 // The deployment has been deleted. 343 DELETED = 7; 344 } 345 346 // Possible errors that can occur with deployments. 347 enum ErrorCode { 348 // No error code was specified. 349 ERROR_CODE_UNSPECIFIED = 0; 350 351 // The revision failed. See Revision for more details. 352 REVISION_FAILED = 1; 353 354 // Cloud Build failed due to a permission issue. 355 CLOUD_BUILD_PERMISSION_DENIED = 3; 356 357 // Cloud Build job associated with a deployment deletion could not be 358 // started. 359 DELETE_BUILD_API_FAILED = 5; 360 361 // Cloud Build job associated with a deployment deletion was started but 362 // failed. 363 DELETE_BUILD_RUN_FAILED = 6; 364 365 // Cloud Storage bucket creation failed due to a permission issue. 366 BUCKET_CREATION_PERMISSION_DENIED = 7; 367 368 // Cloud Storage bucket creation failed due to an issue unrelated to 369 // permissions. 370 BUCKET_CREATION_FAILED = 8; 371 } 372 373 // Possible lock states of a deployment. 374 enum LockState { 375 // The default value. This value is used if the lock state is omitted. 376 LOCK_STATE_UNSPECIFIED = 0; 377 378 // The deployment is locked. 379 LOCKED = 1; 380 381 // The deployment is unlocked. 382 UNLOCKED = 2; 383 384 // The deployment is being locked. 385 LOCKING = 3; 386 387 // The deployment is being unlocked. 388 UNLOCKING = 4; 389 390 // The deployment has failed to lock. 391 LOCK_FAILED = 5; 392 393 // The deployment has failed to unlock. 394 UNLOCK_FAILED = 6; 395 } 396 397 // Blueprint to deploy. 398 oneof blueprint { 399 // A blueprint described using Terraform's HashiCorp Configuration Language 400 // as a root module. 401 TerraformBlueprint terraform_blueprint = 6; 402 } 403 404 // Resource name of the deployment. 405 // Format: `projects/{project}/locations/{location}/deployments/{deployment}` 406 string name = 1; 407 408 // Output only. Time when the deployment was created. 409 google.protobuf.Timestamp create_time = 2 410 [(google.api.field_behavior) = OUTPUT_ONLY]; 411 412 // Output only. Time when the deployment was last modified. 413 google.protobuf.Timestamp update_time = 3 414 [(google.api.field_behavior) = OUTPUT_ONLY]; 415 416 // User-defined metadata for the deployment. 417 map<string, string> labels = 4; 418 419 // Output only. Current state of the deployment. 420 State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 421 422 // Output only. Revision name that was most recently applied. 423 // Format: `projects/{project}/locations/{location}/deployments/{deployment}/ 424 // revisions/{revision}` 425 string latest_revision = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 426 427 // Output only. Additional information regarding the current state. 428 string state_detail = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 429 430 // Output only. Error code describing errors that may have occurred. 431 ErrorCode error_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 432 433 // Output only. Location of artifacts from a DeleteDeployment operation. 434 ApplyResults delete_results = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 435 436 // Output only. Cloud Build instance UUID associated with deleting this 437 // deployment. 438 string delete_build = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; 439 440 // Output only. Location of Cloud Build logs in Google Cloud Storage, 441 // populated when deleting this deployment. Format: `gs://{bucket}/{object}`. 442 string delete_logs = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; 443 444 // Output only. Errors encountered when deleting this deployment. 445 // Errors are truncated to 10 entries, see `delete_results` and `error_logs` 446 // for full details. 447 repeated TerraformError tf_errors = 13 448 [(google.api.field_behavior) = OUTPUT_ONLY]; 449 450 // Output only. Location of Terraform error logs in Google Cloud Storage. 451 // Format: `gs://{bucket}/{object}`. 452 string error_logs = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; 453 454 // Optional. User-defined location of Cloud Build logs and artifacts in Google 455 // Cloud Storage. Format: `gs://{bucket}/{folder}` 456 // 457 // A default bucket will be bootstrapped if the field is not set or empty. 458 // Default bucket format: `gs://<project number>-<region>-blueprint-config` 459 // Constraints: 460 // - The bucket needs to be in the same project as the deployment 461 // - The path cannot be within the path of `gcs_source` 462 // - The field cannot be updated, including changing its presence 463 optional string artifacts_gcs_bucket = 15 464 [(google.api.field_behavior) = OPTIONAL]; 465 466 // Optional. User-specified Service Account (SA) credentials to be used when 467 // actuating resources. 468 // Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` 469 optional string service_account = 16 [ 470 (google.api.field_behavior) = OPTIONAL, 471 (google.api.resource_reference) = { 472 type: "iam.googleapis.com/ServiceAccount" 473 } 474 ]; 475 476 // By default, Infra Manager will return a failure when 477 // Terraform encounters a 409 code (resource conflict error) during actuation. 478 // If this flag is set to true, Infra Manager will instead 479 // attempt to automatically import the resource into the Terraform state (for 480 // supported resource types) and continue actuation. 481 // 482 // Not all resource types are supported, refer to documentation. 483 optional bool import_existing_resources = 17; 484 485 // Optional. The user-specified Cloud Build worker pool resource in which the 486 // Cloud Build job will execute. Format: 487 // `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. 488 // If this field is unspecified, the default Cloud Build worker pool will be 489 // used. 490 optional string worker_pool = 19 [ 491 (google.api.field_behavior) = OPTIONAL, 492 (google.api.resource_reference) = { 493 type: "cloudbuild.googleapis.com/WorkerPool" 494 } 495 ]; 496 497 // Output only. Current lock state of the deployment. 498 LockState lock_state = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; 499 500 // Optional. The user-specified Terraform version constraint. 501 // Example: "=1.3.10". 502 optional string tf_version_constraint = 21 503 [(google.api.field_behavior) = OPTIONAL]; 504 505 // Output only. The current Terraform version set on the deployment. 506 // It is in the format of "Major.Minor.Patch", for example, "1.3.10". 507 string tf_version = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; 508 509 // Optional. Input to control quota checks for resources in terraform 510 // configuration files. There are limited resources on which quota validation 511 // applies. 512 QuotaValidation quota_validation = 23 513 [(google.api.field_behavior) = OPTIONAL]; 514 515 // Optional. Arbitrary key-value metadata storage e.g. to help client tools 516 // identify deployments during automation. See 517 // https://google.aip.dev/148#annotations for details on format and size 518 // limitations. 519 map<string, string> annotations = 24 [(google.api.field_behavior) = OPTIONAL]; 520} 521 522// TerraformBlueprint describes the source of a Terraform root module which 523// describes the resources and configs to be deployed. 524message TerraformBlueprint { 525 // Location of the source configs. 526 oneof source { 527 // Required. URI of an object in Google Cloud Storage. 528 // Format: `gs://{bucket}/{object}` 529 // 530 // URI may also specify an object version for zipped objects. 531 // Format: `gs://{bucket}/{object}#{version}` 532 string gcs_source = 1 [(google.api.field_behavior) = REQUIRED]; 533 534 // Required. URI of a public Git repo. 535 GitSource git_source = 2 [(google.api.field_behavior) = REQUIRED]; 536 } 537 538 // Input variable values for the Terraform blueprint. 539 map<string, TerraformVariable> input_values = 4; 540} 541 542// A Terraform input variable. 543message TerraformVariable { 544 // Input variable value. 545 google.protobuf.Value input_value = 5; 546} 547 548// Outputs and artifacts from applying a deployment. 549message ApplyResults { 550 // Location of a blueprint copy and other manifests in Google Cloud Storage. 551 // Format: `gs://{bucket}/{object}` 552 string content = 1; 553 554 // Location of artifacts (e.g. logs) in Google Cloud Storage. 555 // Format: `gs://{bucket}/{object}` 556 string artifacts = 2; 557 558 // Map of output name to output info. 559 map<string, TerraformOutput> outputs = 3; 560} 561 562// Describes a Terraform output. 563message TerraformOutput { 564 // Identifies whether Terraform has set this output as a potential 565 // sensitive value. 566 bool sensitive = 1; 567 568 // Value of output. 569 google.protobuf.Value value = 2; 570} 571 572message ListDeploymentsRequest { 573 // Required. The parent in whose context the Deployments are listed. The 574 // parent value is in the format: 575 // 'projects/{project_id}/locations/{location}'. 576 string parent = 1 [ 577 (google.api.field_behavior) = REQUIRED, 578 (google.api.resource_reference) = { 579 type: "locations.googleapis.com/Location" 580 } 581 ]; 582 583 // When requesting a page of resources, 'page_size' specifies number of 584 // resources to return. If unspecified, at most 500 will be returned. The 585 // maximum value is 1000. 586 int32 page_size = 2; 587 588 // Token returned by previous call to 'ListDeployments' which specifies the 589 // position in the list from where to continue listing the resources. 590 string page_token = 3; 591 592 // Lists the Deployments that match the filter expression. A filter 593 // expression filters the resources listed in the response. The expression 594 // must be of the form '{field} {operator} {value}' where operators: '<', '>', 595 // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS 596 // operator which is roughly synonymous with equality). {field} can refer to a 597 // proto or JSON field, or a synthetic field. Field names can be camelCase or 598 // snake_case. 599 // 600 // Examples: 601 // - Filter by name: 602 // name = "projects/foo/locations/us-central1/deployments/bar 603 // 604 // - Filter by labels: 605 // - Resources that have a key called 'foo' 606 // labels.foo:* 607 // - Resources that have a key called 'foo' whose value is 'bar' 608 // labels.foo = bar 609 // 610 // - Filter by state: 611 // - Deployments in CREATING state. 612 // state=CREATING 613 string filter = 4; 614 615 // Field to use to sort the list. 616 string order_by = 5; 617} 618 619message ListDeploymentsResponse { 620 // List of [Deployment][google.cloud.config.v1.Deployment]s. 621 repeated Deployment deployments = 1; 622 623 // Token to be supplied to the next ListDeployments request via `page_token` 624 // to obtain the next set of results. 625 string next_page_token = 2; 626 627 // Locations that could not be reached. 628 repeated string unreachable = 3; 629} 630 631message GetDeploymentRequest { 632 // Required. The name of the deployment. Format: 633 // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. 634 string name = 1 [ 635 (google.api.field_behavior) = REQUIRED, 636 (google.api.resource_reference) = { 637 type: "config.googleapis.com/Deployment" 638 } 639 ]; 640} 641 642// A request to list Revisions passed to a 'ListRevisions' call. 643message ListRevisionsRequest { 644 // Required. The parent in whose context the Revisions are listed. The parent 645 // value is in the format: 646 // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. 647 string parent = 1 [ 648 (google.api.field_behavior) = REQUIRED, 649 (google.api.resource_reference) = { 650 type: "config.googleapis.com/Deployment" 651 } 652 ]; 653 654 // When requesting a page of resources, `page_size` specifies number of 655 // resources to return. If unspecified, at most 500 will be returned. The 656 // maximum value is 1000. 657 int32 page_size = 2; 658 659 // Token returned by previous call to 'ListRevisions' which specifies the 660 // position in the list from where to continue listing the resources. 661 string page_token = 3; 662 663 // Lists the Revisions that match the filter expression. A filter 664 // expression filters the resources listed in the response. The expression 665 // must be of the form '{field} {operator} {value}' where operators: '<', '>', 666 // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS 667 // operator which is roughly synonymous with equality). {field} can refer to a 668 // proto or JSON field, or a synthetic field. Field names can be camelCase or 669 // snake_case. 670 // 671 // Examples: 672 // - Filter by name: 673 // name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar 674 // 675 // - Filter by labels: 676 // - Resources that have a key called 'foo' 677 // labels.foo:* 678 // - Resources that have a key called 'foo' whose value is 'bar' 679 // labels.foo = bar 680 // 681 // - Filter by state: 682 // - Revisions in CREATING state. 683 // state=CREATING 684 string filter = 4; 685 686 // Field to use to sort the list. 687 string order_by = 5; 688} 689 690// A response to a 'ListRevisions' call. Contains a list of Revisions. 691message ListRevisionsResponse { 692 // List of [Revision][google.cloud.config.v1.Revision]s. 693 repeated Revision revisions = 1; 694 695 // A token to request the next page of resources from the 'ListRevisions' 696 // method. The value of an empty string means that there are no more resources 697 // to return. 698 string next_page_token = 2; 699 700 // Locations that could not be reached. 701 repeated string unreachable = 3; 702} 703 704// A request to get a Revision from a 'GetRevision' call. 705message GetRevisionRequest { 706 // Required. The name of the Revision in the format: 707 // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. 708 string name = 1 [ 709 (google.api.field_behavior) = REQUIRED, 710 (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } 711 ]; 712} 713 714message CreateDeploymentRequest { 715 // Required. The parent in whose context the Deployment is created. The parent 716 // value is in the format: 'projects/{project_id}/locations/{location}'. 717 string parent = 1 [ 718 (google.api.field_behavior) = REQUIRED, 719 (google.api.resource_reference) = { 720 type: "locations.googleapis.com/Location" 721 } 722 ]; 723 724 // Required. The Deployment ID. 725 string deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; 726 727 // Required. [Deployment][google.cloud.config.v1.Deployment] resource to be 728 // created. 729 Deployment deployment = 3 [(google.api.field_behavior) = REQUIRED]; 730 731 // Optional. An optional request ID to identify requests. Specify a unique 732 // request ID so that if you must retry your request, the server will know to 733 // ignore the request if it has already been completed. The server will 734 // guarantee that for at least 60 minutes since the first request. 735 // 736 // For example, consider a situation where you make an initial request and the 737 // request times out. If you make the request again with the same request ID, 738 // the server can check if original operation with the same request ID was 739 // received, and if so, will ignore the second request. This prevents clients 740 // from accidentally creating duplicate commitments. 741 // 742 // The request ID must be a valid UUID with the exception that zero UUID is 743 // not supported (00000000-0000-0000-0000-000000000000). 744 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 745} 746 747message UpdateDeploymentRequest { 748 // Optional. Field mask used to specify the fields to be overwritten in the 749 // Deployment resource by the update. 750 // 751 // The fields specified in the update_mask are relative to the resource, not 752 // the full request. A field will be overwritten if it is in the mask. If the 753 // user does not provide a mask then all fields will be overwritten. 754 google.protobuf.FieldMask update_mask = 1 755 [(google.api.field_behavior) = OPTIONAL]; 756 757 // Required. [Deployment][google.cloud.config.v1.Deployment] to update. 758 // 759 // The deployment's `name` field is used to identify the resource to be 760 // updated. Format: 761 // `projects/{project}/locations/{location}/deployments/{deployment}` 762 Deployment deployment = 2 [(google.api.field_behavior) = REQUIRED]; 763 764 // Optional. An optional request ID to identify requests. Specify a unique 765 // request ID so that if you must retry your request, the server will know to 766 // ignore the request if it has already been completed. The server will 767 // guarantee that for at least 60 minutes since the first request. 768 // 769 // For example, consider a situation where you make an initial request and the 770 // request times out. If you make the request again with the same request ID, 771 // the server can check if original operation with the same request ID was 772 // received, and if so, will ignore the second request. This prevents clients 773 // from accidentally creating duplicate commitments. 774 // 775 // The request ID must be a valid UUID with the exception that zero UUID is 776 // not supported (00000000-0000-0000-0000-000000000000). 777 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 778} 779 780message DeleteDeploymentRequest { 781 // Policy on how resources actuated by the deployment should be deleted. 782 enum DeletePolicy { 783 // Unspecified policy, resources will be deleted. 784 DELETE_POLICY_UNSPECIFIED = 0; 785 786 // Deletes resources actuated by the deployment. 787 DELETE = 1; 788 789 // Abandons resources and only deletes the deployment and its metadata. 790 ABANDON = 2; 791 } 792 793 // Required. The name of the Deployment in the format: 794 // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. 795 string name = 1 [ 796 (google.api.field_behavior) = REQUIRED, 797 (google.api.resource_reference) = { 798 type: "config.googleapis.com/Deployment" 799 } 800 ]; 801 802 // Optional. An optional request ID to identify requests. Specify a unique 803 // request ID so that if you must retry your request, the server will know to 804 // ignore the request if it has already been completed. The server will 805 // guarantee that for at least 60 minutes after the first request. 806 // 807 // For example, consider a situation where you make an initial request and the 808 // request times out. If you make the request again with the same request ID, 809 // the server can check if original operation with the same request ID was 810 // received, and if so, will ignore the second request. This prevents clients 811 // from accidentally creating duplicate commitments. 812 // 813 // The request ID must be a valid UUID with the exception that zero UUID is 814 // not supported (00000000-0000-0000-0000-000000000000). 815 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 816 817 // Optional. If set to true, any revisions for this deployment will also be 818 // deleted. (Otherwise, the request will only work if the deployment has no 819 // revisions.) 820 bool force = 3 [(google.api.field_behavior) = OPTIONAL]; 821 822 // Optional. Policy on how resources actuated by the deployment should be 823 // deleted. If unspecified, the default behavior is to delete the underlying 824 // resources. 825 DeletePolicy delete_policy = 4 [(google.api.field_behavior) = OPTIONAL]; 826} 827 828// Represents the metadata of the long-running operation. 829message OperationMetadata { 830 // Ephemeral metadata about the state of an operation for a particular 831 // resource. 832 oneof resource_metadata { 833 // Output only. Metadata about the deployment operation state. 834 DeploymentOperationMetadata deployment_metadata = 8 835 [(google.api.field_behavior) = OUTPUT_ONLY]; 836 837 // Output only. Metadata about the preview operation state. 838 PreviewOperationMetadata preview_metadata = 9 839 [(google.api.field_behavior) = OUTPUT_ONLY]; 840 } 841 842 // Output only. Time when the operation was created. 843 google.protobuf.Timestamp create_time = 1 844 [(google.api.field_behavior) = OUTPUT_ONLY]; 845 846 // Output only. Time when the operation finished running. 847 google.protobuf.Timestamp end_time = 2 848 [(google.api.field_behavior) = OUTPUT_ONLY]; 849 850 // Output only. Server-defined resource path for the target of the operation. 851 string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 852 853 // Output only. Name of the verb executed by the operation. 854 string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 855 856 // Output only. Human-readable status of the operation, if any. 857 string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 858 859 // Output only. Identifies whether the user has requested cancellation of the 860 // operation. Operations that have successfully been cancelled have 861 // [Operation.error][] value with a 862 // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to 863 // `Code.CANCELLED`. 864 bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 865 866 // Output only. API version used to start the operation. 867 string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 868} 869 870// A child resource of a Deployment generated by a 'CreateDeployment' or 871// 'UpdateDeployment' call. Each Revision contains metadata pertaining to a 872// snapshot of a particular Deployment. 873message Revision { 874 option (google.api.resource) = { 875 type: "config.googleapis.com/Revision" 876 pattern: "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}" 877 }; 878 879 // Actions that generate a revision. 880 enum Action { 881 // The default value. This value is used if the action is omitted. 882 ACTION_UNSPECIFIED = 0; 883 884 // The revision was generated by creating a deployment. 885 CREATE = 1; 886 887 // The revision was generated by updating a deployment. 888 UPDATE = 2; 889 890 // The revision was deleted. 891 DELETE = 3; 892 } 893 894 // Possible states of a revision. 895 enum State { 896 // The default value. This value is used if the state is omitted. 897 STATE_UNSPECIFIED = 0; 898 899 // The revision is being applied. 900 APPLYING = 1; 901 902 // The revision was applied successfully. 903 APPLIED = 2; 904 905 // The revision could not be applied successfully. 906 FAILED = 3; 907 } 908 909 // Possible errors if Revision could not be created or updated successfully. 910 enum ErrorCode { 911 // No error code was specified. 912 ERROR_CODE_UNSPECIFIED = 0; 913 914 // Cloud Build failed due to a permission issue. 915 CLOUD_BUILD_PERMISSION_DENIED = 1; 916 917 // Cloud Build job associated with creating or updating a deployment could 918 // not be started. 919 APPLY_BUILD_API_FAILED = 4; 920 921 // Cloud Build job associated with creating or updating a deployment was 922 // started but failed. 923 APPLY_BUILD_RUN_FAILED = 5; 924 925 // quota validation failed for one or more resources in terraform 926 // configuration files. 927 QUOTA_VALIDATION_FAILED = 7; 928 } 929 930 // Blueprint that was deployed. 931 oneof blueprint { 932 // Output only. A blueprint described using Terraform's HashiCorp 933 // Configuration Language as a root module. 934 TerraformBlueprint terraform_blueprint = 6 935 [(google.api.field_behavior) = OUTPUT_ONLY]; 936 } 937 938 // Revision name. Format: 939 // `projects/{project}/locations/{location}/deployments/{deployment}/ 940 // revisions/{revision}` 941 string name = 1; 942 943 // Output only. Time when the revision was created. 944 google.protobuf.Timestamp create_time = 2 945 [(google.api.field_behavior) = OUTPUT_ONLY]; 946 947 // Output only. Time when the revision was last modified. 948 google.protobuf.Timestamp update_time = 3 949 [(google.api.field_behavior) = OUTPUT_ONLY]; 950 951 // Output only. The action which created this revision 952 Action action = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 953 954 // Output only. Current state of the revision. 955 State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 956 957 // Output only. Outputs and artifacts from applying a deployment. 958 ApplyResults apply_results = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 959 960 // Output only. Additional info regarding the current state. 961 string state_detail = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 962 963 // Output only. Code describing any errors that may have occurred. 964 ErrorCode error_code = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 965 966 // Output only. Cloud Build instance UUID associated with this revision. 967 string build = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 968 969 // Output only. Location of Revision operation logs in 970 // `gs://{bucket}/{object}` format. 971 string logs = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; 972 973 // Output only. Errors encountered when creating or updating this deployment. 974 // Errors are truncated to 10 entries, see `delete_results` and `error_logs` 975 // for full details. 976 repeated TerraformError tf_errors = 12 977 [(google.api.field_behavior) = OUTPUT_ONLY]; 978 979 // Output only. Location of Terraform error logs in Google Cloud Storage. 980 // Format: `gs://{bucket}/{object}`. 981 string error_logs = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; 982 983 // Output only. User-specified Service Account (SA) to be used as credential 984 // to manage resources. Format: 985 // `projects/{projectID}/serviceAccounts/{serviceAccount}` 986 string service_account = 14 [ 987 (google.api.field_behavior) = OUTPUT_ONLY, 988 (google.api.resource_reference) = { 989 type: "iam.googleapis.com/ServiceAccount" 990 } 991 ]; 992 993 // Output only. By default, Infra Manager will return a failure when 994 // Terraform encounters a 409 code (resource conflict error) during actuation. 995 // If this flag is set to true, Infra Manager will instead 996 // attempt to automatically import the resource into the Terraform state (for 997 // supported resource types) and continue actuation. 998 // 999 // Not all resource types are supported, refer to documentation. 1000 bool import_existing_resources = 15 1001 [(google.api.field_behavior) = OUTPUT_ONLY]; 1002 1003 // Output only. The user-specified Cloud Build worker pool resource in which 1004 // the Cloud Build job will execute. Format: 1005 // `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. 1006 // If this field is unspecified, the default Cloud Build worker pool will be 1007 // used. 1008 string worker_pool = 17 [ 1009 (google.api.field_behavior) = OUTPUT_ONLY, 1010 (google.api.resource_reference) = { 1011 type: "cloudbuild.googleapis.com/WorkerPool" 1012 } 1013 ]; 1014 1015 // Output only. The user-specified Terraform version constraint. 1016 // Example: "=1.3.10". 1017 string tf_version_constraint = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; 1018 1019 // Output only. The version of Terraform used to create the Revision. 1020 // It is in the format of "Major.Minor.Patch", for example, "1.3.10". 1021 string tf_version = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; 1022 1023 // Output only. Cloud Storage path containing quota validation results. This 1024 // field is set when a user sets Deployment.quota_validation field to ENABLED 1025 // or ENFORCED. Format: `gs://{bucket}/{object}`. 1026 string quota_validation_results = 29 1027 [(google.api.field_behavior) = OUTPUT_ONLY]; 1028 1029 // Optional. Input to control quota checks for resources in terraform 1030 // configuration files. There are limited resources on which quota validation 1031 // applies. 1032 QuotaValidation quota_validation = 20 1033 [(google.api.field_behavior) = OPTIONAL]; 1034} 1035 1036// Errors encountered during actuation using Terraform 1037message TerraformError { 1038 // Address of the resource associated with the error, 1039 // e.g. `google_compute_network.vpc_network`. 1040 string resource_address = 1; 1041 1042 // HTTP response code returned from Google Cloud Platform APIs when Terraform 1043 // fails to provision the resource. If unset or 0, no HTTP response code was 1044 // returned by Terraform. 1045 int32 http_response_code = 2; 1046 1047 // A human-readable error description. 1048 string error_description = 3; 1049 1050 // Original error response from underlying Google API, if available. 1051 google.rpc.Status error = 4; 1052} 1053 1054// A set of files in a Git repository. 1055message GitSource { 1056 // Optional. Repository URL. 1057 // Example: 'https://github.com/kubernetes/examples.git' 1058 optional string repo = 1 [(google.api.field_behavior) = OPTIONAL]; 1059 1060 // Optional. Subdirectory inside the repository. 1061 // Example: 'staging/my-package' 1062 optional string directory = 2 [(google.api.field_behavior) = OPTIONAL]; 1063 1064 // Optional. Git reference (e.g. branch or tag). 1065 optional string ref = 3 [(google.api.field_behavior) = OPTIONAL]; 1066} 1067 1068// Ephemeral metadata content describing the state of a deployment operation. 1069message DeploymentOperationMetadata { 1070 // The possible steps a deployment may be running. 1071 enum DeploymentStep { 1072 // Unspecified deployment step 1073 DEPLOYMENT_STEP_UNSPECIFIED = 0; 1074 1075 // Infra Manager is creating a Google Cloud Storage bucket to store 1076 // artifacts and metadata about the deployment and revision 1077 PREPARING_STORAGE_BUCKET = 1; 1078 1079 // Downloading the blueprint onto the Google Cloud Storage bucket 1080 DOWNLOADING_BLUEPRINT = 2; 1081 1082 // Initializing Terraform using `terraform init` 1083 RUNNING_TF_INIT = 3; 1084 1085 // Running `terraform plan` 1086 RUNNING_TF_PLAN = 4; 1087 1088 // Actuating resources using Terraform using `terraform apply` 1089 RUNNING_TF_APPLY = 5; 1090 1091 // Destroying resources using Terraform using `terraform destroy` 1092 RUNNING_TF_DESTROY = 6; 1093 1094 // Validating the uploaded TF state file when unlocking a deployment 1095 RUNNING_TF_VALIDATE = 7; 1096 1097 // Unlocking a deployment 1098 UNLOCKING_DEPLOYMENT = 8; 1099 1100 // Operation was successful 1101 SUCCEEDED = 9; 1102 1103 // Operation failed 1104 FAILED = 10; 1105 1106 // Validating the provided repository. 1107 VALIDATING_REPOSITORY = 11; 1108 1109 // Running quota validation 1110 RUNNING_QUOTA_VALIDATION = 12; 1111 } 1112 1113 // The current step the deployment operation is running. 1114 DeploymentStep step = 1; 1115 1116 // Outputs and artifacts from applying a deployment. 1117 ApplyResults apply_results = 2; 1118 1119 // Output only. Cloud Build instance UUID associated with this operation. 1120 string build = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 1121 1122 // Output only. Location of Deployment operations logs in 1123 // `gs://{bucket}/{object}` format. 1124 string logs = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 1125} 1126 1127// Resource represents a Google Cloud Platform resource actuated by IM. 1128// Resources are child resources of Revisions. 1129message Resource { 1130 option (google.api.resource) = { 1131 type: "config.googleapis.com/Resource" 1132 pattern: "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}" 1133 }; 1134 1135 // Possible intent of the resource. 1136 enum Intent { 1137 // The default value. This value is used if the intent is omitted. 1138 INTENT_UNSPECIFIED = 0; 1139 1140 // Infra Manager will create this Resource. 1141 CREATE = 1; 1142 1143 // Infra Manager will update this Resource. 1144 UPDATE = 2; 1145 1146 // Infra Manager will delete this Resource. 1147 DELETE = 3; 1148 1149 // Infra Manager will destroy and recreate this Resource. 1150 RECREATE = 4; 1151 1152 // Infra Manager will leave this Resource untouched. 1153 UNCHANGED = 5; 1154 } 1155 1156 // Possible states of a resource. 1157 enum State { 1158 // The default value. This value is used if the state is omitted. 1159 STATE_UNSPECIFIED = 0; 1160 1161 // Resource has been planned for reconcile. 1162 PLANNED = 1; 1163 1164 // Resource is actively reconciling into the intended state. 1165 IN_PROGRESS = 2; 1166 1167 // Resource has reconciled to intended state. 1168 RECONCILED = 3; 1169 1170 // Resource failed to reconcile. 1171 FAILED = 4; 1172 } 1173 1174 // Output only. Resource name. 1175 // Format: 1176 // `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}` 1177 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 1178 1179 // Output only. Terraform-specific info if this resource was created using 1180 // Terraform. 1181 ResourceTerraformInfo terraform_info = 2 1182 [(google.api.field_behavior) = OUTPUT_ONLY]; 1183 1184 // Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI 1185 // ID). CAI type format follows 1186 // https://cloud.google.com/asset-inventory/docs/supported-asset-types 1187 map<string, ResourceCAIInfo> cai_assets = 3 1188 [(google.api.field_behavior) = OUTPUT_ONLY]; 1189 1190 // Output only. Intent of the resource. 1191 Intent intent = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 1192 1193 // Output only. Current state of the resource. 1194 State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 1195} 1196 1197// Terraform info of a Resource. 1198message ResourceTerraformInfo { 1199 // TF resource address that uniquely identifies this resource within this 1200 // deployment. 1201 string address = 1; 1202 1203 // TF resource type 1204 string type = 2; 1205 1206 // ID attribute of the TF resource 1207 string id = 3; 1208} 1209 1210// CAI info of a Resource. 1211message ResourceCAIInfo { 1212 // CAI resource name in the format following 1213 // https://cloud.google.com/apis/design/resource_names#full_resource_name 1214 string full_resource_name = 1; 1215} 1216 1217// A request to get a Resource from a 'GetResource' call. 1218message GetResourceRequest { 1219 // Required. The name of the Resource in the format: 1220 // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. 1221 string name = 1 [ 1222 (google.api.field_behavior) = REQUIRED, 1223 (google.api.resource_reference) = { type: "config.googleapis.com/Resource" } 1224 ]; 1225} 1226 1227// A request to list Resources passed to a 'ListResources' call. 1228message ListResourcesRequest { 1229 // Required. The parent in whose context the Resources are listed. The parent 1230 // value is in the format: 1231 // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. 1232 string parent = 1 [ 1233 (google.api.field_behavior) = REQUIRED, 1234 (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } 1235 ]; 1236 1237 // When requesting a page of resources, 'page_size' specifies number of 1238 // resources to return. If unspecified, at most 500 will be returned. The 1239 // maximum value is 1000. 1240 int32 page_size = 2; 1241 1242 // Token returned by previous call to 'ListResources' which specifies the 1243 // position in the list from where to continue listing the resources. 1244 string page_token = 3; 1245 1246 // Lists the Resources that match the filter expression. A filter 1247 // expression filters the resources listed in the response. The expression 1248 // must be of the form '{field} {operator} {value}' where operators: '<', '>', 1249 // '<=', 1250 // '>=', 1251 // '!=', '=', ':' are supported (colon ':' represents a HAS operator which is 1252 // roughly synonymous with equality). {field} can refer to a proto or JSON 1253 // field, or a synthetic field. Field names can be camelCase or snake_case. 1254 // 1255 // Examples: 1256 // - Filter by name: 1257 // name = 1258 // "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz 1259 string filter = 4; 1260 1261 // Field to use to sort the list. 1262 string order_by = 5; 1263} 1264 1265// A response to a 'ListResources' call. Contains a list of Resources. 1266message ListResourcesResponse { 1267 // List of [Resources][]s. 1268 repeated Resource resources = 1; 1269 1270 // A token to request the next page of resources from the 'ListResources' 1271 // method. The value of an empty string means that there are no more resources 1272 // to return. 1273 string next_page_token = 2; 1274 1275 // Locations that could not be reached. 1276 repeated string unreachable = 3; 1277} 1278 1279// Contains info about a Terraform state file 1280message Statefile { 1281 // Output only. Cloud Storage signed URI used for downloading or uploading the 1282 // state file. 1283 string signed_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 1284} 1285 1286// A request to export a state file passed to a 'ExportDeploymentStatefile' 1287// call. 1288message ExportDeploymentStatefileRequest { 1289 // Required. The parent in whose context the statefile is listed. The parent 1290 // value is in the format: 1291 // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. 1292 string parent = 1 [ 1293 (google.api.field_behavior) = REQUIRED, 1294 (google.api.resource_reference) = { 1295 type: "config.googleapis.com/Deployment" 1296 } 1297 ]; 1298 1299 // Optional. If this flag is set to true, the exported deployment state file 1300 // will be the draft state. This will enable the draft file to be validated 1301 // before copying it over to the working state on unlock. 1302 bool draft = 3 [(google.api.field_behavior) = OPTIONAL]; 1303} 1304 1305// A request to export a state file passed to a 'ExportRevisionStatefile' 1306// call. 1307message ExportRevisionStatefileRequest { 1308 // Required. The parent in whose context the statefile is listed. The parent 1309 // value is in the format: 1310 // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. 1311 string parent = 1 [ 1312 (google.api.field_behavior) = REQUIRED, 1313 (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } 1314 ]; 1315} 1316 1317// A request to import a state file passed to a 'ImportStatefile' call. 1318message ImportStatefileRequest { 1319 // Required. The parent in whose context the statefile is listed. The parent 1320 // value is in the format: 1321 // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. 1322 string parent = 1 [ 1323 (google.api.field_behavior) = REQUIRED, 1324 (google.api.resource_reference) = { 1325 type: "config.googleapis.com/Deployment" 1326 } 1327 ]; 1328 1329 // Required. Lock ID of the lock file to verify that the user who is importing 1330 // the state file previously locked the Deployment. 1331 int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; 1332 1333 // Optional. 1334 bool skip_draft = 3 [(google.api.field_behavior) = OPTIONAL]; 1335} 1336 1337// A request to delete a state file passed to a 'DeleteStatefile' call. 1338message DeleteStatefileRequest { 1339 // Required. The name of the deployment in the format: 1340 // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. 1341 string name = 1 [ 1342 (google.api.field_behavior) = REQUIRED, 1343 (google.api.resource_reference) = { 1344 type: "config.googleapis.com/Deployment" 1345 } 1346 ]; 1347 1348 // Required. Lock ID of the lock file to verify that the user who is deleting 1349 // the state file previously locked the Deployment. 1350 int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; 1351} 1352 1353// A request to lock a deployment passed to a 'LockDeployment' call. 1354message LockDeploymentRequest { 1355 // Required. The name of the deployment in the format: 1356 // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. 1357 string name = 1 [ 1358 (google.api.field_behavior) = REQUIRED, 1359 (google.api.resource_reference) = { 1360 type: "config.googleapis.com/Deployment" 1361 } 1362 ]; 1363} 1364 1365// A request to unlock a state file passed to a 'UnlockDeployment' call. 1366message UnlockDeploymentRequest { 1367 // Required. The name of the deployment in the format: 1368 // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. 1369 string name = 1 [ 1370 (google.api.field_behavior) = REQUIRED, 1371 (google.api.resource_reference) = { 1372 type: "config.googleapis.com/Deployment" 1373 } 1374 ]; 1375 1376 // Required. Lock ID of the lock file to be unlocked. 1377 int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; 1378} 1379 1380// A request to get a state file lock info passed to a 'ExportLockInfo' call. 1381message ExportLockInfoRequest { 1382 // Required. The name of the deployment in the format: 1383 // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. 1384 string name = 1 [ 1385 (google.api.field_behavior) = REQUIRED, 1386 (google.api.resource_reference) = { 1387 type: "config.googleapis.com/Deployment" 1388 } 1389 ]; 1390} 1391 1392// Details about the lock which locked the deployment. 1393message LockInfo { 1394 // Unique ID for the lock to be overridden with generation ID in the backend. 1395 int64 lock_id = 1; 1396 1397 // Terraform operation, provided by the caller. 1398 string operation = 2; 1399 1400 // Extra information to store with the lock, provided by the caller. 1401 string info = 3; 1402 1403 // user@hostname when available 1404 string who = 4; 1405 1406 // Terraform version 1407 string version = 5; 1408 1409 // Time that the lock was taken. 1410 google.protobuf.Timestamp create_time = 6; 1411} 1412 1413// A preview represents a set of actions Infra Manager would perform 1414// to move the resources towards the desired state as specified in the 1415// configuration. 1416message Preview { 1417 option (google.api.resource) = { 1418 type: "config.googleapis.com/Preview" 1419 pattern: "projects/{project}/locations/{location}/previews/{preview}" 1420 plural: "previews" 1421 singular: "preview" 1422 }; 1423 1424 // Possible states of a preview. 1425 enum State { 1426 // The default value. This value is used if the state is unknown. 1427 STATE_UNSPECIFIED = 0; 1428 1429 // The preview is being created. 1430 CREATING = 1; 1431 1432 // The preview has succeeded. 1433 SUCCEEDED = 2; 1434 1435 // The preview is being applied. 1436 APPLYING = 3; 1437 1438 // The preview is stale. A preview can become stale if a revision has been 1439 // applied after this preview was created. 1440 STALE = 4; 1441 1442 // The preview is being deleted. 1443 DELETING = 5; 1444 1445 // The preview has encountered an unexpected error. 1446 FAILED = 6; 1447 1448 // The preview has been deleted. 1449 DELETED = 7; 1450 } 1451 1452 // Preview mode provides options for customizing preview operations. 1453 enum PreviewMode { 1454 // Unspecified policy, default mode will be used. 1455 PREVIEW_MODE_UNSPECIFIED = 0; 1456 1457 // DEFAULT mode generates an execution plan for reconciling current resource 1458 // state into expected resource state. 1459 DEFAULT = 1; 1460 1461 // DELETE mode generates as execution plan for destroying current resources. 1462 DELETE = 2; 1463 } 1464 1465 // Possible errors that can occur with previews. 1466 enum ErrorCode { 1467 // No error code was specified. 1468 ERROR_CODE_UNSPECIFIED = 0; 1469 1470 // Cloud Build failed due to a permissions issue. 1471 CLOUD_BUILD_PERMISSION_DENIED = 1; 1472 1473 // Cloud Storage bucket failed to create due to a permissions issue. 1474 BUCKET_CREATION_PERMISSION_DENIED = 2; 1475 1476 // Cloud Storage bucket failed for a non-permissions-related issue. 1477 BUCKET_CREATION_FAILED = 3; 1478 1479 // Acquiring lock on provided deployment reference failed. 1480 DEPLOYMENT_LOCK_ACQUIRE_FAILED = 4; 1481 1482 // Preview encountered an error when trying to access Cloud Build API. 1483 PREVIEW_BUILD_API_FAILED = 5; 1484 1485 // Preview created a build but build failed and logs were generated. 1486 PREVIEW_BUILD_RUN_FAILED = 6; 1487 } 1488 1489 // Blueprint to preview. 1490 oneof blueprint { 1491 // The terraform blueprint to preview. 1492 TerraformBlueprint terraform_blueprint = 6; 1493 } 1494 1495 // Identifier. Resource name of the preview. Resource name can be user 1496 // provided or server generated ID if unspecified. Format: 1497 // `projects/{project}/locations/{location}/previews/{preview}` 1498 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 1499 1500 // Output only. Time the preview was created. 1501 google.protobuf.Timestamp create_time = 2 1502 [(google.api.field_behavior) = OUTPUT_ONLY]; 1503 1504 // Optional. User-defined labels for the preview. 1505 map<string, string> labels = 3 [(google.api.field_behavior) = OPTIONAL]; 1506 1507 // Output only. Current state of the preview. 1508 State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 1509 1510 // Optional. Optional deployment reference. If specified, the preview will be 1511 // performed using the provided deployment's current state and use any 1512 // relevant fields from the deployment unless explicitly specified in the 1513 // preview create request. 1514 string deployment = 5 [ 1515 (google.api.field_behavior) = OPTIONAL, 1516 (google.api.resource_reference) = { 1517 type: "config.googleapis.com/Deployment" 1518 } 1519 ]; 1520 1521 // Optional. Current mode of preview. 1522 PreviewMode preview_mode = 15 [(google.api.field_behavior) = OPTIONAL]; 1523 1524 // Optional. User-specified Service Account (SA) credentials to be used when 1525 // previewing resources. 1526 // Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` 1527 string service_account = 7 [ 1528 (google.api.field_behavior) = OPTIONAL, 1529 (google.api.resource_reference) = { 1530 type: "iam.googleapis.com/ServiceAccount" 1531 } 1532 ]; 1533 1534 // Optional. User-defined location of Cloud Build logs, artifacts, and 1535 // in Google Cloud Storage. 1536 // Format: `gs://{bucket}/{folder}` 1537 // A default bucket will be bootstrapped if the field is not set or empty 1538 // Default Bucket Format: `gs://<project number>-<region>-blueprint-config` 1539 // Constraints: 1540 // - The bucket needs to be in the same project as the deployment 1541 // - The path cannot be within the path of `gcs_source` 1542 // If omitted and deployment resource ref provided has artifacts_gcs_bucket 1543 // defined, that artifact bucket is used. 1544 optional string artifacts_gcs_bucket = 8 1545 [(google.api.field_behavior) = OPTIONAL]; 1546 1547 // Optional. The user-specified Worker Pool resource in which the Cloud Build 1548 // job will execute. Format 1549 // projects/{project}/locations/{location}/workerPools/{workerPoolId} If this 1550 // field is unspecified, the default Cloud Build worker pool will be used. If 1551 // omitted and deployment resource ref provided has worker_pool defined, that 1552 // worker pool is used. 1553 optional string worker_pool = 9 [ 1554 (google.api.field_behavior) = OPTIONAL, 1555 (google.api.resource_reference) = { 1556 type: "cloudbuild.googleapis.com/WorkerPool" 1557 } 1558 ]; 1559 1560 // Output only. Code describing any errors that may have occurred. 1561 ErrorCode error_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 1562 1563 // Output only. Additional information regarding the current state. 1564 google.rpc.Status error_status = 11 1565 [(google.api.field_behavior) = OUTPUT_ONLY]; 1566 1567 // Output only. Cloud Build instance UUID associated with this preview. 1568 string build = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; 1569 1570 // Output only. Summary of errors encountered during Terraform preview. 1571 // It has a size limit of 10, i.e. only top 10 errors will be summarized here. 1572 repeated TerraformError tf_errors = 13 1573 [(google.api.field_behavior) = OUTPUT_ONLY]; 1574 1575 // Output only. Link to tf-error.ndjson file, which contains the full list of 1576 // the errors encountered during a Terraform preview. 1577 // Format: `gs://{bucket}/{object}`. 1578 string error_logs = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; 1579 1580 // Output only. Artifacts from preview. 1581 PreviewArtifacts preview_artifacts = 16 1582 [(google.api.field_behavior) = OUTPUT_ONLY]; 1583 1584 // Output only. Location of preview logs in `gs://{bucket}/{object}` format. 1585 string logs = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; 1586 1587 // Output only. The current Terraform version set on the preview. 1588 // It is in the format of "Major.Minor.Patch", for example, "1.3.10". 1589 string tf_version = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; 1590 1591 // Optional. The user-specified Terraform version constraint. 1592 // Example: "=1.3.10". 1593 optional string tf_version_constraint = 19 1594 [(google.api.field_behavior) = OPTIONAL]; 1595} 1596 1597// Ephemeral metadata content describing the state of a preview operation. 1598message PreviewOperationMetadata { 1599 // The possible steps a preview may be running. 1600 enum PreviewStep { 1601 // Unspecified preview step. 1602 PREVIEW_STEP_UNSPECIFIED = 0; 1603 1604 // Infra Manager is creating a Google Cloud Storage bucket to store 1605 // artifacts and metadata about the preview. 1606 PREPARING_STORAGE_BUCKET = 1; 1607 1608 // Downloading the blueprint onto the Google Cloud Storage bucket. 1609 DOWNLOADING_BLUEPRINT = 2; 1610 1611 // Initializing Terraform using `terraform init`. 1612 RUNNING_TF_INIT = 3; 1613 1614 // Running `terraform plan`. 1615 RUNNING_TF_PLAN = 4; 1616 1617 // Fetching a deployment. 1618 FETCHING_DEPLOYMENT = 5; 1619 1620 // Locking a deployment. 1621 LOCKING_DEPLOYMENT = 6; 1622 1623 // Unlocking a deployment. 1624 UNLOCKING_DEPLOYMENT = 7; 1625 1626 // Operation was successful. 1627 SUCCEEDED = 8; 1628 1629 // Operation failed. 1630 FAILED = 9; 1631 1632 // Validating the provided repository. 1633 VALIDATING_REPOSITORY = 10; 1634 } 1635 1636 // The current step the preview operation is running. 1637 PreviewStep step = 1; 1638 1639 // Artifacts from preview. 1640 PreviewArtifacts preview_artifacts = 2; 1641 1642 // Output only. Location of preview logs in `gs://{bucket}/{object}` format. 1643 string logs = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 1644 1645 // Output only. Cloud Build instance UUID associated with this preview. 1646 string build = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 1647} 1648 1649// Artifacts created by preview. 1650message PreviewArtifacts { 1651 // Output only. Location of a blueprint copy and other content in Google Cloud 1652 // Storage. Format: `gs://{bucket}/{object}` 1653 string content = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 1654 1655 // Output only. Location of artifacts in Google Cloud Storage. 1656 // Format: `gs://{bucket}/{object}` 1657 string artifacts = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 1658} 1659 1660// A request to create a preview. 1661message CreatePreviewRequest { 1662 // Required. The parent in whose context the Preview is created. The parent 1663 // value is in the format: 'projects/{project_id}/locations/{location}'. 1664 string parent = 1 [ 1665 (google.api.field_behavior) = REQUIRED, 1666 (google.api.resource_reference) = { 1667 type: "locations.googleapis.com/Location" 1668 } 1669 ]; 1670 1671 // Optional. The preview ID. 1672 string preview_id = 2 [(google.api.field_behavior) = OPTIONAL]; 1673 1674 // Required. [Preview][google.cloud.config.v1.Preview] resource to be created. 1675 Preview preview = 3 [(google.api.field_behavior) = REQUIRED]; 1676 1677 // Optional. An optional request ID to identify requests. Specify a unique 1678 // request ID so that if you must retry your request, the server will know to 1679 // ignore the request if it has already been completed. The server will 1680 // guarantee that for at least 60 minutes since the first request. 1681 // 1682 // For example, consider a situation where you make an initial request and the 1683 // request times out. If you make the request again with the same request ID, 1684 // the server can check if original operation with the same request ID was 1685 // received, and if so, will ignore the second request. This prevents clients 1686 // from accidentally creating duplicate commitments. 1687 // 1688 // The request ID must be a valid UUID with the exception that zero UUID is 1689 // not supported (00000000-0000-0000-0000-000000000000). 1690 string request_id = 4 [ 1691 (google.api.field_info).format = UUID4, 1692 (google.api.field_behavior) = OPTIONAL 1693 ]; 1694} 1695 1696// A request to get details about a preview. 1697message GetPreviewRequest { 1698 // Required. The name of the preview. Format: 1699 // 'projects/{project_id}/locations/{location}/previews/{preview}'. 1700 string name = 1 [ 1701 (google.api.field_behavior) = REQUIRED, 1702 (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } 1703 ]; 1704} 1705 1706// A request to list all previews for a given project and location. 1707message ListPreviewsRequest { 1708 // Required. The parent in whose context the Previews are listed. The parent 1709 // value is in the format: 'projects/{project_id}/locations/{location}'. 1710 string parent = 1 [ 1711 (google.api.field_behavior) = REQUIRED, 1712 (google.api.resource_reference) = { 1713 type: "locations.googleapis.com/Location" 1714 } 1715 ]; 1716 1717 // Optional. When requesting a page of resources, 'page_size' specifies number 1718 // of resources to return. If unspecified, at most 500 will be returned. The 1719 // maximum value is 1000. 1720 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 1721 1722 // Optional. Token returned by previous call to 'ListDeployments' which 1723 // specifies the position in the list from where to continue listing the 1724 // resources. 1725 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 1726 1727 // Optional. Lists the Deployments that match the filter expression. A filter 1728 // expression filters the resources listed in the response. The expression 1729 // must be of the form '{field} {operator} {value}' where operators: '<', '>', 1730 // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS 1731 // operator which is roughly synonymous with equality). {field} can refer to a 1732 // proto or JSON field, or a synthetic field. Field names can be camelCase or 1733 // snake_case. 1734 // 1735 // Examples: 1736 // - Filter by name: 1737 // name = "projects/foo/locations/us-central1/deployments/bar 1738 // 1739 // - Filter by labels: 1740 // - Resources that have a key called 'foo' 1741 // labels.foo:* 1742 // - Resources that have a key called 'foo' whose value is 'bar' 1743 // labels.foo = bar 1744 // 1745 // - Filter by state: 1746 // - Deployments in CREATING state. 1747 // state=CREATING 1748 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 1749 1750 // Optional. Field to use to sort the list. 1751 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 1752} 1753 1754// A response to a `ListPreviews` call. Contains a list of Previews. 1755message ListPreviewsResponse { 1756 // List of [Previews][]s. 1757 repeated Preview previews = 1; 1758 1759 // Token to be supplied to the next ListPreviews request via `page_token` 1760 // to obtain the next set of results. 1761 string next_page_token = 2; 1762 1763 // Locations that could not be reached. 1764 repeated string unreachable = 3; 1765} 1766 1767// A request to delete a preview. 1768message DeletePreviewRequest { 1769 // Required. The name of the Preview in the format: 1770 // 'projects/{project_id}/locations/{location}/previews/{preview}'. 1771 string name = 1 [ 1772 (google.api.field_behavior) = REQUIRED, 1773 (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } 1774 ]; 1775 1776 // Optional. An optional request ID to identify requests. Specify a unique 1777 // request ID so that if you must retry your request, the server will know to 1778 // ignore the request if it has already been completed. The server will 1779 // guarantee that for at least 60 minutes after the first request. 1780 // 1781 // For example, consider a situation where you make an initial request and the 1782 // request times out. If you make the request again with the same request ID, 1783 // the server can check if original operation with the same request ID was 1784 // received, and if so, will ignore the second request. This prevents clients 1785 // from accidentally creating duplicate commitments. 1786 // 1787 // The request ID must be a valid UUID with the exception that zero UUID is 1788 // not supported (00000000-0000-0000-0000-000000000000). 1789 string request_id = 2 [ 1790 (google.api.field_info).format = UUID4, 1791 (google.api.field_behavior) = OPTIONAL 1792 ]; 1793} 1794 1795// A request to export preview results. 1796message ExportPreviewResultRequest { 1797 // Required. The preview whose results should be exported. The preview value 1798 // is in the format: 1799 // 'projects/{project_id}/locations/{location}/previews/{preview}'. 1800 string parent = 1 [ 1801 (google.api.field_behavior) = REQUIRED, 1802 (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } 1803 ]; 1804} 1805 1806// A response to `ExportPreviewResult` call. Contains preview results. 1807message ExportPreviewResultResponse { 1808 // Output only. Signed URLs for accessing the plan files. 1809 PreviewResult result = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 1810} 1811 1812// Contains a signed Cloud Storage URLs. 1813message PreviewResult { 1814 // Output only. Plan binary signed URL 1815 string binary_signed_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 1816 1817 // Output only. Plan JSON signed URL 1818 string json_signed_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 1819} 1820 1821// The request message for the GetTerraformVersion method. 1822message GetTerraformVersionRequest { 1823 // Required. The name of the TerraformVersion. Format: 1824 // 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}' 1825 string name = 1 [ 1826 (google.api.field_behavior) = REQUIRED, 1827 (google.api.resource_reference) = { 1828 type: "config.googleapis.com/TerraformVersion" 1829 } 1830 ]; 1831} 1832 1833// The request message for the ListTerraformVersions method. 1834message ListTerraformVersionsRequest { 1835 // Required. The parent in whose context the TerraformVersions are listed. The 1836 // parent value is in the format: 1837 // 'projects/{project_id}/locations/{location}'. 1838 string parent = 1 [ 1839 (google.api.field_behavior) = REQUIRED, 1840 (google.api.resource_reference) = { 1841 type: "locations.googleapis.com/Location" 1842 } 1843 ]; 1844 1845 // Optional. When requesting a page of resources, 'page_size' specifies number 1846 // of resources to return. If unspecified, at most 500 will be returned. The 1847 // maximum value is 1000. 1848 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 1849 1850 // Optional. Token returned by previous call to 'ListTerraformVersions' which 1851 // specifies the position in the list from where to continue listing the 1852 // resources. 1853 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 1854 1855 // Optional. Lists the TerraformVersions that match the filter expression. A 1856 // filter expression filters the resources listed in the response. The 1857 // expression must be of the form '{field} {operator} {value}' where 1858 // operators: '<', '>', 1859 // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS 1860 // operator which is roughly synonymous with equality). {field} can refer to a 1861 // proto or JSON field, or a synthetic field. Field names can be camelCase or 1862 // snake_case. 1863 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 1864 1865 // Optional. Field to use to sort the list. 1866 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 1867} 1868 1869// The response message for the `ListTerraformVersions` method. 1870message ListTerraformVersionsResponse { 1871 // List of [TerraformVersion][google.cloud.config.v1.TerraformVersion]s. 1872 repeated TerraformVersion terraform_versions = 1; 1873 1874 // Token to be supplied to the next ListTerraformVersions request via 1875 // `page_token` to obtain the next set of results. 1876 string next_page_token = 2; 1877 1878 // Unreachable resources, if any. 1879 repeated string unreachable = 3; 1880} 1881 1882// A TerraformVersion represents the support state the corresponding 1883// Terraform version. 1884message TerraformVersion { 1885 option (google.api.resource) = { 1886 type: "config.googleapis.com/TerraformVersion" 1887 pattern: "projects/{project}/locations/{location}/terraformVersions/{terraform_version}" 1888 plural: "terraformVersions" 1889 singular: "terraformVersion" 1890 }; 1891 1892 // Possible states of a TerraformVersion. 1893 enum State { 1894 // The default value. This value is used if the state is omitted. 1895 STATE_UNSPECIFIED = 0; 1896 1897 // The version is actively supported. 1898 ACTIVE = 1; 1899 1900 // The version is deprecated. 1901 DEPRECATED = 2; 1902 1903 // The version is obsolete. 1904 OBSOLETE = 3; 1905 } 1906 1907 // Identifier. The version name is in the format: 1908 // 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'. 1909 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 1910 1911 // Output only. The state of the version, ACTIVE, DEPRECATED or OBSOLETE. 1912 State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 1913 1914 // Output only. When the version is supported. 1915 google.protobuf.Timestamp support_time = 3 1916 [(google.api.field_behavior) = OUTPUT_ONLY]; 1917 1918 // Output only. When the version is deprecated. 1919 optional google.protobuf.Timestamp deprecate_time = 4 1920 [(google.api.field_behavior) = OUTPUT_ONLY]; 1921 1922 // Output only. When the version is obsolete. 1923 optional google.protobuf.Timestamp obsolete_time = 5 1924 [(google.api.field_behavior) = OUTPUT_ONLY]; 1925} 1926