Skip to content

Commit

Permalink
Merge pull request #546 from inspec/CHEF-7364-MAGIC-MODULE-composer-P…
Browse files Browse the repository at this point in the history
…rojects__locations__environment

CHEF-7364-MAGIC-MODULE-composer-Projects__locations__environment - Resource Implementation
  • Loading branch information
sa-progress authored Dec 8, 2023
2 parents 09f2def + 1dbf694 commit 4e0d496
Show file tree
Hide file tree
Showing 37 changed files with 1,817 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ The following resources are available in the InSpec GCP Profile
| [google_vertex_ai_tensorboard_experiment_run](docs/resources/google_vertex_ai_tensorboard_experiment_run.md) | [google_vertex_ai_tensorboard_experiment_runs](docs/resources/google_vertex_ai_tensorboard_experiment_runs.md) |
| [google_vertex_ai_tensorboard_experiment_run_time_series_resource](docs/resources/google_vertex_ai_tensorboard_experiment_run_time_series_resource.md) | [google_vertex_ai_tensorboard_experiment_run_time_series_resources](docs/resources/google_vertex_ai_tensorboard_experiment_run_time_series_resources.md) |
| [google_vertex_ai_training_pipeline](docs/resources/google_vertex_ai_training_pipeline.md) | [google_vertex_ai_training_pipelines](docs/resources/google_vertex_ai_training_pipelines.md) |
| [google_composer_project_location_environment](docs/resources/google_composer_project_location_environment.md) | [google_composer_project_location_environments](docs/resources/google_composer_project_location_environment.md) |

## Examples

Expand Down
55 changes: 44 additions & 11 deletions build/inspec/test/integration/configuration/mm-attributes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ index:
update_time : "value_updatetime"
create_time : "value_createtime"
etag : "value_etag"

tensorboard:
name : "value_name"
region : "value_region"
Expand Down Expand Up @@ -883,14 +883,47 @@ tensorboard_experiment_run_time_series_resource:

project_location_image_version:
parent : "value_parent"

vpn_gateway:
project : "value_project"
region : "value_region"
vpn_gateway : "value_vpngateway"
kind : "value_kind"
id : "value_id"
creation_timestamp : "value_creationtimestamp"
name : "value_name"
description : "value_description"
network : "value_network"
self_link : "value_selflink"
label_fingerprint : "value_labelfingerprint"
stack_type : "value_stacktype"
organization:
name : "ppradhan"
parent : "organizations/ppradhan"
runtime_type : "CLOUD"
authorized_network : "default"
project_id : "ppradhan"
subscription_type : "PAID"
created_at : ""1698225643253"
state : "ACTIVE"
analytics_region : "us-west1"
name : "value_name"
parent : "value_parent"
api_consumer_data_encryption_key_name : "value_apiconsumerdataencryptionkeyname"
runtime_database_encryption_key_name : "value_runtimedatabaseencryptionkeyname"
runtime_type : "value_runtimetype"
type : "value_type"
authorized_network : "value_authorizednetwork"
project_id : "value_projectid"
description : "value_description"
ca_certificate : "value_cacertificate"
subscription_type : "value_subscriptiontype"
customer_name : "value_customername"
created_at : "value_createdat"
last_modified_at : "value_lastmodifiedat"
subscription_plan : "value_subscriptionplan"
state : "value_state"
control_plane_encryption_key_name : "value_controlplaneencryptionkeyname"
analytics_region : "value_analyticsregion"
api_consumer_data_location : "value_apiconsumerdatalocation"
display_name : "value_displayname"
apigee_project_id : "value_apigeeprojectid"
expires_at : "value_expiresat"
billing_type : "value_billingtype"
project_location_environment:
name : "value_name"
parent : "value_parent"
uuid : "value_uuid"
state : "value_state"
create_time : "value_createtime"
update_time : "value_updatetime"
265 changes: 265 additions & 0 deletions docs/resources/google_composer_project_location_environment.md

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions docs/resources/google_composer_project_location_environments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: About the google_composer_project_location_environments resource
platform: gcp
---

## Syntax
A `google_composer_project_location_environments` is used to test a Google ProjectLocationEnvironment resource

## Examples
```
describe google_composer_project_location_environments(parent: ' value_parent') do
it { should exist }
its('name') { should include('value_name') }
its('uuid') { should include('value_uuid') }
its('state') { should include('value_state') }
its('create_time') { should include('value_createtime') }
its('update_time') { should include('value_updatetime') }
its('satisfies_pzs') { should include('value_satisfies_pzs') }
end
```

## Properties
Properties that can be accessed from the `google_composer_project_location_environments` resource:

See [google_composer_project_location_environment.md](google_composer_project_location_environment.md) for more detailed information
* `names`: an array of `google_composer_project_location_environment` name
* `configs`: an array of `google_composer_project_location_environment` config
* `uuids`: an array of `google_composer_project_location_environment` uuid
* `states`: an array of `google_composer_project_location_environment` state
* `create_times`: an array of `google_composer_project_location_environment` create_time
* `update_times`: an array of `google_composer_project_location_environment` update_time
* `labels`: an array of `google_composer_project_location_environment` labels
* `satisfies_pzs`: an array of `google_composer_project_location_environment` satisfies_pzs
* `storage_configs`: an array of `google_composer_project_location_environment` storage_config

