-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Acceptance Testing Framework for_each Resource Support (unexpected index type (string)) #536
Comments
I'm not going to lie, I'm not entirely sure why this doesn't work right now. In theory, it should--the test framework shouldn't care about for_each at all, it should never even see it. Terraform should just handle it. I have a sneaking suspicion there's a deeper problem here or the SDK has trouble handling the output of for_each or something. But we're going to need to do a bit more digging to figure out what's going on here, because you definitely shouldn't be getting apply errors from configs that standalone Terraform can apply; after all, the whole point of the new test driver is that standalone Terraform is applying them. |
Any update on this issue? I would also like to add tests for resources using |
There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536
) * Add `eventFilters` in cloudfunctions2 API definition * Remove trailing whitespace * Start adding cloudfunctions2 eventarc acceptance test that uses GCS * Add missing IAM bindings to prevent API errors during `FullGcsExample` acceptance test * Make `eventTrigger.pubsubTopic` default from the API to handle topics made by Eventarc * Update field description for `attribute` - info to learn more about possible values * Remove unneeded attribute from `google_storage_bucket_object` * Add API service enabling to new project in test, fix provider used to make project * Fix inbuilt function call in acceptance test * Add explicit dependencies to try make API calls happen after the API is turned on * Remove generated acceptance test and add handwritten test with 2 stages * Remove `depends_on` attributes from example config * Fix bug in test's TF config, make project ID and name the same * Replace use of `for_each` in acceptance test There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536 * Add `run.googleapis.com` to project * Change `disable_dependent_services` to `false` for eventarc API in acceptance tests Change example config to match, too * Enable `artifactregistry.googleapis.com` in acceptance test & example * Add missing IAM binding to cloud function service account - `roles/artifactregistry.reader` Odd that this is needed, as it wasn't required when I created a similar cloud function in an existing GCP project (where APIs were already activated etc) * Add explicit dependency between cloud function resource and IAM bindings for its service account Address "Unable to retrieve the repository metadata" error that suggests service account doesn't have permissions in place * Enable `cloudbuild.googleapis.com` API in acceptance test and example * Enable `pubsub.googleapis.com` API in acceptance test and example * Fix test so step 1 of test enables all the APIs * Replace zipped cloud function code with zip made by `archive_file` Terraform resource * Add repo-level IAM binding (in addition to project level) using inferred repo ID * Fix missing quotation mark in test :( * Split project into 3 stages and remove repo-specific IAM binding This is after running the test locally and it succeeding in 3 steps but not in 2 steps * Fix problem where TF couldn't delete resources at end of test Couldn't delete the cloud function because the API had been disabled * Update test to get project ID from ENV instead of project created by the test Update test and example block with needed variables Remove handwritten test * Fix API spec to make required fields required * Update event_filter fields' descriptions for clarity * Change GCS event_filter test to basic as it can't use all fields * Add example test that shows the operator field in use * Fix whitespace * Add test for updating `event_filters` blocks * Reuse generated cloudfunction2 test functions in handwritten test Make code homogenous between the two tests to faciliatate this
…278) * Add `eventFilters` in cloudfunctions2 API definition * Remove trailing whitespace * Start adding cloudfunctions2 eventarc acceptance test that uses GCS * Add missing IAM bindings to prevent API errors during `FullGcsExample` acceptance test * Make `eventTrigger.pubsubTopic` default from the API to handle topics made by Eventarc * Update field description for `attribute` - info to learn more about possible values * Remove unneeded attribute from `google_storage_bucket_object` * Add API service enabling to new project in test, fix provider used to make project * Fix inbuilt function call in acceptance test * Add explicit dependencies to try make API calls happen after the API is turned on * Remove generated acceptance test and add handwritten test with 2 stages * Remove `depends_on` attributes from example config * Fix bug in test's TF config, make project ID and name the same * Replace use of `for_each` in acceptance test There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536 * Add `run.googleapis.com` to project * Change `disable_dependent_services` to `false` for eventarc API in acceptance tests Change example config to match, too * Enable `artifactregistry.googleapis.com` in acceptance test & example * Add missing IAM binding to cloud function service account - `roles/artifactregistry.reader` Odd that this is needed, as it wasn't required when I created a similar cloud function in an existing GCP project (where APIs were already activated etc) * Add explicit dependency between cloud function resource and IAM bindings for its service account Address "Unable to retrieve the repository metadata" error that suggests service account doesn't have permissions in place * Enable `cloudbuild.googleapis.com` API in acceptance test and example * Enable `pubsub.googleapis.com` API in acceptance test and example * Fix test so step 1 of test enables all the APIs * Replace zipped cloud function code with zip made by `archive_file` Terraform resource * Add repo-level IAM binding (in addition to project level) using inferred repo ID * Fix missing quotation mark in test :( * Split project into 3 stages and remove repo-specific IAM binding This is after running the test locally and it succeeding in 3 steps but not in 2 steps * Fix problem where TF couldn't delete resources at end of test Couldn't delete the cloud function because the API had been disabled * Update test to get project ID from ENV instead of project created by the test Update test and example block with needed variables Remove handwritten test * Fix API spec to make required fields required * Update event_filter fields' descriptions for clarity * Change GCS event_filter test to basic as it can't use all fields * Add example test that shows the operator field in use * Fix whitespace * Add test for updating `event_filters` blocks * Reuse generated cloudfunction2 test functions in handwritten test Make code homogenous between the two tests to faciliatate this Signed-off-by: Modular Magician <[email protected]>
…278) (#114) * Add `eventFilters` in cloudfunctions2 API definition * Remove trailing whitespace * Start adding cloudfunctions2 eventarc acceptance test that uses GCS * Add missing IAM bindings to prevent API errors during `FullGcsExample` acceptance test * Make `eventTrigger.pubsubTopic` default from the API to handle topics made by Eventarc * Update field description for `attribute` - info to learn more about possible values * Remove unneeded attribute from `google_storage_bucket_object` * Add API service enabling to new project in test, fix provider used to make project * Fix inbuilt function call in acceptance test * Add explicit dependencies to try make API calls happen after the API is turned on * Remove generated acceptance test and add handwritten test with 2 stages * Remove `depends_on` attributes from example config * Fix bug in test's TF config, make project ID and name the same * Replace use of `for_each` in acceptance test There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536 * Add `run.googleapis.com` to project * Change `disable_dependent_services` to `false` for eventarc API in acceptance tests Change example config to match, too * Enable `artifactregistry.googleapis.com` in acceptance test & example * Add missing IAM binding to cloud function service account - `roles/artifactregistry.reader` Odd that this is needed, as it wasn't required when I created a similar cloud function in an existing GCP project (where APIs were already activated etc) * Add explicit dependency between cloud function resource and IAM bindings for its service account Address "Unable to retrieve the repository metadata" error that suggests service account doesn't have permissions in place * Enable `cloudbuild.googleapis.com` API in acceptance test and example * Enable `pubsub.googleapis.com` API in acceptance test and example * Fix test so step 1 of test enables all the APIs * Replace zipped cloud function code with zip made by `archive_file` Terraform resource * Add repo-level IAM binding (in addition to project level) using inferred repo ID * Fix missing quotation mark in test :( * Split project into 3 stages and remove repo-specific IAM binding This is after running the test locally and it succeeding in 3 steps but not in 2 steps * Fix problem where TF couldn't delete resources at end of test Couldn't delete the cloud function because the API had been disabled * Update test to get project ID from ENV instead of project created by the test Update test and example block with needed variables Remove handwritten test * Fix API spec to make required fields required * Update event_filter fields' descriptions for clarity * Change GCS event_filter test to basic as it can't use all fields * Add example test that shows the operator field in use * Fix whitespace * Add test for updating `event_filters` blocks * Reuse generated cloudfunction2 test functions in handwritten test Make code homogenous between the two tests to faciliatate this Signed-off-by: Modular Magician <[email protected]>
…shicorp#6278) * Add `eventFilters` in cloudfunctions2 API definition * Remove trailing whitespace * Start adding cloudfunctions2 eventarc acceptance test that uses GCS * Add missing IAM bindings to prevent API errors during `FullGcsExample` acceptance test * Make `eventTrigger.pubsubTopic` default from the API to handle topics made by Eventarc * Update field description for `attribute` - info to learn more about possible values * Remove unneeded attribute from `google_storage_bucket_object` * Add API service enabling to new project in test, fix provider used to make project * Fix inbuilt function call in acceptance test * Add explicit dependencies to try make API calls happen after the API is turned on * Remove generated acceptance test and add handwritten test with 2 stages * Remove `depends_on` attributes from example config * Fix bug in test's TF config, make project ID and name the same * Replace use of `for_each` in acceptance test There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536 * Add `run.googleapis.com` to project * Change `disable_dependent_services` to `false` for eventarc API in acceptance tests Change example config to match, too * Enable `artifactregistry.googleapis.com` in acceptance test & example * Add missing IAM binding to cloud function service account - `roles/artifactregistry.reader` Odd that this is needed, as it wasn't required when I created a similar cloud function in an existing GCP project (where APIs were already activated etc) * Add explicit dependency between cloud function resource and IAM bindings for its service account Address "Unable to retrieve the repository metadata" error that suggests service account doesn't have permissions in place * Enable `cloudbuild.googleapis.com` API in acceptance test and example * Enable `pubsub.googleapis.com` API in acceptance test and example * Fix test so step 1 of test enables all the APIs * Replace zipped cloud function code with zip made by `archive_file` Terraform resource * Add repo-level IAM binding (in addition to project level) using inferred repo ID * Fix missing quotation mark in test :( * Split project into 3 stages and remove repo-specific IAM binding This is after running the test locally and it succeeding in 3 steps but not in 2 steps * Fix problem where TF couldn't delete resources at end of test Couldn't delete the cloud function because the API had been disabled * Update test to get project ID from ENV instead of project created by the test Update test and example block with needed variables Remove handwritten test * Fix API spec to make required fields required * Update event_filter fields' descriptions for clarity * Change GCS event_filter test to basic as it can't use all fields * Add example test that shows the operator field in use * Fix whitespace * Add test for updating `event_filters` blocks * Reuse generated cloudfunction2 test functions in handwritten test Make code homogenous between the two tests to faciliatate this Signed-off-by: Modular Magician <[email protected]>
) (#4547) * Add `eventFilters` in cloudfunctions2 API definition * Remove trailing whitespace * Start adding cloudfunctions2 eventarc acceptance test that uses GCS * Add missing IAM bindings to prevent API errors during `FullGcsExample` acceptance test * Make `eventTrigger.pubsubTopic` default from the API to handle topics made by Eventarc * Update field description for `attribute` - info to learn more about possible values * Remove unneeded attribute from `google_storage_bucket_object` * Add API service enabling to new project in test, fix provider used to make project * Fix inbuilt function call in acceptance test * Add explicit dependencies to try make API calls happen after the API is turned on * Remove generated acceptance test and add handwritten test with 2 stages * Remove `depends_on` attributes from example config * Fix bug in test's TF config, make project ID and name the same * Replace use of `for_each` in acceptance test There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536 * Add `run.googleapis.com` to project * Change `disable_dependent_services` to `false` for eventarc API in acceptance tests Change example config to match, too * Enable `artifactregistry.googleapis.com` in acceptance test & example * Add missing IAM binding to cloud function service account - `roles/artifactregistry.reader` Odd that this is needed, as it wasn't required when I created a similar cloud function in an existing GCP project (where APIs were already activated etc) * Add explicit dependency between cloud function resource and IAM bindings for its service account Address "Unable to retrieve the repository metadata" error that suggests service account doesn't have permissions in place * Enable `cloudbuild.googleapis.com` API in acceptance test and example * Enable `pubsub.googleapis.com` API in acceptance test and example * Fix test so step 1 of test enables all the APIs * Replace zipped cloud function code with zip made by `archive_file` Terraform resource * Add repo-level IAM binding (in addition to project level) using inferred repo ID * Fix missing quotation mark in test :( * Split project into 3 stages and remove repo-specific IAM binding This is after running the test locally and it succeeding in 3 steps but not in 2 steps * Fix problem where TF couldn't delete resources at end of test Couldn't delete the cloud function because the API had been disabled * Update test to get project ID from ENV instead of project created by the test Update test and example block with needed variables Remove handwritten test * Fix API spec to make required fields required * Update event_filter fields' descriptions for clarity * Change GCS event_filter test to basic as it can't use all fields * Add example test that shows the operator field in use * Fix whitespace * Add test for updating `event_filters` blocks * Reuse generated cloudfunction2 test functions in handwritten test Make code homogenous between the two tests to faciliatate this Signed-off-by: Modular Magician <[email protected]>
…shicorp#6278) * Add `eventFilters` in cloudfunctions2 API definition * Remove trailing whitespace * Start adding cloudfunctions2 eventarc acceptance test that uses GCS * Add missing IAM bindings to prevent API errors during `FullGcsExample` acceptance test * Make `eventTrigger.pubsubTopic` default from the API to handle topics made by Eventarc * Update field description for `attribute` - info to learn more about possible values * Remove unneeded attribute from `google_storage_bucket_object` * Add API service enabling to new project in test, fix provider used to make project * Fix inbuilt function call in acceptance test * Add explicit dependencies to try make API calls happen after the API is turned on * Remove generated acceptance test and add handwritten test with 2 stages * Remove `depends_on` attributes from example config * Fix bug in test's TF config, make project ID and name the same * Replace use of `for_each` in acceptance test There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536 * Add `run.googleapis.com` to project * Change `disable_dependent_services` to `false` for eventarc API in acceptance tests Change example config to match, too * Enable `artifactregistry.googleapis.com` in acceptance test & example * Add missing IAM binding to cloud function service account - `roles/artifactregistry.reader` Odd that this is needed, as it wasn't required when I created a similar cloud function in an existing GCP project (where APIs were already activated etc) * Add explicit dependency between cloud function resource and IAM bindings for its service account Address "Unable to retrieve the repository metadata" error that suggests service account doesn't have permissions in place * Enable `cloudbuild.googleapis.com` API in acceptance test and example * Enable `pubsub.googleapis.com` API in acceptance test and example * Fix test so step 1 of test enables all the APIs * Replace zipped cloud function code with zip made by `archive_file` Terraform resource * Add repo-level IAM binding (in addition to project level) using inferred repo ID * Fix missing quotation mark in test :( * Split project into 3 stages and remove repo-specific IAM binding This is after running the test locally and it succeeding in 3 steps but not in 2 steps * Fix problem where TF couldn't delete resources at end of test Couldn't delete the cloud function because the API had been disabled * Update test to get project ID from ENV instead of project created by the test Update test and example block with needed variables Remove handwritten test * Fix API spec to make required fields required * Update event_filter fields' descriptions for clarity * Change GCS event_filter test to basic as it can't use all fields * Add example test that shows the operator field in use * Fix whitespace * Add test for updating `event_filters` blocks * Reuse generated cloudfunction2 test functions in handwritten test Make code homogenous between the two tests to faciliatate this Signed-off-by: Modular Magician <[email protected]>
) (#12222) * Add `eventFilters` in cloudfunctions2 API definition * Remove trailing whitespace * Start adding cloudfunctions2 eventarc acceptance test that uses GCS * Add missing IAM bindings to prevent API errors during `FullGcsExample` acceptance test * Make `eventTrigger.pubsubTopic` default from the API to handle topics made by Eventarc * Update field description for `attribute` - info to learn more about possible values * Remove unneeded attribute from `google_storage_bucket_object` * Add API service enabling to new project in test, fix provider used to make project * Fix inbuilt function call in acceptance test * Add explicit dependencies to try make API calls happen after the API is turned on * Remove generated acceptance test and add handwritten test with 2 stages * Remove `depends_on` attributes from example config * Fix bug in test's TF config, make project ID and name the same * Replace use of `for_each` in acceptance test There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536 * Add `run.googleapis.com` to project * Change `disable_dependent_services` to `false` for eventarc API in acceptance tests Change example config to match, too * Enable `artifactregistry.googleapis.com` in acceptance test & example * Add missing IAM binding to cloud function service account - `roles/artifactregistry.reader` Odd that this is needed, as it wasn't required when I created a similar cloud function in an existing GCP project (where APIs were already activated etc) * Add explicit dependency between cloud function resource and IAM bindings for its service account Address "Unable to retrieve the repository metadata" error that suggests service account doesn't have permissions in place * Enable `cloudbuild.googleapis.com` API in acceptance test and example * Enable `pubsub.googleapis.com` API in acceptance test and example * Fix test so step 1 of test enables all the APIs * Replace zipped cloud function code with zip made by `archive_file` Terraform resource * Add repo-level IAM binding (in addition to project level) using inferred repo ID * Fix missing quotation mark in test :( * Split project into 3 stages and remove repo-specific IAM binding This is after running the test locally and it succeeding in 3 steps but not in 2 steps * Fix problem where TF couldn't delete resources at end of test Couldn't delete the cloud function because the API had been disabled * Update test to get project ID from ENV instead of project created by the test Update test and example block with needed variables Remove handwritten test * Fix API spec to make required fields required * Update event_filter fields' descriptions for clarity * Change GCS event_filter test to basic as it can't use all fields * Add example test that shows the operator field in use * Fix whitespace * Add test for updating `event_filters` blocks * Reuse generated cloudfunction2 test functions in handwritten test Make code homogenous between the two tests to faciliatate this Signed-off-by: Modular Magician <[email protected]>
…278) * Add `eventFilters` in cloudfunctions2 API definition * Remove trailing whitespace * Start adding cloudfunctions2 eventarc acceptance test that uses GCS * Add missing IAM bindings to prevent API errors during `FullGcsExample` acceptance test * Make `eventTrigger.pubsubTopic` default from the API to handle topics made by Eventarc * Update field description for `attribute` - info to learn more about possible values * Remove unneeded attribute from `google_storage_bucket_object` * Add API service enabling to new project in test, fix provider used to make project * Fix inbuilt function call in acceptance test * Add explicit dependencies to try make API calls happen after the API is turned on * Remove generated acceptance test and add handwritten test with 2 stages * Remove `depends_on` attributes from example config * Fix bug in test's TF config, make project ID and name the same * Replace use of `for_each` in acceptance test There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536 * Add `run.googleapis.com` to project * Change `disable_dependent_services` to `false` for eventarc API in acceptance tests Change example config to match, too * Enable `artifactregistry.googleapis.com` in acceptance test & example * Add missing IAM binding to cloud function service account - `roles/artifactregistry.reader` Odd that this is needed, as it wasn't required when I created a similar cloud function in an existing GCP project (where APIs were already activated etc) * Add explicit dependency between cloud function resource and IAM bindings for its service account Address "Unable to retrieve the repository metadata" error that suggests service account doesn't have permissions in place * Enable `cloudbuild.googleapis.com` API in acceptance test and example * Enable `pubsub.googleapis.com` API in acceptance test and example * Fix test so step 1 of test enables all the APIs * Replace zipped cloud function code with zip made by `archive_file` Terraform resource * Add repo-level IAM binding (in addition to project level) using inferred repo ID * Fix missing quotation mark in test :( * Split project into 3 stages and remove repo-specific IAM binding This is after running the test locally and it succeeding in 3 steps but not in 2 steps * Fix problem where TF couldn't delete resources at end of test Couldn't delete the cloud function because the API had been disabled * Update test to get project ID from ENV instead of project created by the test Update test and example block with needed variables Remove handwritten test * Fix API spec to make required fields required * Update event_filter fields' descriptions for clarity * Change GCS event_filter test to basic as it can't use all fields * Add example test that shows the operator field in use * Fix whitespace * Add test for updating `event_filters` blocks * Reuse generated cloudfunction2 test functions in handwritten test Make code homogenous between the two tests to faciliatate this Signed-off-by: Modular Magician <[email protected]>
…278) (#887) * Add `eventFilters` in cloudfunctions2 API definition * Remove trailing whitespace * Start adding cloudfunctions2 eventarc acceptance test that uses GCS * Add missing IAM bindings to prevent API errors during `FullGcsExample` acceptance test * Make `eventTrigger.pubsubTopic` default from the API to handle topics made by Eventarc * Update field description for `attribute` - info to learn more about possible values * Remove unneeded attribute from `google_storage_bucket_object` * Add API service enabling to new project in test, fix provider used to make project * Fix inbuilt function call in acceptance test * Add explicit dependencies to try make API calls happen after the API is turned on * Remove generated acceptance test and add handwritten test with 2 stages * Remove `depends_on` attributes from example config * Fix bug in test's TF config, make project ID and name the same * Replace use of `for_each` in acceptance test There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536 * Add `run.googleapis.com` to project * Change `disable_dependent_services` to `false` for eventarc API in acceptance tests Change example config to match, too * Enable `artifactregistry.googleapis.com` in acceptance test & example * Add missing IAM binding to cloud function service account - `roles/artifactregistry.reader` Odd that this is needed, as it wasn't required when I created a similar cloud function in an existing GCP project (where APIs were already activated etc) * Add explicit dependency between cloud function resource and IAM bindings for its service account Address "Unable to retrieve the repository metadata" error that suggests service account doesn't have permissions in place * Enable `cloudbuild.googleapis.com` API in acceptance test and example * Enable `pubsub.googleapis.com` API in acceptance test and example * Fix test so step 1 of test enables all the APIs * Replace zipped cloud function code with zip made by `archive_file` Terraform resource * Add repo-level IAM binding (in addition to project level) using inferred repo ID * Fix missing quotation mark in test :( * Split project into 3 stages and remove repo-specific IAM binding This is after running the test locally and it succeeding in 3 steps but not in 2 steps * Fix problem where TF couldn't delete resources at end of test Couldn't delete the cloud function because the API had been disabled * Update test to get project ID from ENV instead of project created by the test Update test and example block with needed variables Remove handwritten test * Fix API spec to make required fields required * Update event_filter fields' descriptions for clarity * Change GCS event_filter test to basic as it can't use all fields * Add example test that shows the operator field in use * Fix whitespace * Add test for updating `event_filters` blocks * Reuse generated cloudfunction2 test functions in handwritten test Make code homogenous between the two tests to faciliatate this Signed-off-by: Modular Magician <[email protected]>
…ogleCloudPlatform#6278) * Add `eventFilters` in cloudfunctions2 API definition * Remove trailing whitespace * Start adding cloudfunctions2 eventarc acceptance test that uses GCS * Add missing IAM bindings to prevent API errors during `FullGcsExample` acceptance test * Make `eventTrigger.pubsubTopic` default from the API to handle topics made by Eventarc * Update field description for `attribute` - info to learn more about possible values * Remove unneeded attribute from `google_storage_bucket_object` * Add API service enabling to new project in test, fix provider used to make project * Fix inbuilt function call in acceptance test * Add explicit dependencies to try make API calls happen after the API is turned on * Remove generated acceptance test and add handwritten test with 2 stages * Remove `depends_on` attributes from example config * Fix bug in test's TF config, make project ID and name the same * Replace use of `for_each` in acceptance test There is an open issue about how for_each loops don't work : hashicorp/terraform-plugin-sdk#536 * Add `run.googleapis.com` to project * Change `disable_dependent_services` to `false` for eventarc API in acceptance tests Change example config to match, too * Enable `artifactregistry.googleapis.com` in acceptance test & example * Add missing IAM binding to cloud function service account - `roles/artifactregistry.reader` Odd that this is needed, as it wasn't required when I created a similar cloud function in an existing GCP project (where APIs were already activated etc) * Add explicit dependency between cloud function resource and IAM bindings for its service account Address "Unable to retrieve the repository metadata" error that suggests service account doesn't have permissions in place * Enable `cloudbuild.googleapis.com` API in acceptance test and example * Enable `pubsub.googleapis.com` API in acceptance test and example * Fix test so step 1 of test enables all the APIs * Replace zipped cloud function code with zip made by `archive_file` Terraform resource * Add repo-level IAM binding (in addition to project level) using inferred repo ID * Fix missing quotation mark in test :( * Split project into 3 stages and remove repo-specific IAM binding This is after running the test locally and it succeeding in 3 steps but not in 2 steps * Fix problem where TF couldn't delete resources at end of test Couldn't delete the cloud function because the API had been disabled * Update test to get project ID from ENV instead of project created by the test Update test and example block with needed variables Remove handwritten test * Fix API spec to make required fields required * Update event_filter fields' descriptions for clarity * Change GCS event_filter test to basic as it can't use all fields * Add example test that shows the operator field in use * Fix whitespace * Add test for updating `event_filters` blocks * Reuse generated cloudfunction2 test functions in handwritten test Make code homogenous between the two tests to faciliatate this
SDK version
Use-cases
For parity with real world Terraform configurations, we would like to utilize resource
for_each
support in acceptance testing configurations for the Terraform AWS Provider, to automatically validate documented configuration practices.Essentially, we would like to enable the commented configuration below, which matches our resource and examples documentation.
https://github.com/terraform-providers/terraform-provider-aws/blob/d104477b8209c4829d1d9601ca3cac7e5cf1cdd5/aws/resource_aws_acm_certificate_validation_test.go#L202-L245
Attempted Solutions
The acceptance testing framework currently throws an error when applying a test configuration with
for_each
usage:Since test configuration workarounds are currently applied, any resources changes will require manual re-verification of certain functionality.
Proposal
Support
for_each
indexed resources in the acceptance test configurations, similar tocount
resources. In our case, we don't necessarily need all other testing functionality to supportfor_each
indexed resources (e.g.TestCheckFunc
), just the successful apply of the configuration would be great for our situation.References
The text was updated successfully, but these errors were encountered: