Skip to content

Commit 6145b5f

Browse files
Google APIscopybara-github
authored andcommitted
feat: add support for enabling automigration from deprecated Terraform versions
feat: added error code when failing import values from an external source PiperOrigin-RevId: 854277617
1 parent 524b2de commit 6145b5f

File tree

2 files changed

+111
-1
lines changed

2 files changed

+111
-1
lines changed

google/cloud/config/v1/config.proto

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -322,6 +322,29 @@ service Config {
322322
};
323323
option (google.api.method_signature) = "name";
324324
}
325+
326+
// Get the AutoMigrationConfig for a given project and location.
327+
rpc GetAutoMigrationConfig(GetAutoMigrationConfigRequest)
328+
returns (AutoMigrationConfig) {
329+
option (google.api.http) = {
330+
get: "/v1/{name=projects/*/locations/*/autoMigrationConfig}"
331+
};
332+
option (google.api.method_signature) = "name";
333+
}
334+
335+
// Updates the AutoMigrationConfig for a given project and location.
336+
rpc UpdateAutoMigrationConfig(UpdateAutoMigrationConfigRequest)
337+
returns (google.longrunning.Operation) {
338+
option (google.api.http) = {
339+
patch: "/v1/{auto_migration_config.name=projects/*/locations/*/autoMigrationConfig}"
340+
body: "auto_migration_config"
341+
};
342+
option (google.api.method_signature) = "auto_migration_config,update_mask";
343+
option (google.longrunning.operation_info) = {
344+
response_type: "AutoMigrationConfig"
345+
metadata_type: "OperationMetadata"
346+
};
347+
}
325348
}
326349

327350
// Enum values to control quota checks for resources in terraform
@@ -402,6 +425,9 @@ message Deployment {
402425
// Cloud Storage bucket creation failed due to an issue unrelated to
403426
// permissions.
404427
BUCKET_CREATION_FAILED = 8;
428+
429+
// Failed to import values from an external source.
430+
EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 10;
405431
}
406432

407433
// Possible lock states of a deployment.
@@ -965,6 +991,9 @@ message Revision {
965991
// quota validation failed for one or more resources in terraform
966992
// configuration files.
967993
QUOTA_VALIDATION_FAILED = 7;
994+
995+
// Failed to import values from an external source.
996+
EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 8;
968997
}
969998

970999
// Blueprint that was deployed.
@@ -1529,6 +1558,9 @@ message Preview {
15291558

15301559
// Preview created a build but build failed and logs were generated.
15311560
PREVIEW_BUILD_RUN_FAILED = 6;
1561+
1562+
// Failed to import values from an external source.
1563+
EXTERNAL_VALUE_SOURCE_IMPORT_FAILED = 7;
15321564
}
15331565

15341566
// Blueprint to preview.
@@ -2275,3 +2307,50 @@ message ProviderConfig {
22752307
optional ProviderSource source_type = 1
22762308
[(google.api.field_behavior) = OPTIONAL];
22772309
}
2310+
2311+
// The request message for the GetAutoMigrationConfig method.
2312+
message GetAutoMigrationConfigRequest {
2313+
// Required. The name of the AutoMigrationConfig.
2314+
// Format:
2315+
// 'projects/{project_id}/locations/{location}/AutoMigrationConfig'.
2316+
string name = 1 [
2317+
(google.api.field_behavior) = REQUIRED,
2318+
(google.api.resource_reference) = {
2319+
type: "config.googleapis.com/AutoMigrationConfig"
2320+
}
2321+
];
2322+
}
2323+
2324+
// AutoMigrationConfig contains the automigration configuration for a project.
2325+
message AutoMigrationConfig {
2326+
option (google.api.resource) = {
2327+
type: "config.googleapis.com/AutoMigrationConfig"
2328+
pattern: "projects/{project}/locations/{location}/autoMigrationConfig"
2329+
plural: "autoMigrationConfigs"
2330+
singular: "autoMigrationConfig"
2331+
};
2332+
2333+
// Identifier. The name of the AutoMigrationConfig.
2334+
// Format:
2335+
// 'projects/{project_id}/locations/{location}/AutoMigrationConfig'.
2336+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
2337+
2338+
// Output only. Time the AutoMigrationConfig was last updated.
2339+
google.protobuf.Timestamp update_time = 2
2340+
[(google.api.field_behavior) = OUTPUT_ONLY];
2341+
2342+
// Optional. Whether the auto migration is enabled for the project.
2343+
bool auto_migration_enabled = 3 [(google.api.field_behavior) = OPTIONAL];
2344+
}
2345+
2346+
// The request message for the UpdateAutoMigrationConfig method.
2347+
message UpdateAutoMigrationConfigRequest {
2348+
// Optional. The update mask applies to the resource. See
2349+
// [google.protobuf.FieldMask][google.protobuf.FieldMask].
2350+
google.protobuf.FieldMask update_mask = 1
2351+
[(google.api.field_behavior) = OPTIONAL];
2352+
2353+
// Required. The AutoMigrationConfig to update.
2354+
AutoMigrationConfig auto_migration_config = 2
2355+
[(google.api.field_behavior) = REQUIRED];
2356+
}

google/cloud/config/v1/config_v1.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,37 @@ authentication:
9292
https://www.googleapis.com/auth/cloud-platform
9393
9494
publishing:
95+
method_settings:
96+
- selector: google.cloud.config.v1.Config.CreateDeployment
97+
long_running:
98+
initial_poll_delay: 300s
99+
poll_delay_multiplier: 1.25
100+
max_poll_delay: 3600s
101+
total_poll_timeout: 43200s
102+
- selector: google.cloud.config.v1.Config.UpdateDeployment
103+
long_running:
104+
initial_poll_delay: 300s
105+
poll_delay_multiplier: 1.25
106+
max_poll_delay: 3600s
107+
total_poll_timeout: 43200s
108+
- selector: google.cloud.config.v1.Config.DeleteDeployment
109+
long_running:
110+
initial_poll_delay: 300s
111+
poll_delay_multiplier: 1.25
112+
max_poll_delay: 3600s
113+
total_poll_timeout: 43200s
114+
- selector: google.cloud.config.v1.Config.CreatePreview
115+
long_running:
116+
initial_poll_delay: 300s
117+
poll_delay_multiplier: 1.25
118+
max_poll_delay: 3600s
119+
total_poll_timeout: 43200s
120+
- selector: google.cloud.config.v1.Config.DeletePreview
121+
long_running:
122+
initial_poll_delay: 300s
123+
poll_delay_multiplier: 1.25
124+
max_poll_delay: 3600s
125+
total_poll_timeout: 43200s
95126
new_issue_uri: https://issuetracker.google.com/issues/new?component=536700
96127
documentation_uri: https://cloud.google.com/infrastructure-manager/docs/overview
97128
api_short_name: infra-manager

0 commit comments

Comments
 (0)