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.



449
450
451
# File 'lib/google/apis/config_v1/classes.rb', line 449

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>)


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

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)


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

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)


321
322
323
# File 'lib/google/apis/config_v1/classes.rb', line 321

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)


327
328
329
# File 'lib/google/apis/config_v1/classes.rb', line 327

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)


333
334
335
# File 'lib/google/apis/config_v1/classes.rb', line 333

def delete_logs
  @delete_logs
end

#delete_resultsGoogle::Apis::ConfigV1::ApplyResults

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



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

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)


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

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)


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

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)


358
359
360
# File 'lib/google/apis/config_v1/classes.rb', line 358

def import_existing_resources
  @import_existing_resources
end

#labelsHash<String,String>

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

Returns:

  • (Hash<String,String>)


364
365
366
# File 'lib/google/apis/config_v1/classes.rb', line 364

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)


370
371
372
# File 'lib/google/apis/config_v1/classes.rb', line 370

def latest_revision
  @latest_revision
end

#lock_stateString

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

Returns:

  • (String)


375
376
377
# File 'lib/google/apis/config_v1/classes.rb', line 375

def lock_state
  @lock_state
end

#nameString

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

Returns:

  • (String)


381
382
383
# File 'lib/google/apis/config_v1/classes.rb', line 381

def name
  @name
end

#provider_configGoogle::Apis::ConfigV1::ProviderConfig

ProviderConfig contains the provider configurations. Corresponds to the JSON property providerConfig



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

def provider_config
  @provider_config
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)


393
394
395
# File 'lib/google/apis/config_v1/classes.rb', line 393

def quota_validation
  @quota_validation
end

#service_accountString

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

Returns:

  • (String)


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

def 
  @service_account
end

#stateString

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

Returns:

  • (String)


405
406
407
# File 'lib/google/apis/config_v1/classes.rb', line 405

def state
  @state
end

#state_detailString

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

Returns:

  • (String)


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

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



416
417
418
# File 'lib/google/apis/config_v1/classes.rb', line 416

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



423
424
425
# File 'lib/google/apis/config_v1/classes.rb', line 423

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)


429
430
431
# File 'lib/google/apis/config_v1/classes.rb', line 429

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)


434
435
436
# File 'lib/google/apis/config_v1/classes.rb', line 434

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)


439
440
441
# File 'lib/google/apis/config_v1/classes.rb', line 439

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)


447
448
449
# File 'lib/google/apis/config_v1/classes.rb', line 447

def worker_pool
  @worker_pool
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/google/apis/config_v1/classes.rb', line 454

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)
  @provider_config = args[:provider_config] if args.key?(:provider_config)
  @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