From aeae95a6cd91403acd0357396e9eb5d7397a5af2 Mon Sep 17 00:00:00 2001 From: Samir Anand Date: Thu, 30 Nov 2023 00:18:52 +0530 Subject: [PATCH 1/7] Automatically generated by magic modules for service: apigee and resource: Organizations__envgroup. This commit includes the following changes: - Singular Resource - Plural Resource - Documentation updates - Terraform configuration - Integration tests Signed-off-by: Samir Anand --- .../google_apigee_organization_envgroup.md | 48 ++++++++++ .../google_apigee_organization_envgroups.md | 32 +++++++ .../google_apigee_organization_envgroup.rb | 63 ++++++++++++++ .../google_apigee_organization_envgroups.rb | 87 +++++++++++++++++++ .../google_apigee_organization_envgroup.rb | 42 +++++++++ .../google_apigee_organization_envgroups.rb | 33 +++++++ 6 files changed, 305 insertions(+) create mode 100644 docs/resources/google_apigee_organization_envgroup.md create mode 100644 docs/resources/google_apigee_organization_envgroups.md create mode 100644 libraries/google_apigee_organization_envgroup.rb create mode 100644 libraries/google_apigee_organization_envgroups.rb create mode 100644 test/integration/verify/controls/google_apigee_organization_envgroup.rb create mode 100644 test/integration/verify/controls/google_apigee_organization_envgroups.rb diff --git a/docs/resources/google_apigee_organization_envgroup.md b/docs/resources/google_apigee_organization_envgroup.md new file mode 100644 index 000000000..a75f8c069 --- /dev/null +++ b/docs/resources/google_apigee_organization_envgroup.md @@ -0,0 +1,48 @@ +--- +title: About the google_apigee_organization_envgroup resource +platform: gcp +--- + +## Syntax +A `google_apigee_organization_envgroup` is used to test a Google OrganizationEnvgroup resource + +## Examples +``` +describe google_apigee_organization_envgroup(name: ' value_name') do + it { should exist } + its('name') { should cmp 'value_name' } + its('last_modified_at') { should cmp 'value_lastmodifiedat' } + its('state') { should cmp 'value_state' } + its('created_at') { should cmp 'value_createdat' } + +end + +describe google_apigee_organization_envgroup(name: "does_not_exit") do + it { should_not exist } +end +``` + +## Properties +Properties that can be accessed from the `google_apigee_organization_envgroup` resource: + + + * `name`: ID of the environment group. + + * `last_modified_at`: Output only. The time at which the environment group was last updated as milliseconds since epoch. + + * `hostnames`: Required. Host names for this environment group. + + * `state`: Output only. State of the environment group. Values other than ACTIVE means the resource is not ready to use. + Possible values: + * STATE_UNSPECIFIED + * CREATING + * ACTIVE + * DELETING + * UPDATING + + * `created_at`: Output only. The time at which the environment group was created as milliseconds since epoch. + + +## GCP Permissions + +Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. diff --git a/docs/resources/google_apigee_organization_envgroups.md b/docs/resources/google_apigee_organization_envgroups.md new file mode 100644 index 000000000..2b49d2e3c --- /dev/null +++ b/docs/resources/google_apigee_organization_envgroups.md @@ -0,0 +1,32 @@ +--- +title: About the google_apigee_organization_envgroups resource +platform: gcp +--- + +## Syntax +A `google_apigee_organization_envgroups` is used to test a Google OrganizationEnvgroup resource + +## Examples +``` + describe google_apigee_organization_envgroups(parent: ' value_parent') do + it { should exist } + end +``` + +## Properties +Properties that can be accessed from the `google_apigee_organization_envgroups` resource: + +See [google_apigee_organization_envgroup.md](google_apigee_organization_envgroup.md) for more detailed information + * `names`: an array of `google_apigee_organization_envgroup` name + * `last_modified_ats`: an array of `google_apigee_organization_envgroup` last_modified_at + * `hostnames`: an array of `google_apigee_organization_envgroup` hostnames + * `states`: an array of `google_apigee_organization_envgroup` state + * `created_ats`: an array of `google_apigee_organization_envgroup` created_at + +## 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 [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project. diff --git a/libraries/google_apigee_organization_envgroup.rb b/libraries/google_apigee_organization_envgroup.rb new file mode 100644 index 000000000..14daa871a --- /dev/null +++ b/libraries/google_apigee_organization_envgroup.rb @@ -0,0 +1,63 @@ +# 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 'gcp_backend' + +# A provider to manage Apigee resources. +class ApigeeOrganizationEnvgroup < GcpResourceBase + name 'google_apigee_organization_envgroup' + desc 'OrganizationEnvgroup' + supports platform: 'gcp' + + attr_reader :params + attr_reader :name + attr_reader :last_modified_at + attr_reader :hostnames + attr_reader :state + attr_reader :created_at + + def initialize(params) + super(params.merge({ use_http_transport: true })) + @params = params + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + parse unless @fetched.nil? + end + + def parse + @name = @fetched['name'] + @last_modified_at = @fetched['lastModifiedAt'] + @hostnames = @fetched['hostnames'] + @state = @fetched['state'] + @created_at = @fetched['createdAt'] + end + + def exists? + !@fetched.nil? + end + + def to_s + "OrganizationEnvgroup #{@params[:name]}" + end + + private + + def product_url(_ = nil) + 'https://apigee.googleapis.com/v1/' + end + + def resource_base_url + '{{name}}' + end +end diff --git a/libraries/google_apigee_organization_envgroups.rb b/libraries/google_apigee_organization_envgroups.rb new file mode 100644 index 000000000..dddaa87e2 --- /dev/null +++ b/libraries/google_apigee_organization_envgroups.rb @@ -0,0 +1,87 @@ +# 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 'gcp_backend' +class ApigeeOrganizationEnvgroups < GcpResourceBase + name 'google_apigee_organization_envgroups' + desc 'OrganizationEnvgroup plural resource' + supports platform: 'gcp' + + attr_reader :table + + filter_table_config = FilterTable.create + + filter_table_config.add(:names, field: :name) + filter_table_config.add(:last_modified_ats, field: :last_modified_at) + filter_table_config.add(:hostnames, field: :hostnames) + filter_table_config.add(:states, field: :state) + filter_table_config.add(:created_ats, field: :created_at) + + filter_table_config.connect(self, :table) + + def initialize(params = {}) + super(params.merge({ use_http_transport: true })) + @params = params + @table = fetch_wrapped_resource('organizationEnvgroups') + end + + def fetch_wrapped_resource(wrap_path) + # fetch_resource returns an array of responses (to handle pagination) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + return if result.nil? + + # Conversion of string -> object hash to symbol -> object hash that InSpec needs + converted = [] + result.each do |response| + next if response.nil? || !response.key?(wrap_path) + response[wrap_path].each do |hash| + hash_with_symbols = {} + hash.each_key do |key| + name, value = transform(key, hash) + hash_with_symbols[name] = value + end + converted.push(hash_with_symbols) + end + end + + converted + end + + def transform(key, value) + return transformers[key].call(value) if transformers.key?(key) + + [key.to_sym, value] + end + + def transformers + { + 'name' => ->(obj) { return :name, obj['name'] }, + 'lastModifiedAt' => ->(obj) { return :last_modified_at, obj['lastModifiedAt'] }, + 'hostnames' => ->(obj) { return :hostnames, obj['hostnames'] }, + 'state' => ->(obj) { return :state, obj['state'] }, + 'createdAt' => ->(obj) { return :created_at, obj['createdAt'] }, + } + end + + private + + def product_url(_ = nil) + 'https://apigee.googleapis.com/v1/' + end + + def resource_base_url + '{{parent}}/envgroups' + end +end diff --git a/test/integration/verify/controls/google_apigee_organization_envgroup.rb b/test/integration/verify/controls/google_apigee_organization_envgroup.rb new file mode 100644 index 000000000..8c29be8d4 --- /dev/null +++ b/test/integration/verify/controls/google_apigee_organization_envgroup.rb @@ -0,0 +1,42 @@ +# ---------------------------------------------------------------------------- +# +# *** 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. +# +# ---------------------------------------------------------------------------- + +title 'Test GCP google_apigee_organization_envgroup resource.' + +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') + + organization_envgroup = input('organization_envgroup', value: { + "name": "value_name", + "parent": "value_parent", + "last_modified_at": "value_lastmodifiedat", + "state": "value_state", + "created_at": "value_createdat" +}, description: 'organization_envgroup description') +control 'google_apigee_organization_envgroup-1.0' do + impact 1.0 + title 'google_apigee_organization_envgroup resource test' + + describe google_apigee_organization_envgroup(name: organization_envgroup['name']) do + it { should exist } + its('name') { should cmp organization_envgroup['name'] } + its('last_modified_at') { should cmp organization_envgroup['last_modified_at'] } + its('state') { should cmp organization_envgroup['state'] } + its('created_at') { should cmp organization_envgroup['created_at'] } + + end + + describe google_apigee_organization_envgroup(name: "does_not_exit") do + it { should_not exist } + end +end diff --git a/test/integration/verify/controls/google_apigee_organization_envgroups.rb b/test/integration/verify/controls/google_apigee_organization_envgroups.rb new file mode 100644 index 000000000..aff936176 --- /dev/null +++ b/test/integration/verify/controls/google_apigee_organization_envgroups.rb @@ -0,0 +1,33 @@ +# ---------------------------------------------------------------------------- +# +# *** 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. +# +# ---------------------------------------------------------------------------- + +title 'Test GCP google_apigee_organization_envgroups resource.' + +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') + + organization_envgroup = input('organization_envgroup', value: { + "name": "value_name", + "parent": "value_parent", + "last_modified_at": "value_lastmodifiedat", + "state": "value_state", + "created_at": "value_createdat" +}, description: 'organization_envgroup description') +control 'google_apigee_organization_envgroups-1.0' do + impact 1.0 + title 'google_apigee_organization_envgroups resource test' + + describe google_apigee_organization_envgroups(parent: organization_envgroup['parent']) do + it { should exist } + end +end From 7c18743ab5ba1991e56b7cacc2d6c2610119f328 Mon Sep 17 00:00:00 2001 From: Vasu1105 Date: Mon, 4 Dec 2023 17:15:55 +0530 Subject: [PATCH 2/7] Updates plural resource to use correct key to fetch the data from list API Signed-off-by: Vasu1105 --- libraries/google_apigee_organization_envgroups.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/google_apigee_organization_envgroups.rb b/libraries/google_apigee_organization_envgroups.rb index dddaa87e2..ef5427a59 100644 --- a/libraries/google_apigee_organization_envgroups.rb +++ b/libraries/google_apigee_organization_envgroups.rb @@ -34,7 +34,7 @@ class ApigeeOrganizationEnvgroups < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('organizationEnvgroups') + @table = fetch_wrapped_resource('environmentGroups') end def fetch_wrapped_resource(wrap_path) From 7cf32c80b32cdd7c44e7f3876598e33ab9644636 Mon Sep 17 00:00:00 2001 From: Vasu1105 Date: Mon, 4 Dec 2023 17:16:54 +0530 Subject: [PATCH 3/7] Updates test for apigee organization envgroup plural and singular resource Signed-off-by: Vasu1105 --- .../google_apigee_organization_envgroup.rb | 19 ++++++------- .../google_apigee_organization_envgroups.rb | 28 +++++++++++-------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/test/integration/verify/controls/google_apigee_organization_envgroup.rb b/test/integration/verify/controls/google_apigee_organization_envgroup.rb index 8c29be8d4..a78983a52 100644 --- a/test/integration/verify/controls/google_apigee_organization_envgroup.rb +++ b/test/integration/verify/controls/google_apigee_organization_envgroup.rb @@ -14,26 +14,23 @@ title 'Test GCP google_apigee_organization_envgroup resource.' -gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') - - organization_envgroup = input('organization_envgroup', value: { - "name": "value_name", - "parent": "value_parent", - "last_modified_at": "value_lastmodifiedat", - "state": "value_state", - "created_at": "value_createdat" +organization_envgroup = input('organization_envgroup', value: { + "name": "test-env-group", + "parent": "organizations/ppradhan/envgroups", + "hostname": "34.95.97.227.nip.io", + "state": "ACTIVE", + "created_at": "1698227493454" }, description: 'organization_envgroup description') control 'google_apigee_organization_envgroup-1.0' do impact 1.0 title 'google_apigee_organization_envgroup resource test' - describe google_apigee_organization_envgroup(name: organization_envgroup['name']) do + describe google_apigee_organization_envgroup(name: "#{organization_envgroup['parent']}/#{organization_envgroup['name']}") do it { should exist } its('name') { should cmp organization_envgroup['name'] } - its('last_modified_at') { should cmp organization_envgroup['last_modified_at'] } + its('hostnames') { should include organization_envgroup['hostname'] } its('state') { should cmp organization_envgroup['state'] } its('created_at') { should cmp organization_envgroup['created_at'] } - end describe google_apigee_organization_envgroup(name: "does_not_exit") do diff --git a/test/integration/verify/controls/google_apigee_organization_envgroups.rb b/test/integration/verify/controls/google_apigee_organization_envgroups.rb index aff936176..aeef059a4 100644 --- a/test/integration/verify/controls/google_apigee_organization_envgroups.rb +++ b/test/integration/verify/controls/google_apigee_organization_envgroups.rb @@ -14,20 +14,26 @@ title 'Test GCP google_apigee_organization_envgroups resource.' -gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') +organization_envgroup = input("organization_envgroup", value: { + "name": "test-env-group", + "parent": "organizations/ppradhan", + "hostname": "34.95.97.227.nip.io", + "state": "ACTIVE" +}, description: "organization_envgroup description") - organization_envgroup = input('organization_envgroup', value: { - "name": "value_name", - "parent": "value_parent", - "last_modified_at": "value_lastmodifiedat", - "state": "value_state", - "created_at": "value_createdat" -}, description: 'organization_envgroup description') control 'google_apigee_organization_envgroups-1.0' do impact 1.0 title 'google_apigee_organization_envgroups resource test' - describe google_apigee_organization_envgroups(parent: organization_envgroup['parent']) do - it { should exist } - end + describe google_apigee_organization_envgroups(parent: organization_envgroup["parent"]) do + it { should exist } + its("names") { should include organization_envgroup["name"] } + end + + describe google_apigee_organization_envgroups(parent: organization_envgroup["parent"]).where(name: organization_envgroup["name"]) do + it { should exist } + its("names") { should include organization_envgroup["name"] } + its("hostnames") { should include [organization_envgroup["hostname"]] } + its("states") { should include organization_envgroup["state"] } + end end From a924f4f9e55265691c38af4529002c9de3061605 Mon Sep 17 00:00:00 2001 From: Vasu1105 Date: Mon, 4 Dec 2023 17:17:40 +0530 Subject: [PATCH 4/7] Updates docs for the apigee orgnaization envgroup singular and plural resource Signed-off-by: Vasu1105 --- .../google_apigee_organization_envgroup.md | 28 ++++++++++--------- .../google_apigee_organization_envgroups.md | 6 +++- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/docs/resources/google_apigee_organization_envgroup.md b/docs/resources/google_apigee_organization_envgroup.md index a75f8c069..2b756d08d 100644 --- a/docs/resources/google_apigee_organization_envgroup.md +++ b/docs/resources/google_apigee_organization_envgroup.md @@ -4,35 +4,38 @@ platform: gcp --- ## Syntax + A `google_apigee_organization_envgroup` is used to test a Google OrganizationEnvgroup resource ## Examples + ``` describe google_apigee_organization_envgroup(name: ' value_name') do - it { should exist } - its('name') { should cmp 'value_name' } - its('last_modified_at') { should cmp 'value_lastmodifiedat' } - its('state') { should cmp 'value_state' } - its('created_at') { should cmp 'value_createdat' } - + it { should exist } + its('name') { should cmp 'value_name' } + its('hostnames') { should include 'value_hostname' } + its('last_modified_at') { should cmp 'value_lastmodifiedat' } + its('state') { should cmp 'value_state' } + its('created_at') { should cmp 'value_createdat' } end describe google_apigee_organization_envgroup(name: "does_not_exit") do - it { should_not exist } + it { should_not exist } end ``` ## Properties -Properties that can be accessed from the `google_apigee_organization_envgroup` resource: +Properties that can be accessed from the `google_apigee_organization_envgroup` resource: * `name`: ID of the environment group. - * `last_modified_at`: Output only. The time at which the environment group was last updated as milliseconds since epoch. + * `last_modified_at`: The time at which the environment group was last updated as milliseconds since epoch. + + * `hostnames`: Host names for this environment group. - * `hostnames`: Required. Host names for this environment group. + * `state`: State of the environment group. Values other than ACTIVE means the resource is not ready to use. - * `state`: Output only. State of the environment group. Values other than ACTIVE means the resource is not ready to use. Possible values: * STATE_UNSPECIFIED * CREATING @@ -40,8 +43,7 @@ Properties that can be accessed from the `google_apigee_organization_envgroup` r * DELETING * UPDATING - * `created_at`: Output only. The time at which the environment group was created as milliseconds since epoch. - + * `created_at`: The time at which the environment group was created as milliseconds since epoch. ## GCP Permissions diff --git a/docs/resources/google_apigee_organization_envgroups.md b/docs/resources/google_apigee_organization_envgroups.md index 2b49d2e3c..f2d0fa097 100644 --- a/docs/resources/google_apigee_organization_envgroups.md +++ b/docs/resources/google_apigee_organization_envgroups.md @@ -4,16 +4,19 @@ platform: gcp --- ## Syntax + A `google_apigee_organization_envgroups` is used to test a Google OrganizationEnvgroup resource ## Examples + ``` - describe google_apigee_organization_envgroups(parent: ' value_parent') do + describe google_apigee_organization_envgroups(parent: 'value_parent') do it { should exist } end ``` ## Properties + Properties that can be accessed from the `google_apigee_organization_envgroups` resource: See [google_apigee_organization_envgroup.md](google_apigee_organization_envgroup.md) for more detailed information @@ -24,6 +27,7 @@ See [google_apigee_organization_envgroup.md](google_apigee_organization_envgroup * `created_ats`: an array of `google_apigee_organization_envgroup` created_at ## 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. From a16be62d85ce6554de7543392880ab0e1a132ed3 Mon Sep 17 00:00:00 2001 From: Vasu1105 Date: Wed, 6 Dec 2023 13:27:03 +0530 Subject: [PATCH 5/7] Updates README to add links for docs Signed-off-by: Vasu1105 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 825ddf82b..36b32a172 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,7 @@ The following resources are available in the InSpec GCP Profile | [google_access_context_manager_access_level](docs/resources/google_access_context_manager_access_level.md) | [google_access_context_manager_access_levels](docs/resources/google_access_context_manager_access_levels.md) | | [google_access_context_manager_access_policy](docs/resources/google_access_context_manager_access_policy.md) | [google_access_context_manager_access_policies](docs/resources/google_access_context_manager_access_policies.md) | | [google_access_context_manager_service_perimeter](docs/resources/google_access_context_manager_service_perimeter.md) | [google_access_context_manager_service_perimeters](docs/resources/google_access_context_manager_service_perimeters.md) | +| [google_apigeegoogle_apigee_organization_envgroup](docs/resources/google_apigee_organization_envgroup.md) | [google_apigee_organization_envgroups](docs/resources/google_apigee_organization_envgroups.md) | | [google_appengine_standard_app_version](docs/resources/google_appengine_standard_app_version.md) | [google_appengine_standard_app_versions](docs/resources/google_appengine_standard_app_versions.md) | | [google_bigquery_dataset](docs/resources/google_bigquery_dataset.md) | [google_bigquery_datasets](docs/resources/google_bigquery_datasets.md) | | [google_bigquery_table](docs/resources/google_bigquery_table.md) | [google_bigquery_tables](docs/resources/google_bigquery_tables.md) | From cd126935369d7e40884fee5d1fabab67878c67f9 Mon Sep 17 00:00:00 2001 From: Vasu1105 Date: Wed, 6 Dec 2023 15:28:54 +0530 Subject: [PATCH 6/7] Fix lint offense Signed-off-by: Vasu1105 --- libraries/google_apigee_organization_envgroups.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/google_apigee_organization_envgroups.rb b/libraries/google_apigee_organization_envgroups.rb index ef5427a59..7cdefa5f4 100644 --- a/libraries/google_apigee_organization_envgroups.rb +++ b/libraries/google_apigee_organization_envgroups.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'lastModifiedAt' => ->(obj) { return :last_modified_at, obj['lastModifiedAt'] }, - 'hostnames' => ->(obj) { return :hostnames, obj['hostnames'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'createdAt' => ->(obj) { return :created_at, obj['createdAt'] }, + 'name' => ->(obj) { [:name, obj['name']] }, + 'lastModifiedAt' => ->(obj) { [:last_modified_at, obj['lastModifiedAt']] }, + 'hostnames' => ->(obj) { [:hostnames, obj['hostnames']] }, + 'state' => ->(obj) { [:state, obj['state']] }, + 'createdAt' => ->(obj) { [:created_at, obj['createdAt']] }, } end From 4fdb20ee64057db1490f9832d849870b73c26f66 Mon Sep 17 00:00:00 2001 From: Vasu1105 Date: Wed, 6 Dec 2023 16:26:44 +0530 Subject: [PATCH 7/7] Updates terraform script Signed-off-by: Vasu1105 --- test/integration/build/gcp-mm.tf | 10 ++++++++++ test/integration/configuration/mm-attributes.yml | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/test/integration/build/gcp-mm.tf b/test/integration/build/gcp-mm.tf index 02e4b7abc..73b3777bf 100644 --- a/test/integration/build/gcp-mm.tf +++ b/test/integration/build/gcp-mm.tf @@ -220,6 +220,10 @@ variable "cloud_composer_v1" { type = any } +variable "organization_envgroup" { + type = any +} + resource "google_compute_ssl_policy" "custom-ssl-policy" { name = var.ssl_policy["name"] min_tls_version = var.ssl_policy["min_tls_version"] @@ -1565,3 +1569,9 @@ resource "google_composer_v1_environment" "test" { } } } + +resource "google_apigee_envgroup" "env_grp" { + name = var.organization_envgroup.name + hostnames = var.organization_envgroup.hostnames + org_id = var.organization_envgroup.project +} \ No newline at end of file diff --git a/test/integration/configuration/mm-attributes.yml b/test/integration/configuration/mm-attributes.yml index 37074e018..96bf86733 100644 --- a/test/integration/configuration/mm-attributes.yml +++ b/test/integration/configuration/mm-attributes.yml @@ -562,3 +562,11 @@ cloud_composer_v1: name : "example-composer-env" region : "us-central1" image_version : "composer-1.20.12-airflow-2.4.3" + +organization_envgroup: + project: "organizations/ppradhan" + name : "test-env-group" + hostnames: ["34.95.97.227.nip.io"] + parent : "organizations/ppradhan/envgroups" + state : "ACTIVE" + created_at : "1698227493454"