Class: Google::Apis::ConfigV1::Deployment

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/config_v1/classes.rb,
lib/google/apis/config_v1/representations.rb,
lib/google/apis/config_v1/representations.rb

Overview

A Deployment is a group of resources and configs managed and provisioned by Infra Manager.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Deployment

Returns a new instance of Deployment.



411
412
413
# File 'lib/google/apis/config_v1/classes.rb', line 411

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#annotationsHash<String,String>

Optional. Arbitrary key-value metadata storage e.g. to help client tools identify deployments during automation. See https://google.aip.dev/148# annotations for details on format and size limitations. Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


273
274
275
# File 'lib/google/apis/config_v1/classes.rb', line 273

def annotations
  @annotations
end

#artifacts_gcs_bucketString

Optional. User-defined location of Cloud Build logs and artifacts in Google Cloud Storage. Format: gs://bucket/folder`A default bucket will be bootstrapped if the field is not set or empty. Default bucket format:gs://-- blueprint-configConstraints: - The bucket needs to be in the same project as the deployment - The path cannot be within the path ofgcs_source- The field cannot be updated, including changing its presence Corresponds to the JSON propertyartifactsGcsBucket`

Returns:

  • (String)


283
284
285
# File 'lib/google/apis/config_v1/classes.rb', line 283

def artifacts_gcs_bucket
  @artifacts_gcs_bucket
end

#create_timeString

Output only. Time when the deployment was created. Corresponds to the JSON property createTime

Returns:

  • (String)


288
289
290
# File 'lib/google/apis/config_v1/classes.rb', line 288

def create_time
  @create_time
end

#delete_buildString

Output only. Cloud Build instance UUID associated with deleting this deployment. Corresponds to the JSON property deleteBuild

Returns:

  • (String)


294
295
296
# File 'lib/google/apis/config_v1/classes.rb', line 294

def delete_build
  @delete_build
end

#delete_logsString

Output only. Location of Cloud Build logs in Google Cloud Storage, populated when deleting this deployment. Format: gs://bucket/object`. Corresponds to the JSON propertydeleteLogs`

Returns:

  • (String)


300
301
302
# File 'lib/google/apis/config_v1/classes.rb', line 300

def delete_logs
  @delete_logs
end

#delete_resultsGoogle::Apis::ConfigV1::ApplyResults

Outputs and artifacts from applying a deployment. Corresponds to the JSON property deleteResults



305
306
307
# File 'lib/google/apis/config_v1/classes.rb', line 305

def delete_results
  @delete_results
end

#error_codeString

Output only. Error code describing errors that may have occurred. Corresponds to the JSON property errorCode

Returns:

  • (String)


310
311
312
# File 'lib/google/apis/config_v1/classes.rb', line 310

def error_code
  @error_code
end

#error_logsString

Output only. Location of Terraform error logs in Google Cloud Storage. Format: gs://bucket/object`. Corresponds to the JSON propertyerrorLogs`

Returns:

  • (String)


316
317
318
# File 'lib/google/apis/config_v1/classes.rb', line 316

def error_logs
  @error_logs
end

#import_existing_resourcesBoolean Also known as: import_existing_resources?

By default, Infra Manager will return a failure when Terraform encounters a 409 code (resource conflict error) during actuation. If this flag is set to true, Infra Manager will instead attempt to automatically import the resource into the Terraform state (for supported resource types) and continue actuation. Not all resource types are supported, refer to documentation. Corresponds to the JSON property importExistingResources

Returns:

  • (Boolean)


325
326
327
# File 'lib/google/apis/config_v1/classes.rb', line 325

def import_existing_resources
  @import_existing_resources
end

#labelsHash<String,String>

User-defined metadata for the deployment. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


331
332
333
# File 'lib/google/apis/config_v1/classes.rb', line 331

def labels
  @labels
end

#latest_revisionString

Output only. Revision name that was most recently applied. Format: projects/ project/locations/location/deployments/deployment/ revisions/revision` Corresponds to the JSON propertylatestRevision`

Returns:

  • (String)


337
338
339
# File 'lib/google/apis/config_v1/classes.rb', line 337

def latest_revision
  @latest_revision
end

#lock_stateString

Output only. Current lock state of the deployment. Corresponds to the JSON property lockState

Returns:

  • (String)


342
343
344
# File 'lib/google/apis/config_v1/classes.rb', line 342

def lock_state
  @lock_state
end

#nameString

Resource name of the deployment. Format: projects/project/locations/ location/deployments/deployment` Corresponds to the JSON propertyname`

Returns:

  • (String)


348
349
350
# File 'lib/google/apis/config_v1/classes.rb', line 348

def name
  @name
end

#quota_validationString

Optional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies. Corresponds to the JSON property quotaValidation

