这是indexloc提供的服务,不要输入任何密码
Skip to content

Storage Insights Datasets terraform support #14564

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

Merged
merged 15 commits into from
Jul 24, 2025

Conversation

sameer-google
Copy link
Contributor

@sameer-google sameer-google commented Jul 18, 2025

Adding terraform support for Storage Insights Datasets.

`google_storage_insights_dataset_config`

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 9 files changed, 2617 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 9 files changed, 2617 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 391 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

Missing doc report (experimental)

The following data sources are missing documents:

  • google_storage_insights_dataset_config, expect file /website/docs/d/storage_insights_dataset_config.html.markdown to exist.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 10
Passed tests: 3
Skipped tests: 0
Affected tests: 7

Click here to see the affected service packages
  • storageinsights
#### Action taken
Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_folder_to_org
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_folder_to_project
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_org_to_folder
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_org_to_project
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_project_to_folder
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_project_to_org

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_folder_to_org [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_folder_to_project [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_org_to_folder [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_org_to_project [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_project_to_folder [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_project_to_org [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 9 files changed, 2617 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 9 files changed, 2617 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 391 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

Missing doc report (experimental)

The following data sources are missing documents:

  • google_storage_insights_dataset_config, expect file /website/docs/d/storage_insights_dataset_config.html.markdown to exist.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 10
Passed tests: 10
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • storageinsights
🟢 All tests passed!

View the build log

@sameer-google sameer-google marked this pull request as ready for review July 21, 2025 07:00
@github-actions github-actions bot requested a review from shuyama1 July 21, 2025 07:01
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@shuyama1, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@sameer-google sameer-google changed the title Storage Insights Datasets initial terraform support Storage Insights Datasets terraform support Jul 21, 2025
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 9 files changed, 2624 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 9 files changed, 2624 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 391 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

Missing doc report (experimental)

The following data sources are missing documents:

  • google_storage_insights_dataset_config, expect file /website/docs/d/storage_insights_dataset_config.html.markdown to exist.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 10
Passed tests: 10
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • storageinsights
🟢 All tests passed!

View the build log

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add the corresponding documentation for the data source? Thanks! https://googlecloudplatform.github.io/magic-modules/develop/add-handwritten-datasource/#add-documentation

@sameer-google
Copy link
Contributor Author

Could you please add the corresponding documentation for the data source? Thanks! https://googlecloudplatform.github.io/magic-modules/develop/add-handwritten-datasource/#add-documentation

Done, thank you

@sameer-google sameer-google requested a review from shuyama1 July 22, 2025 05:42
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 10 files changed, 2674 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 10 files changed, 2674 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 391 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 10
Passed tests: 10
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • storageinsights
🟢 All tests passed!

View the build log

Copy link
Member

@kautikdk kautikdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend creating a GitHub issue in the Public Issue tracker here: https://github.com/hashicorp/terraform-provider-google/issues for the reference so that someone else won't start working on the same resource as long as it is assigned to you.

Another suggestion would be to follow the update test guidelines mentioned here: https://googlecloudplatform.github.io/magic-modules/test/test/#add-an-update-test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 10 files changed, 2651 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 10 files changed, 2651 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 391 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 112 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_storage_insights_dataset_config (13 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_storage_insights_dataset_config" "primary" {
  organization_number = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 10
Passed tests: 3
Skipped tests: 0
Affected tests: 7

Click here to see the affected service packages
  • storageinsights
#### Action taken
Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_folder_to_org
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_folder_to_project
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_org_to_folder
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_org_to_project
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_project_to_folder
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_project_to_org

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_folder_to_org [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_folder_to_project [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_org_to_folder [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_org_to_project [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_project_to_folder [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample_update_project_to_org [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 10 files changed, 2661 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 10 files changed, 2661 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 391 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 112 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_storage_insights_dataset_config (13 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_storage_insights_dataset_config" "primary" {
  organization_number = # value needed
}

Copy link
Member

@kautikdk kautikdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me!
Will approve once we get clarity on the project field from the offline discussion.

@kautikdk
Copy link
Member

Hi @shuyama1, can you please start review as the feature is planned for release in the next week if possible?

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 10 files changed, 2642 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 10 files changed, 2642 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 391 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 112 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 7
Passed tests: 7
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • storageinsights
🟢 All tests passed!

View the build log

@shuyama1
Copy link
Member

/gcbrun

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 10 files changed, 2642 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 10 files changed, 2642 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 391 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 112 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_storage_insights_dataset_config (8 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_storage_insights_dataset_config" "primary" {
  description = # value needed
  exclude_cloud_storage_buckets {
    cloud_storage_buckets {
      bucket_name         = # value needed
      bucket_prefix_regex = # value needed
    }
  }
  exclude_cloud_storage_locations {
    locations = # value needed
  }
  include_cloud_storage_buckets {
    cloud_storage_buckets {
      bucket_name         = # value needed
      bucket_prefix_regex = # value needed
    }
  }
  include_cloud_storage_locations {
    locations = # value needed
  }
  include_newly_created_buckets = # value needed
  link_dataset                  = # value needed
  organization_number           = # value needed
}

@modular-magician
Copy link
Collaborator

Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccStorageInsightsDatasetConfigExample_update_scope
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExample

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • storageinsights
🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

@github-actions github-actions bot requested a review from shuyama1 July 24, 2025 07:01
@sameer-google
Copy link
Contributor Author

@shuyama1 , @kautikdk , addressed all the comments, you can proceed for review

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 10 files changed, 2740 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 10 files changed, 2740 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 391 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 247 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 8
Passed tests: 3
Skipped tests: 0
Affected tests: 5

Click here to see the affected service packages
  • storageinsights
#### Action taken
Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccStorageInsightsDatasetConfigExample_update_filters
  • TestAccStorageInsightsDatasetConfigExample_update_link
  • TestAccStorageInsightsDatasetConfigExample_update_scope
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExcludesExample
  • TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigIncludesExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccStorageInsightsDatasetConfigExample_update_filters [Debug log]
TestAccStorageInsightsDatasetConfigExample_update_link [Debug log]
TestAccStorageInsightsDatasetConfigExample_update_scope [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigExcludesExample [Debug log]
TestAccStorageInsightsDatasetConfig_storageInsightsDatasetConfigIncludesExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 2632 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 8 files changed, 2632 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 391 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 247 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 8
Passed tests: 8
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • storageinsights
🟢 All tests passed!

View the build log

@sameer-google
Copy link
Contributor Author

/gcbrun

Copy link
Member

@kautikdk kautikdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as all the comments have been addressed and project field concern is now resolved.

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants