Skip to content

Commit

Permalink
Merge pull request #631 from inspec/CHEF-12244-MAGIC-MODULE-dataproc_…
Browse files Browse the repository at this point in the history
…v1-Projects__locations__workflowTemplate

CHEF-12244-MAGIC-MODULE-Dataproc Workflow Template - Resource Implementation
  • Loading branch information
balasubramanian-s authored Jun 20, 2024
2 parents 0ed7864 + cfc2033 commit 19bf33d
Show file tree
Hide file tree
Showing 135 changed files with 6,894 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ The following resources are available in the InSpec GCP Profile
| [google_container_server_config](docs/resources/google_container_server_config.md) | No Plural Resource |
| [google_dataflow_project_location_job](docs/resources/google_dataflow_project_location_job.md) | [google_dataflow_project_location_jobs](docs/resources/google_dataflow_project_location_jobs.md) |
| [google_dataproc_cluster](docs/resources/google_dataproc_cluster.md) | [google_dataproc_clusters](docs/resources/google_dataproc_clusters.md) |
| [google_dataproc_workflow_template](docs/resources/google_dataproc_workflow_template.md) | [google_dataproc_workflow_templates](docs/resources/google_dataproc_workflow_templates.md) |
| [google_dns_managed_zone](docs/resources/google_dns_managed_zone.md) | [google_dns_managed_zones](docs/resources/google_dns_managed_zones.md) |
| [google_dns_resource_record_set](docs/resources/google_dns_resource_record_set.md) | [google_dns_resource_record_sets](docs/resources/google_dns_resource_record_sets.md) |
| [google_dlp_dt](docs/resources/google_dlp_dt.md) | [google_dlp_dts](docs/resources/google_dlp_dts.md)
Expand Down
867 changes: 867 additions & 0 deletions docs/resources/google_dataproc_workflow_template.md

Large diffs are not rendered by default.

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

## Syntax
A `google_dataproc_workflow_templates` is used to test a Google WorkflowTemplates resource

## Examples
```
describe google_dataproc_workflow_templates(parent: 'value_parent') do
it { should exist }
its('ids') { should include 'value_id' }
its('names') { should include 'value_name' }
its('create_times') { should include 'value_createtime' }
its('update_times') { should include 'value_updatetime' }
its('dag_timeouts') { should include 'value_dagtimeout' }
end
```
## Parameters
* `parent`: The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{projectId}/regions/{region}
For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{projectId}/locations/{location}

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

See [google_dataproc_project_location_workflow_template.md](google_dataproc_project_location_workflow_template.md) for more detailed information
* `ids`: an array of `google_dataproc_project_location_workflow_template` id
* `names`: an array of `google_dataproc_project_location_workflow_template` name
* `versions`: an array of `google_dataproc_project_location_workflow_template` version
* `create_times`: an array of `google_dataproc_project_location_workflow_template` create_time
* `update_times`: an array of `google_dataproc_project_location_workflow_template` update_time
* `labels`: an array of `google_dataproc_project_location_workflow_template` labels
* `placements`: an array of `google_dataproc_project_location_workflow_template` placement
* `jobs`: an array of `google_dataproc_project_location_workflow_template` jobs
* `parameters`: an array of `google_dataproc_project_location_workflow_template` parameters
* `dag_timeouts`: an array of `google_dataproc_project_location_workflow_template` dag_timeout
* `encryption_configs`: an array of `google_dataproc_project_location_workflow_template` encryption_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 [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_labels'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_accelerators'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_disk_config'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_flexibility_policy'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_references'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_managed_group_config'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_startup_config'
module GoogleInSpec
module Dataproc
module Property
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroup
attr_reader :name

attr_reader :roles

attr_reader :node_group_config

attr_reader :labels

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@name = args['name']
@roles = args['roles']
@node_group_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfig.new(args['nodeGroupConfig'], to_s)
@labels = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupLabels.new(args['labels'], to_s)
end

def to_s
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroup"
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 Dataproc
module Property
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupLabels
attr_reader :additional_properties

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

def to_s
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupLabels"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# 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/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_accelerators'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_disk_config'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_flexibility_policy'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_references'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_managed_group_config'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_startup_config'
module GoogleInSpec
module Dataproc
module Property
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfig
attr_reader :num_instances

attr_reader :instance_names

attr_reader :instance_references

attr_reader :image_uri

attr_reader :machine_type_uri

attr_reader :disk_config

attr_reader :is_preemptible

attr_reader :preemptibility

attr_reader :managed_group_config

attr_reader :accelerators

attr_reader :min_cpu_platform

attr_reader :min_num_instances

attr_reader :instance_flexibility_policy

attr_reader :startup_config

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@num_instances = args['numInstances']
@instance_names = args['instanceNames']
@instance_references = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceReferencesArray.parse(args['instanceReferences'], to_s)
@image_uri = args['imageUri']
@machine_type_uri = args['machineTypeUri']
@disk_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigDiskConfig.new(args['diskConfig'], to_s)
@is_preemptible = args['isPreemptible']
@preemptibility = args['preemptibility']
@managed_group_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s)
@accelerators = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAcceleratorsArray.parse(args['accelerators'], to_s)
@min_cpu_platform = args['minCpuPlatform']
@min_num_instances = args['minNumInstances']
@instance_flexibility_policy = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicy.new(args['instanceFlexibilityPolicy'], to_s)
@startup_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigStartupConfig.new(args['startupConfig'], to_s)
end

def to_s
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfig"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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 Dataproc
module Property
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators
attr_reader :accelerator_type_uri

attr_reader :accelerator_count

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@accelerator_type_uri = args['acceleratorTypeUri']
@accelerator_count = args['acceleratorCount']
end

def to_s
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators"
end
end

class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAcceleratorsArray
def self.parse(value, parent_identifier)
return if value.nil?
return WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array)
value.map { |v| WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators.new(v, parent_identifier) }
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 Dataproc
module Property
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigDiskConfig
attr_reader :boot_disk_type

attr_reader :boot_disk_size_gb

attr_reader :num_local_ssds

attr_reader :local_ssd_interface

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@boot_disk_type = args['bootDiskType']
@boot_disk_size_gb = args['bootDiskSizeGb']
@num_local_ssds = args['numLocalSsds']
@local_ssd_interface = args['localSsdInterface']
end

def to_s
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigDiskConfig"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list'
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results'
module GoogleInSpec
module Dataproc
module Property
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicy
attr_reader :instance_selection_list

attr_reader :instance_selection_results

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@instance_selection_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionListArray.parse(args['instanceSelectionList'], to_s)
@instance_selection_results = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicyInstanceSelectionResultsArray.parse(args['instanceSelectionResults'], to_s)
end

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

0 comments on commit 19bf33d

Please sign in to comment.