## Filter Criteria
This resource supports all of the above properties as filter criteria, which can be used
with `where` as a block or a method.

## GCP Permissions

Ensure the [https://composer.googleapis.com/](https://console.cloud.google.com/apis/library/composer.googleapis.com/) is enabled for the current project.
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
require 'google/composer/property/projectlocationenvironment_config_database_config'
require 'google/composer/property/projectlocationenvironment_config_encryption_config'
require 'google/composer/property/projectlocationenvironment_config_maintenance_window'
require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config'
require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks'
require 'google/composer/property/projectlocationenvironment_config_node_config'
require 'google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy'
require 'google/composer/property/projectlocationenvironment_config_private_environment_config'
require 'google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config'
require 'google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config'
require 'google/composer/property/projectlocationenvironment_config_recovery_config'
require 'google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config'
require 'google/composer/property/projectlocationenvironment_config_software_config'
require 'google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides'
require 'google/composer/property/projectlocationenvironment_config_software_config_env_variables'
require 'google/composer/property/projectlocationenvironment_config_software_config_pypi_packages'
require 'google/composer/property/projectlocationenvironment_config_web_server_config'
require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control'
require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges'
require 'google/composer/property/projectlocationenvironment_config_workloads_config'
require 'google/composer/property/projectlocationenvironment_config_workloads_config_scheduler'
require 'google/composer/property/projectlocationenvironment_config_workloads_config_triggerer'
require 'google/composer/property/projectlocationenvironment_config_workloads_config_web_server'
require 'google/composer/property/projectlocationenvironment_config_workloads_config_worker'
module GoogleInSpec
module Composer
module Property
class ProjectLocationEnvironmentConfig
attr_reader :gke_cluster

attr_reader :dag_gcs_prefix

attr_reader :node_count

attr_reader :software_config

attr_reader :node_config

attr_reader :private_environment_config

attr_reader :web_server_network_access_control

attr_reader :database_config

attr_reader :web_server_config

attr_reader :encryption_config

attr_reader :maintenance_window

attr_reader :workloads_config

attr_reader :environment_size

attr_reader :airflow_uri

attr_reader :airflow_byoid_uri

attr_reader :master_authorized_networks_config

attr_reader :recovery_config

attr_reader :resilience_mode

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@gke_cluster = args['gkeCluster']
@dag_gcs_prefix = args['dagGcsPrefix']
@node_count = args['nodeCount']
@software_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfig.new(args['softwareConfig'], to_s)
@node_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigNodeConfig.new(args['nodeConfig'], to_s)
@private_environment_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigPrivateEnvironmentConfig.new(args['privateEnvironmentConfig'], to_s)
@web_server_network_access_control = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerNetworkAccessControl.new(args['webServerNetworkAccessControl'], to_s)
@database_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigDatabaseConfig.new(args['databaseConfig'], to_s)
@web_server_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerConfig.new(args['webServerConfig'], to_s)
@encryption_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigEncryptionConfig.new(args['encryptionConfig'], to_s)
@maintenance_window = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMaintenanceWindow.new(args['maintenanceWindow'], to_s)
@workloads_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfig.new(args['workloadsConfig'], to_s)
@environment_size = args['environmentSize']
@airflow_uri = args['airflowUri']
@airflow_byoid_uri = args['airflowByoidUri']
@master_authorized_networks_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig.new(args['masterAuthorizedNetworksConfig'], to_s)
@recovery_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigRecoveryConfig.new(args['recoveryConfig'], to_s)
@resilience_mode = args['resilienceMode']
end

def to_s
"#{@parent_identifier} ProjectLocationEnvironmentConfig"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
module Composer
module Property
class ProjectLocationEnvironmentConfigDatabaseConfig
attr_reader :machine_type

attr_reader :zone

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@machine_type = args['machineType']
@zone = args['zone']
end

def to_s
"#{@parent_identifier} ProjectLocationEnvironmentConfigDatabaseConfig"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
module Composer
module Property
class ProjectLocationEnvironmentConfigEncryptionConfig
attr_reader :kms_key_name

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@kms_key_name = args['kmsKeyName']
end

def to_s
"#{@parent_identifier} ProjectLocationEnvironmentConfigEncryptionConfig"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
module Composer
module Property
class ProjectLocationEnvironmentConfigMaintenanceWindow
attr_reader :start_time

attr_reader :end_time

attr_reader :recurrence

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@start_time = args['startTime']
@end_time = args['endTime']
@recurrence = args['recurrence']
end

def to_s
"#{@parent_identifier} ProjectLocationEnvironmentConfigMaintenanceWindow"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks'
module GoogleInSpec
module Composer
module Property
class ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig
attr_reader :enabled

attr_reader :cidr_blocks

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@enabled = args['enabled']
@cidr_blocks = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocksArray.parse(args['cidrBlocks'], to_s)
end

def to_s
"#{@parent_identifier} ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig"
end
end
end
end
end
Loading

0 comments on commit 4e0d496

Please sign in to comment.