-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #546 from inspec/CHEF-7364-MAGIC-MODULE-composer-P…
…rojects__locations__environment CHEF-7364-MAGIC-MODULE-composer-Projects__locations__environment - Resource Implementation
- Loading branch information
Showing
37 changed files
with
1,817 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
265 changes: 265 additions & 0 deletions
265
docs/resources/google_composer_project_location_environment.md
Large diffs are not rendered by default.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
docs/resources/google_composer_project_location_environments.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
109 changes: 109 additions & 0 deletions
109
libraries/google/composer/property/projectlocationenvironment_config.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
37 changes: 37 additions & 0 deletions
37
libraries/google/composer/property/projectlocationenvironment_config_database_config.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
34 changes: 34 additions & 0 deletions
34
libraries/google/composer/property/projectlocationenvironment_config_encryption_config.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
40 changes: 40 additions & 0 deletions
40
libraries/google/composer/property/projectlocationenvironment_config_maintenance_window.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
38 changes: 38 additions & 0 deletions
38
.../composer/property/projectlocationenvironment_config_master_authorized_networks_config.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.