Returns:

  • (String)


355
356
357
# File 'lib/google/apis/config_v1/classes.rb', line 355

def quota_validation
  @quota_validation
end

#service_accountString

Optional. User-specified Service Account (SA) credentials to be used when actuating resources. Format: projects/projectID/serviceAccounts/ serviceAccount` Corresponds to the JSON propertyserviceAccount`

Returns:

  • (String)


362
363
364
# File 'lib/google/apis/config_v1/classes.rb', line 362

def 
  @service_account
end

#stateString

Output only. Current state of the deployment. Corresponds to the JSON property state

Returns:

  • (String)


367
368
369
# File 'lib/google/apis/config_v1/classes.rb', line 367

def state
  @state
end

#state_detailString

Output only. Additional information regarding the current state. Corresponds to the JSON property stateDetail

Returns:

  • (String)


372
373
374
# File 'lib/google/apis/config_v1/classes.rb', line 372

def state_detail
  @state_detail
end

#terraform_blueprintGoogle::Apis::ConfigV1::TerraformBlueprint

TerraformBlueprint describes the source of a Terraform root module which describes the resources and configs to be deployed. Corresponds to the JSON property terraformBlueprint



378
379
380
# File 'lib/google/apis/config_v1/classes.rb', line 378

def terraform_blueprint
  @terraform_blueprint
end

#tf_errorsArray<Google::Apis::ConfigV1::TerraformError>

Output only. Errors encountered when deleting this deployment. Errors are truncated to 10 entries, see delete_results and error_logs for full details. Corresponds to the JSON property tfErrors



385
386
387
# File 'lib/google/apis/config_v1/classes.rb', line 385

def tf_errors
  @tf_errors
end

#tf_versionString

Output only. The current Terraform version set on the deployment. It is in the format of "Major.Minor.Patch", for example, "1.3.10". Corresponds to the JSON property tfVersion

Returns:

  • (String)


391
392
393
# File 'lib/google/apis/config_v1/classes.rb', line 391

def tf_version
  @tf_version
end

#tf_version_constraintString

Optional. The user-specified Terraform version constraint. Example: "=1.3.10". Corresponds to the JSON property tfVersionConstraint

Returns:

  • (String)


396
397
398
# File 'lib/google/apis/config_v1/classes.rb', line 396

def tf_version_constraint
  @tf_version_constraint
end

#update_timeString

Output only. Time when the deployment was last modified. Corresponds to the JSON property updateTime

Returns:

  • (String)


401
402
403
# File 'lib/google/apis/config_v1/classes.rb', line 401

def update_time
  @update_time
end

#worker_poolString

Optional. The user-specified Cloud Build worker pool resource in which the Cloud Build job will execute. Format: projects/project/locations/location/ workerPools/workerPoolId`. If this field is unspecified, the default Cloud Build worker pool will be used. Corresponds to the JSON propertyworkerPool`

Returns:

  • (String)


409
410
411
# File 'lib/google/apis/config_v1/classes.rb', line 409

def worker_pool
  @worker_pool
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
# File 'lib/google/apis/config_v1/classes.rb', line 416

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @artifacts_gcs_bucket = args[:artifacts_gcs_bucket] if args.key?(:artifacts_gcs_bucket)
  @create_time = args[:create_time] if args.key?(:create_time)
  @delete_build = args[:delete_build] if args.key?(:delete_build)
  @delete_logs = args[:delete_logs] if args.key?(:delete_logs)
  @delete_results = args[:delete_results] if args.key?(:delete_results)
  @error_code = args[:error_code] if args.key?(:error_code)
  @error_logs = args[:error_logs] if args.key?(:error_logs)
  @import_existing_resources = args[:import_existing_resources] if args.key?(:import_existing_resources)
  @labels = args[:labels] if args.key?(:labels)
  @latest_revision = args[:latest_revision] if args.key?(:latest_revision)
  @lock_state = args[:lock_state] if args.key?(:lock_state)
  @name = args[:name] if args.key?(:name)
  @quota_validation = args[:quota_validation] if args.key?(:quota_validation)
  @service_account = args[:service_account] if args.key?(:service_account)
  @state = args[:state] if args.key?(:state)
  @state_detail = args[:state_detail] if args.key?(:state_detail)
  @terraform_blueprint = args[:terraform_blueprint] if args.key?(:terraform_blueprint)
  @tf_errors = args[:tf_errors] if args.key?(:tf_errors)
  @tf_version = args[:tf_version] if args.key?(:tf_version)
  @tf_version_constraint = args[:tf_version_constraint] if args.key?(:tf_version_constraint)
  @update_time = args[:update_time] if args.key?(:update_time)
  @worker_pool = args[:worker_pool] if args.key?(:worker_pool)
end