Skip to content

Commit

Permalink
storage
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Nov 21, 2023
1 parent 37b942f commit 3ca19cb
Show file tree
Hide file tree
Showing 17 changed files with 207 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/coverage/google.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# todo google

Resource percentage coverage 9.19
Datasource percentage coverage 29.96
Resource percentage coverage 10.22
Datasource percentage coverage 32.13

./resource.ps1 google_access_context_manager_access_level
./resource.ps1 google_access_context_manager_access_level_condition
Expand Down Expand Up @@ -130,7 +130,6 @@ Datasource percentage coverage 29.96
./resource.ps1 google_cloud_run_v2_job_iam_binding
./resource.ps1 google_cloud_run_v2_job_iam_member
./resource.ps1 google_cloud_run_v2_job_iam_policy

./resource.ps1 google_cloud_run_v2_service_iam_binding
./resource.ps1 google_cloud_run_v2_service_iam_member
./resource.ps1 google_cloud_run_v2_service_iam_policy
Expand Down Expand Up @@ -323,6 +322,9 @@ Datasource percentage coverage 29.96
./resource.ps1 google_dataflow_flex_template_job
./resource.ps1 google_dataflow_job
./resource.ps1 google_dataform_repository
./resource.ps1 google_dataform_repository_iam_binding
./resource.ps1 google_dataform_repository_iam_member
./resource.ps1 google_dataform_repository_iam_policy
./resource.ps1 google_dataform_repository_release_config
./resource.ps1 google_dataform_repository_workflow_config
./resource.ps1 google_dataplex_asset
Expand Down Expand Up @@ -558,6 +560,7 @@ Datasource percentage coverage 29.96
./resource.ps1 google_logging_project_sink
./resource.ps1 google_looker_instance
./resource.ps1 google_memcache_instance
./resource.ps1 google_migration_center_group
./resource.ps1 google_ml_engine_model
./resource.ps1 google_monitoring_alert_policy
./resource.ps1 google_monitoring_custom_service
Expand Down Expand Up @@ -681,6 +684,10 @@ Datasource percentage coverage 29.96
./resource.ps1 google_spanner_instance_iam_policy
./resource.ps1 google_sql_source_representation_instance
./resource.ps1 google_sql_ssl_cert
./resource.ps1 google_storage_notification
./resource.ps1 google_storage_object_acl
./resource.ps1 google_storage_transfer_agent_pool
./resource.ps1 google_storage_transfer_job
./resource.ps1 google_tags_location_tag_binding
./resource.ps1 google_tags_tag_binding
./resource.ps1 google_tags_tag_key
Expand All @@ -695,6 +702,9 @@ Datasource percentage coverage 29.96
./resource.ps1 google_tpu_v2_vm
./resource.ps1 google_vertex_ai_dataset
./resource.ps1 google_vertex_ai_endpoint
./resource.ps1 google_vertex_ai_endpoint_iam_binding
./resource.ps1 google_vertex_ai_endpoint_iam_member
./resource.ps1 google_vertex_ai_endpoint_iam_policy
./resource.ps1 google_vertex_ai_featurestore
./resource.ps1 google_vertex_ai_featurestore_entitytype
./resource.ps1 google_vertex_ai_featurestore_entitytype_feature
Expand Down Expand Up @@ -722,6 +732,11 @@ Datasource percentage coverage 29.96
./resource.ps1 google_workstations_workstation_iam_binding
./resource.ps1 google_workstations_workstation_iam_member
./resource.ps1 google_workstations_workstation_iam_policy
./resource.ps1 google_access_approval_folder_service_account -type data
./resource.ps1 google_access_approval_organization_service_account -type data
./resource.ps1 google_access_approval_project_service_account -type data
./resource.ps1 google_access_context_manager_access_policy_iam_policy -type data
./resource.ps1 google_active_folder -type data
./resource.ps1 google_bigquery_dataset -type data
./resource.ps1 google_billing_account -type data
./resource.ps1 google_billing_account_iam_policy -type data
Expand Down Expand Up @@ -800,6 +815,7 @@ Datasource percentage coverage 29.96
./resource.ps1 google_data_catalog_tag_template_iam_policy -type data
./resource.ps1 google_data_catalog_taxonomy_iam_policy -type data
./resource.ps1 google_data_fusion_instance_iam_policy -type data
./resource.ps1 google_dataform_repository_iam_policy -type data
./resource.ps1 google_dataplex_asset_iam_policy -type data
./resource.ps1 google_dataplex_datascan_iam_policy -type data
./resource.ps1 google_dataplex_lake_iam_policy -type data
Expand Down Expand Up @@ -878,6 +894,7 @@ Datasource percentage coverage 29.96
./resource.ps1 google_tpu_tensorflow_versions -type data
./resource.ps1 google_tpu_v2_accelerator_types -type data
./resource.ps1 google_tpu_v2_runtime_versions -type data
./resource.ps1 google_vertex_ai_endpoint_iam_policy -type data
./resource.ps1 google_vmwareengine_cluster -type data
./resource.ps1 google_vmwareengine_network -type data
./resource.ps1 google_vmwareengine_private_cloud -type data
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [
"storage.buckets.get",
"storage.buckets.update"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [
"storage.buckets.getIamPolicy",
"storage.buckets.setIamPolicy"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [
"storage.buckets.getIamPolicy",
"storage.buckets.setIamPolicy"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [
"storage.buckets.get",
"storage.buckets.update"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [
"storage.buckets.get",
"storage.buckets.update"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
20 changes: 20 additions & 0 deletions src/mapping/google/resource/storage/google_storage_hmac_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"apply": [
"storage.hmacKeys.create",
"storage.hmacKeys.get",
"storage.hmacKeys.update",
"storage.hmacKeys.delete"
],
"attributes": {
"tags": []
},
"destroy": [
"storage.hmacKeys.delete"
],
"modify": [
"storage.hmacKeys.update"
],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"apply": [
"storageinsights.reportConfigs.create"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"apply": [
"storage.objects.update",
"storage.objects.get",
"storage.objects.getIamPolicy",
"storage.objects.setIamPolicy"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "google_storage_bucket_access_control" "pike" {
bucket = "pike-example"
role = "READER"
entity = "user:crwoolfenden@gmail.com"
}
5 changes: 5 additions & 0 deletions terraform/google/backup/google_storage_bucket_iam_member.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "google_storage_bucket_iam_member" "pike" {
bucket = "pike-example"
role = "roles/storage.admin"
member = "user:crwoolfenden@gmail.com"
}
19 changes: 19 additions & 0 deletions terraform/google/backup/google_storage_bucket_iam_policy.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
data "google_iam_policy" "admin" {
binding {
role = "roles/storage.admin"
members = [
"user:crwoolfenden@gmail.com",
]

condition {
title = "expires_after_2019_12_31"
description = "Expiring at midnight of 2019-12-31"
expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")"
}
}
}

resource "google_storage_bucket_iam_policy" "policy" {
bucket = "pike-example"
policy_data = data.google_iam_policy.admin.policy_data
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "google_storage_default_object_access_control" "pike" {
bucket = "pike-example"
role = "READER"
entity = "user:crwoolfenden@gmail.com"
}
3 changes: 3 additions & 0 deletions terraform/google/backup/google_storage_default_object_acl.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "google_storage_default_object_acl" "pike" {
bucket = "pike-example"
}
3 changes: 3 additions & 0 deletions terraform/google/backup/google_storage_hmac_key.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "google_storage_hmac_key" "pike" {
service_account_email = "pike-service@pike-gcp.iam.gserviceaccount.com"
}
22 changes: 22 additions & 0 deletions terraform/google/backup/google_storage_insights_report_config.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
resource "google_storage_insights_report_config" "pike" {
display_name = "Test Report Config"
location = "us-central1"
frequency_options {
frequency = "WEEKLY"
start_date {
day = 15
month = 3
year = 2050
}
end_date {
day = 15
month = 4
year = 2050
}
}
csv_options {
record_separator = "\n"
delimiter = ","
header_required = false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
resource "google_storage_object_access_control" "pike" {
object = "results.txt"
bucket = "pike-example"
role = "READER"
entity = "allUsers"
}

0 comments on commit 3ca19cb

Please sign in to comment.