diff --git a/.github/workflows/transformations_gcp_compliance_postgres.yml b/.github/workflows/transformations_gcp_compliance_free_postgres.yml similarity index 67% rename from .github/workflows/transformations_gcp_compliance_postgres.yml rename to .github/workflows/transformations_gcp_compliance_free_postgres.yml index 71a0008d7..f4ea7cc30 100644 --- a/.github/workflows/transformations_gcp_compliance_postgres.yml +++ b/.github/workflows/transformations_gcp_compliance_free_postgres.yml @@ -1,24 +1,25 @@ -name: "Test GCP Compliance Policies: Postgres" +name: "Test GCP Compliance Free Policies: Postgres" on: pull_request: paths: - - "transformations/gcp_compliance/**" - - ".github/workflows/transformations_gcp_compliance_postgres.yml" + - "transformations/gcp/compliance-free/**" + - ".github/workflows/transformations_gcp_compliance_free_postgres.yml" push: branches: - main paths: - - "transformations/gcp_compliance/**" - - ".github/workflows/transformations_gcp_compliance_postgres.yml" + - "transformations/gcp/compliance-free/**" + - ".github/workflows/transformations_gcp_compliance_free_postgres.yml" jobs: - test-policies: + transformations-gcp-compliance-free: + name: transformations/gcp/compliance-free timeout-minutes: 30 runs-on: ubuntu-latest defaults: run: - working-directory: ./transformations/gcp_compliance + working-directory: ./transformations/gcp/compliance-free services: postgres: image: postgres:11 @@ -41,7 +42,7 @@ jobs: with: python-version: "3.9" cache: "pip" - cache-dependency-path: "./transformations/gcp_compliance/requirements.txt" + cache-dependency-path: "./transformations/gcp/compliance-free/requirements.txt" - name: Install dependencies run: pip install -r requirements.txt - name: Setup CloudQuery @@ -49,9 +50,9 @@ jobs: with: version: v4.0.0 - name: Migrate DB - run: cloudquery migrate tests/gcp.yml tests/pg.yml + run: cloudquery migrate tests/spec.yml env: - CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres + CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres - name: DBT dependencies run: | dbt deps --target dev-pg --profiles-dir ./tests diff --git a/.github/workflows/transformations_gcp_compliance_premium_postgres.yml b/.github/workflows/transformations_gcp_compliance_premium_postgres.yml new file mode 100644 index 000000000..6e935afc1 --- /dev/null +++ b/.github/workflows/transformations_gcp_compliance_premium_postgres.yml @@ -0,0 +1,61 @@ +name: "Test GCP Compliance Premium Policies: Postgres" + +on: + pull_request: + paths: + - "transformations/gcp/compliance-premium/**" + - ".github/workflows/transformations_gcp_compliance_premium_postgres.yml" + push: + branches: + - main + paths: + - "transformations/gcp/compliance-premium/**" + - ".github/workflows/transformations_gcp_compliance_premium_postgres.yml" + +jobs: + transformations-gcp-compliance-premium: + name: transformations/gcp/compliance-premium + timeout-minutes: 30 + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./transformations/gcp/compliance-premium + services: + postgres: + image: postgres:11 + env: + POSTGRES_PASSWORD: pass + POSTGRES_USER: postgres + POSTGRES_DB: postgres + ports: + - 5432:5432 + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: "3.9" + cache: "pip" + cache-dependency-path: "./transformations/gcp/compliance-premium/requirements.txt" + - name: Install dependencies + run: pip install -r requirements.txt + - name: Setup CloudQuery + uses: cloudquery/setup-cloudquery@v3 + with: + version: v4.0.0 + - name: Migrate DB + run: cloudquery migrate tests/spec.yml + env: + CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres + - name: DBT dependencies + run: | + dbt deps --target dev-pg --profiles-dir ./tests + - name: Run Policies + run: | + dbt run --target dev-pg --profiles-dir ./tests diff --git a/release-please-config-free.json b/release-please-config-free.json index 66cb21a49..c278c3e43 100644 --- a/release-please-config-free.json +++ b/release-please-config-free.json @@ -4,10 +4,6 @@ "component": "transformation-aws-compliance-free", "changelog-path": "CHANGELOG-free.md" }, - "transformations/gcp_compliance": { - "component": "transformation-gcp-compliance-free", - "changelog-path": "CHANGELOG-free.md" - }, "transformations/aws_data_resilience": { "component": "transformation-aws-data-resilience", "changelog-path": "CHANGELOG.md" diff --git a/release-please-config-premium.json b/release-please-config-premium.json index 887e94d64..c2b092b6d 100644 --- a/release-please-config-premium.json +++ b/release-please-config-premium.json @@ -3,10 +3,6 @@ "transformations/aws_compliance": { "component": "transformation-aws-compliance-premium", "changelog-path": "CHANGELOG-premium.md" - }, - "transformations/gcp_compliance": { - "component": "transformation-gcp-compliance-premium", - "changelog-path": "CHANGELOG-premium.md" } }, "pull-request-title-pattern": "chore${scope}: Release${component} v${version}", diff --git a/transformations/gcp_compliance/.gitignore b/transformations/gcp/compliance_free/.gitignore similarity index 100% rename from transformations/gcp_compliance/.gitignore rename to transformations/gcp/compliance_free/.gitignore diff --git a/transformations/gcp_compliance/CHANGELOG-free.md b/transformations/gcp/compliance_free/CHANGELOG.md similarity index 100% rename from transformations/gcp_compliance/CHANGELOG-free.md rename to transformations/gcp/compliance_free/CHANGELOG.md diff --git a/transformations/gcp_compliance/README-free.md b/transformations/gcp/compliance_free/README.md similarity index 100% rename from transformations/gcp_compliance/README-free.md rename to transformations/gcp/compliance_free/README.md diff --git a/transformations/gcp_compliance/analyses/.gitkeep b/transformations/gcp/compliance_free/analyses/.gitkeep similarity index 100% rename from transformations/gcp_compliance/analyses/.gitkeep rename to transformations/gcp/compliance_free/analyses/.gitkeep diff --git a/transformations/gcp_compliance/dbt_project.yml b/transformations/gcp/compliance_free/dbt_project.yml similarity index 94% rename from transformations/gcp_compliance/dbt_project.yml rename to transformations/gcp/compliance_free/dbt_project.yml index cb42d81b6..6a6ec4c9a 100644 --- a/transformations/gcp_compliance/dbt_project.yml +++ b/transformations/gcp/compliance_free/dbt_project.yml @@ -12,11 +12,11 @@ profile: 'gcp_compliance' # These configurations specify where dbt should look for different types of files. # The `model-paths` config, for example, states that models in this project can be # found in the "models/" directory. You probably won't need to change these! -model-paths: ["models"] +model-paths: ["models", "../models"] analysis-paths: ["analyses"] test-paths: ["tests"] seed-paths: ["seeds"] -macro-paths: ["macros"] +macro-paths: ["macros", "../macros"] snapshot-paths: ["snapshots"] clean-targets: # directories to be removed by `dbt clean` diff --git a/transformations/gcp_compliance/manifest-free.json b/transformations/gcp/compliance_free/manifest.json similarity index 91% rename from transformations/gcp_compliance/manifest-free.json rename to transformations/gcp/compliance_free/manifest.json index 2229da9ea..adaf240cc 100644 --- a/transformations/gcp_compliance/manifest-free.json +++ b/transformations/gcp/compliance_free/manifest.json @@ -6,7 +6,7 @@ "addon_type": "transformation", "addon_format": "zip", "message": "@./changelog.md", - "doc": "./README-free.md", + "doc": "./README.md", "path": "./build/gcp_compliance_free.zip", "plugin_deps": ["cloudquery/source/gcp@v9.9.1"], "addon_deps": [] diff --git a/transformations/gcp_compliance/models/free/gcp_compliance__cis_v1_2_0_free.sql b/transformations/gcp/compliance_free/models/gcp_compliance__cis_v1_2_0_free.sql similarity index 100% rename from transformations/gcp_compliance/models/free/gcp_compliance__cis_v1_2_0_free.sql rename to transformations/gcp/compliance_free/models/gcp_compliance__cis_v1_2_0_free.sql diff --git a/transformations/gcp_compliance/requirements.txt b/transformations/gcp/compliance_free/requirements.txt similarity index 100% rename from transformations/gcp_compliance/requirements.txt rename to transformations/gcp/compliance_free/requirements.txt diff --git a/transformations/gcp_compliance/seeds/.gitkeep b/transformations/gcp/compliance_free/seeds/.gitkeep similarity index 100% rename from transformations/gcp_compliance/seeds/.gitkeep rename to transformations/gcp/compliance_free/seeds/.gitkeep diff --git a/transformations/gcp_compliance/snapshots/.gitkeep b/transformations/gcp/compliance_free/snapshots/.gitkeep similarity index 100% rename from transformations/gcp_compliance/snapshots/.gitkeep rename to transformations/gcp/compliance_free/snapshots/.gitkeep diff --git a/transformations/gcp_compliance/tests/.gitkeep b/transformations/gcp/compliance_free/tests/.gitkeep similarity index 100% rename from transformations/gcp_compliance/tests/.gitkeep rename to transformations/gcp/compliance_free/tests/.gitkeep diff --git a/transformations/gcp_compliance/tests/profiles.yml b/transformations/gcp/compliance_free/tests/profiles.yml similarity index 100% rename from transformations/gcp_compliance/tests/profiles.yml rename to transformations/gcp/compliance_free/tests/profiles.yml diff --git a/transformations/gcp/compliance_free/tests/spec.yml b/transformations/gcp/compliance_free/tests/spec.yml new file mode 100644 index 000000000..afed5d504 --- /dev/null +++ b/transformations/gcp/compliance_free/tests/spec.yml @@ -0,0 +1,17 @@ +kind: source +spec: + name: gcp + path: cloudquery/gcp + version: "v10.0.0" # latest version of source gcp plugin + destinations: ["dest"] + tables: ["*"] +--- +kind: destination +spec: + name: "postgresql" + path: "cloudquery/postgresql" + registry: cloudquery + version: "v7.1.0" # latest version of postgresql plugin + spec: + batch_size: 10000 + connection_string: ${CQ_DSN} \ No newline at end of file diff --git a/transformations/gcp/compliance_premium/.gitignore b/transformations/gcp/compliance_premium/.gitignore new file mode 100644 index 000000000..49f147cb9 --- /dev/null +++ b/transformations/gcp/compliance_premium/.gitignore @@ -0,0 +1,4 @@ + +target/ +dbt_packages/ +logs/ diff --git a/transformations/gcp_compliance/CHANGELOG-premium.md b/transformations/gcp/compliance_premium/CHANGELOG.md similarity index 100% rename from transformations/gcp_compliance/CHANGELOG-premium.md rename to transformations/gcp/compliance_premium/CHANGELOG.md diff --git a/transformations/gcp_compliance/README-premium.md b/transformations/gcp/compliance_premium/README.md similarity index 100% rename from transformations/gcp_compliance/README-premium.md rename to transformations/gcp/compliance_premium/README.md diff --git a/transformations/gcp/compliance_premium/analyses/.gitkeep b/transformations/gcp/compliance_premium/analyses/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/transformations/gcp/compliance_premium/dbt_project.yml b/transformations/gcp/compliance_premium/dbt_project.yml new file mode 100644 index 000000000..6a6ec4c9a --- /dev/null +++ b/transformations/gcp/compliance_premium/dbt_project.yml @@ -0,0 +1,40 @@ + +# Name your project! Project names should contain only lowercase characters +# and underscores. A good package name should reflect your organization's +# name or the intended use of these models +name: 'gcp_compliance' +version: '1.0.0' +config-version: 2 + +# This setting configures which "profile" dbt uses for this project. +profile: 'gcp_compliance' + +# These configurations specify where dbt should look for different types of files. +# The `model-paths` config, for example, states that models in this project can be +# found in the "models/" directory. You probably won't need to change these! +model-paths: ["models", "../models"] +analysis-paths: ["analyses"] +test-paths: ["tests"] +seed-paths: ["seeds"] +macro-paths: ["macros", "../macros"] +snapshot-paths: ["snapshots"] + +clean-targets: # directories to be removed by `dbt clean` + - "target" + - "dbt_packages" + +# Configuring models +# Full documentation: https://docs.getdbt.com/docs/configuring-models + +# In this example config, we tell dbt to build all models in the example/ +# directory as views. These settings can be overridden in the individual model +# files using the `{{ config(...) }}` macro. +models: + gcp_compliance: + # Config indicated by + and applies to all files under models/example/ + # example: + # +materialized: view + + + + diff --git a/transformations/gcp_compliance/manifest-premium.json b/transformations/gcp/compliance_premium/manifest.json similarity index 91% rename from transformations/gcp_compliance/manifest-premium.json rename to transformations/gcp/compliance_premium/manifest.json index bbd07f76e..40d943ec0 100644 --- a/transformations/gcp_compliance/manifest-premium.json +++ b/transformations/gcp/compliance_premium/manifest.json @@ -6,7 +6,7 @@ "addon_type": "transformation", "addon_format": "zip", "message": "@./changelog.md", - "doc": "./README-premium.md", + "doc": "./README.md", "path": "./build/gcp_compliance_premium.zip", "plugin_deps": ["cloudquery/source/gcp@v9.9.1"], "addon_deps": [] diff --git a/transformations/gcp_compliance/models/pro/gcp_compliance__cis_v1_2_0.sql b/transformations/gcp/compliance_premium/models/gcp_compliance__cis_v1_2_0.sql similarity index 100% rename from transformations/gcp_compliance/models/pro/gcp_compliance__cis_v1_2_0.sql rename to transformations/gcp/compliance_premium/models/gcp_compliance__cis_v1_2_0.sql diff --git a/transformations/gcp/compliance_premium/requirements.txt b/transformations/gcp/compliance_premium/requirements.txt new file mode 100644 index 000000000..0f7b1a545 --- /dev/null +++ b/transformations/gcp/compliance_premium/requirements.txt @@ -0,0 +1 @@ +dbt-postgres==1.6.6 diff --git a/transformations/gcp/compliance_premium/seeds/.gitkeep b/transformations/gcp/compliance_premium/seeds/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/transformations/gcp/compliance_premium/snapshots/.gitkeep b/transformations/gcp/compliance_premium/snapshots/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/transformations/gcp/compliance_premium/tests/.gitkeep b/transformations/gcp/compliance_premium/tests/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/transformations/gcp/compliance_premium/tests/profiles.yml b/transformations/gcp/compliance_premium/tests/profiles.yml new file mode 100644 index 000000000..f99eaba7a --- /dev/null +++ b/transformations/gcp/compliance_premium/tests/profiles.yml @@ -0,0 +1,23 @@ +gcp_compliance: # This should match the name in your dbt_project.yml + target: dev + outputs: + dev-snowflake: + type: snowflake + account: "{{ env_var('SNOW_ACCOUNT') }}" + + # User/password auth + user: "{{ env_var('SNOW_USER') }}" + password: "{{ env_var('SNOW_PASSWORD') }}" + + database: "{{ env_var('SNOW_DATABASE') }}" + warehouse: "{{ env_var('SNOW_WAREHOUSE') }}" + schema: "{{ env_var('SNOW_SCHEMA') }}" + dev-pg: + type: postgres + host: 127.0.0.1 + user: postgres + pass: pass + port: 5432 + dbname: postgres + schema: public # default schema where dbt will build the models + threads: 1 # number of threads to use when running in parallel \ No newline at end of file diff --git a/transformations/gcp/compliance_premium/tests/spec.yml b/transformations/gcp/compliance_premium/tests/spec.yml new file mode 100644 index 000000000..afed5d504 --- /dev/null +++ b/transformations/gcp/compliance_premium/tests/spec.yml @@ -0,0 +1,17 @@ +kind: source +spec: + name: gcp + path: cloudquery/gcp + version: "v10.0.0" # latest version of source gcp plugin + destinations: ["dest"] + tables: ["*"] +--- +kind: destination +spec: + name: "postgresql" + path: "cloudquery/postgresql" + registry: cloudquery + version: "v7.1.0" # latest version of postgresql plugin + spec: + batch_size: 10000 + connection_string: ${CQ_DSN} \ No newline at end of file diff --git a/transformations/gcp_compliance/macros/pro/bigquery/datasets_publicly_accessible.sql b/transformations/gcp/macros/bigquery/datasets_publicly_accessible.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/bigquery/datasets_publicly_accessible.sql rename to transformations/gcp/macros/bigquery/datasets_publicly_accessible.sql diff --git a/transformations/gcp_compliance/macros/pro/bigquery/datasets_without_default_cmek.sql b/transformations/gcp/macros/bigquery/datasets_without_default_cmek.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/bigquery/datasets_without_default_cmek.sql rename to transformations/gcp/macros/bigquery/datasets_without_default_cmek.sql diff --git a/transformations/gcp_compliance/macros/pro/bigquery/tables_not_encrypted_with_cmek.sql b/transformations/gcp/macros/bigquery/tables_not_encrypted_with_cmek.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/bigquery/tables_not_encrypted_with_cmek.sql rename to transformations/gcp/macros/bigquery/tables_not_encrypted_with_cmek.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/allow_traffic_behind_iap.sql b/transformations/gcp/macros/compute/allow_traffic_behind_iap.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/allow_traffic_behind_iap.sql rename to transformations/gcp/macros/compute/allow_traffic_behind_iap.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/default_network_exist.sql b/transformations/gcp/macros/compute/default_network_exist.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/default_network_exist.sql rename to transformations/gcp/macros/compute/default_network_exist.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/disks_encrypted_with_csek.sql b/transformations/gcp/macros/compute/disks_encrypted_with_csek.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/disks_encrypted_with_csek.sql rename to transformations/gcp/macros/compute/disks_encrypted_with_csek.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/flow_logs_disabled_in_vpc.sql b/transformations/gcp/macros/compute/flow_logs_disabled_in_vpc.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/flow_logs_disabled_in_vpc.sql rename to transformations/gcp/macros/compute/flow_logs_disabled_in_vpc.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/instance_ip_forwarding_enabled.sql b/transformations/gcp/macros/compute/instance_ip_forwarding_enabled.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/instance_ip_forwarding_enabled.sql rename to transformations/gcp/macros/compute/instance_ip_forwarding_enabled.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/instances_with_default_service_account.sql b/transformations/gcp/macros/compute/instances_with_default_service_account.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/instances_with_default_service_account.sql rename to transformations/gcp/macros/compute/instances_with_default_service_account.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/instances_with_default_service_account_with_full_access.sql b/transformations/gcp/macros/compute/instances_with_default_service_account_with_full_access.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/instances_with_default_service_account_with_full_access.sql rename to transformations/gcp/macros/compute/instances_with_default_service_account_with_full_access.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/instances_with_public_ip.sql b/transformations/gcp/macros/compute/instances_with_public_ip.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/instances_with_public_ip.sql rename to transformations/gcp/macros/compute/instances_with_public_ip.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/instances_with_shielded_vm_disabled.sql b/transformations/gcp/macros/compute/instances_with_shielded_vm_disabled.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/instances_with_shielded_vm_disabled.sql rename to transformations/gcp/macros/compute/instances_with_shielded_vm_disabled.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/instances_without_block_project_wide_ssh_keys.sql b/transformations/gcp/macros/compute/instances_without_block_project_wide_ssh_keys.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/instances_without_block_project_wide_ssh_keys.sql rename to transformations/gcp/macros/compute/instances_without_block_project_wide_ssh_keys.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/instances_without_confidential_computing.sql b/transformations/gcp/macros/compute/instances_without_confidential_computing.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/instances_without_confidential_computing.sql rename to transformations/gcp/macros/compute/instances_without_confidential_computing.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/legacy_network_exist.sql b/transformations/gcp/macros/compute/legacy_network_exist.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/legacy_network_exist.sql rename to transformations/gcp/macros/compute/legacy_network_exist.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/oslogin_disabled.sql b/transformations/gcp/macros/compute/oslogin_disabled.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/oslogin_disabled.sql rename to transformations/gcp/macros/compute/oslogin_disabled.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/rdp_access_permitted.sql b/transformations/gcp/macros/compute/rdp_access_permitted.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/rdp_access_permitted.sql rename to transformations/gcp/macros/compute/rdp_access_permitted.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/serial_port_connection_enabled.sql b/transformations/gcp/macros/compute/serial_port_connection_enabled.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/serial_port_connection_enabled.sql rename to transformations/gcp/macros/compute/serial_port_connection_enabled.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/ssh_access_permitted.sql b/transformations/gcp/macros/compute/ssh_access_permitted.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/ssh_access_permitted.sql rename to transformations/gcp/macros/compute/ssh_access_permitted.sql diff --git a/transformations/gcp_compliance/macros/pro/compute/ssl_proxy_with_weak_cipher.sql b/transformations/gcp/macros/compute/ssl_proxy_with_weak_cipher.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/compute/ssl_proxy_with_weak_cipher.sql rename to transformations/gcp/macros/compute/ssl_proxy_with_weak_cipher.sql diff --git a/transformations/gcp_compliance/macros/pro/dns/key_signing_with_rsasha1.sql b/transformations/gcp/macros/dns/key_signing_with_rsasha1.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/dns/key_signing_with_rsasha1.sql rename to transformations/gcp/macros/dns/key_signing_with_rsasha1.sql diff --git a/transformations/gcp_compliance/macros/pro/dns/zone_signing_with_rsasha1.sql b/transformations/gcp/macros/dns/zone_signing_with_rsasha1.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/dns/zone_signing_with_rsasha1.sql rename to transformations/gcp/macros/dns/zone_signing_with_rsasha1.sql diff --git a/transformations/gcp_compliance/macros/pro/dns/zones_with_dnssec_disabled.sql b/transformations/gcp/macros/dns/zones_with_dnssec_disabled.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/dns/zones_with_dnssec_disabled.sql rename to transformations/gcp/macros/dns/zones_with_dnssec_disabled.sql diff --git a/transformations/gcp_compliance/macros/free/iam/managed_service_account_keys.sql b/transformations/gcp/macros/iam/managed_service_account_keys.sql similarity index 100% rename from transformations/gcp_compliance/macros/free/iam/managed_service_account_keys.sql rename to transformations/gcp/macros/iam/managed_service_account_keys.sql diff --git a/transformations/gcp_compliance/macros/free/iam/separation_of_duties.sql b/transformations/gcp/macros/iam/separation_of_duties.sql similarity index 100% rename from transformations/gcp_compliance/macros/free/iam/separation_of_duties.sql rename to transformations/gcp/macros/iam/separation_of_duties.sql diff --git a/transformations/gcp_compliance/macros/free/iam/service_account_admin_priv.sql b/transformations/gcp/macros/iam/service_account_admin_priv.sql similarity index 100% rename from transformations/gcp_compliance/macros/free/iam/service_account_admin_priv.sql rename to transformations/gcp/macros/iam/service_account_admin_priv.sql diff --git a/transformations/gcp_compliance/macros/free/iam/service_account_keys_not_rotated.sql b/transformations/gcp/macros/iam/service_account_keys_not_rotated.sql similarity index 100% rename from transformations/gcp_compliance/macros/free/iam/service_account_keys_not_rotated.sql rename to transformations/gcp/macros/iam/service_account_keys_not_rotated.sql diff --git a/transformations/gcp_compliance/macros/free/iam/users_with_service_account_token_creator_role.sql b/transformations/gcp/macros/iam/users_with_service_account_token_creator_role.sql similarity index 100% rename from transformations/gcp_compliance/macros/free/iam/users_with_service_account_token_creator_role.sql rename to transformations/gcp/macros/iam/users_with_service_account_token_creator_role.sql diff --git a/transformations/gcp_compliance/macros/free/kms/keys_not_rotated_within_90_days.sql b/transformations/gcp/macros/kms/keys_not_rotated_within_90_days.sql similarity index 100% rename from transformations/gcp_compliance/macros/free/kms/keys_not_rotated_within_90_days.sql rename to transformations/gcp/macros/kms/keys_not_rotated_within_90_days.sql diff --git a/transformations/gcp_compliance/macros/free/kms/publicly_accessible.sql b/transformations/gcp/macros/kms/publicly_accessible.sql similarity index 100% rename from transformations/gcp_compliance/macros/free/kms/publicly_accessible.sql rename to transformations/gcp/macros/kms/publicly_accessible.sql diff --git a/transformations/gcp_compliance/macros/free/kms/separation_of_duties.sql b/transformations/gcp/macros/kms/separation_of_duties.sql similarity index 100% rename from transformations/gcp_compliance/macros/free/kms/separation_of_duties.sql rename to transformations/gcp/macros/kms/separation_of_duties.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/audit_config_changes_without_log_metric_filter_alerts.sql b/transformations/gcp/macros/logging/audit_config_changes_without_log_metric_filter_alerts.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/audit_config_changes_without_log_metric_filter_alerts.sql rename to transformations/gcp/macros/logging/audit_config_changes_without_log_metric_filter_alerts.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/custom_role_changes_without_log_metric_filter_alerts.sql b/transformations/gcp/macros/logging/custom_role_changes_without_log_metric_filter_alerts.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/custom_role_changes_without_log_metric_filter_alerts.sql rename to transformations/gcp/macros/logging/custom_role_changes_without_log_metric_filter_alerts.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/dns_logging_disabled.sql b/transformations/gcp/macros/logging/dns_logging_disabled.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/dns_logging_disabled.sql rename to transformations/gcp/macros/logging/dns_logging_disabled.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/log_buckets_retention_policy_disabled.sql b/transformations/gcp/macros/logging/log_buckets_retention_policy_disabled.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/log_buckets_retention_policy_disabled.sql rename to transformations/gcp/macros/logging/log_buckets_retention_policy_disabled.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/not_configured_across_services_and_users.sql b/transformations/gcp/macros/logging/not_configured_across_services_and_users.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/not_configured_across_services_and_users.sql rename to transformations/gcp/macros/logging/not_configured_across_services_and_users.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/project_ownership_changes_without_log_metric_filter_alerts.sql b/transformations/gcp/macros/logging/project_ownership_changes_without_log_metric_filter_alerts.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/project_ownership_changes_without_log_metric_filter_alerts.sql rename to transformations/gcp/macros/logging/project_ownership_changes_without_log_metric_filter_alerts.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/sinks_not_configured_for_all_log_entries.sql b/transformations/gcp/macros/logging/sinks_not_configured_for_all_log_entries.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/sinks_not_configured_for_all_log_entries.sql rename to transformations/gcp/macros/logging/sinks_not_configured_for_all_log_entries.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/sql_instance_changes_without_log_metric_filter_alerts.sql b/transformations/gcp/macros/logging/sql_instance_changes_without_log_metric_filter_alerts.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/sql_instance_changes_without_log_metric_filter_alerts.sql rename to transformations/gcp/macros/logging/sql_instance_changes_without_log_metric_filter_alerts.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/storage_iam_changes_without_log_metric_filter_alerts.sql b/transformations/gcp/macros/logging/storage_iam_changes_without_log_metric_filter_alerts.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/storage_iam_changes_without_log_metric_filter_alerts.sql rename to transformations/gcp/macros/logging/storage_iam_changes_without_log_metric_filter_alerts.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/vpc_firewall_changes_without_log_metric_filter_alerts.sql b/transformations/gcp/macros/logging/vpc_firewall_changes_without_log_metric_filter_alerts.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/vpc_firewall_changes_without_log_metric_filter_alerts.sql rename to transformations/gcp/macros/logging/vpc_firewall_changes_without_log_metric_filter_alerts.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/vpc_network_changes_without_log_metric_filter_alerts.sql b/transformations/gcp/macros/logging/vpc_network_changes_without_log_metric_filter_alerts.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/vpc_network_changes_without_log_metric_filter_alerts.sql rename to transformations/gcp/macros/logging/vpc_network_changes_without_log_metric_filter_alerts.sql diff --git a/transformations/gcp_compliance/macros/pro/logging/vpc_route_changes_without_log_metric_filter_alerts.sql b/transformations/gcp/macros/logging/vpc_route_changes_without_log_metric_filter_alerts.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/logging/vpc_route_changes_without_log_metric_filter_alerts.sql rename to transformations/gcp/macros/logging/vpc_route_changes_without_log_metric_filter_alerts.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/db_instance_publicly_accessible.sql b/transformations/gcp/macros/sql/db_instance_publicly_accessible.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/db_instance_publicly_accessible.sql rename to transformations/gcp/macros/sql/db_instance_publicly_accessible.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/db_instance_with_public_ip.sql b/transformations/gcp/macros/sql/db_instance_with_public_ip.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/db_instance_with_public_ip.sql rename to transformations/gcp/macros/sql/db_instance_with_public_ip.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/db_instance_without_ssl.sql b/transformations/gcp/macros/sql/db_instance_without_ssl.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/db_instance_without_ssl.sql rename to transformations/gcp/macros/sql/db_instance_without_ssl.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/db_instances_without_backups.sql b/transformations/gcp/macros/sql/db_instances_without_backups.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/db_instances_without_backups.sql rename to transformations/gcp/macros/sql/db_instances_without_backups.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/mysql_local_inline_flag_on.sql b/transformations/gcp/macros/sql/mysql_local_inline_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/mysql_local_inline_flag_on.sql rename to transformations/gcp/macros/sql/mysql_local_inline_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/mysql_skip_show_database_flag_off.sql b/transformations/gcp/macros/sql/mysql_skip_show_database_flag_off.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/mysql_skip_show_database_flag_off.sql rename to transformations/gcp/macros/sql/mysql_skip_show_database_flag_off.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_checkpoints_flag_off.sql b/transformations/gcp/macros/sql/postgresql_log_checkpoints_flag_off.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_checkpoints_flag_off.sql rename to transformations/gcp/macros/sql/postgresql_log_checkpoints_flag_off.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_connections_flag_off.sql b/transformations/gcp/macros/sql/postgresql_log_connections_flag_off.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_connections_flag_off.sql rename to transformations/gcp/macros/sql/postgresql_log_connections_flag_off.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_disconnections_flag_off.sql b/transformations/gcp/macros/sql/postgresql_log_disconnections_flag_off.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_disconnections_flag_off.sql rename to transformations/gcp/macros/sql/postgresql_log_disconnections_flag_off.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_duration_flag_off.sql b/transformations/gcp/macros/sql/postgresql_log_duration_flag_off.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_duration_flag_off.sql rename to transformations/gcp/macros/sql/postgresql_log_duration_flag_off.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_error_verbosity_flag_not_strict.sql b/transformations/gcp/macros/sql/postgresql_log_error_verbosity_flag_not_strict.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_error_verbosity_flag_not_strict.sql rename to transformations/gcp/macros/sql/postgresql_log_error_verbosity_flag_not_strict.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_executor_stats_flag_on.sql b/transformations/gcp/macros/sql/postgresql_log_executor_stats_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_executor_stats_flag_on.sql rename to transformations/gcp/macros/sql/postgresql_log_executor_stats_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_hostname_flag_off.sql b/transformations/gcp/macros/sql/postgresql_log_hostname_flag_off.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_hostname_flag_off.sql rename to transformations/gcp/macros/sql/postgresql_log_hostname_flag_off.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_lock_waits_flag_off.sql b/transformations/gcp/macros/sql/postgresql_log_lock_waits_flag_off.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_lock_waits_flag_off.sql rename to transformations/gcp/macros/sql/postgresql_log_lock_waits_flag_off.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_min_duration_statement_flag_on.sql b/transformations/gcp/macros/sql/postgresql_log_min_duration_statement_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_min_duration_statement_flag_on.sql rename to transformations/gcp/macros/sql/postgresql_log_min_duration_statement_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_min_error_statement_flag_less_error.sql b/transformations/gcp/macros/sql/postgresql_log_min_error_statement_flag_less_error.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_min_error_statement_flag_less_error.sql rename to transformations/gcp/macros/sql/postgresql_log_min_error_statement_flag_less_error.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_parser_stats_flag_on.sql b/transformations/gcp/macros/sql/postgresql_log_parser_stats_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_parser_stats_flag_on.sql rename to transformations/gcp/macros/sql/postgresql_log_parser_stats_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_planner_stats_flag_on.sql b/transformations/gcp/macros/sql/postgresql_log_planner_stats_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_planner_stats_flag_on.sql rename to transformations/gcp/macros/sql/postgresql_log_planner_stats_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_statement_stats_flag_on.sql b/transformations/gcp/macros/sql/postgresql_log_statement_stats_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_statement_stats_flag_on.sql rename to transformations/gcp/macros/sql/postgresql_log_statement_stats_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/postgresql_log_temp_files_flag_off.sql b/transformations/gcp/macros/sql/postgresql_log_temp_files_flag_off.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/postgresql_log_temp_files_flag_off.sql rename to transformations/gcp/macros/sql/postgresql_log_temp_files_flag_off.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/sqlserver_contained_database_authentication_flag_on.sql b/transformations/gcp/macros/sql/sqlserver_contained_database_authentication_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/sqlserver_contained_database_authentication_flag_on.sql rename to transformations/gcp/macros/sql/sqlserver_contained_database_authentication_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/sqlserver_cross_db_ownership_chaining_flag_on.sql b/transformations/gcp/macros/sql/sqlserver_cross_db_ownership_chaining_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/sqlserver_cross_db_ownership_chaining_flag_on.sql rename to transformations/gcp/macros/sql/sqlserver_cross_db_ownership_chaining_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/sqlserver_external_scripts_enabled_flag_on.sql b/transformations/gcp/macros/sql/sqlserver_external_scripts_enabled_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/sqlserver_external_scripts_enabled_flag_on.sql rename to transformations/gcp/macros/sql/sqlserver_external_scripts_enabled_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/sqlserver_remote_access_flag_on.sql b/transformations/gcp/macros/sql/sqlserver_remote_access_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/sqlserver_remote_access_flag_on.sql rename to transformations/gcp/macros/sql/sqlserver_remote_access_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/sqlserver_trace_flag_on.sql b/transformations/gcp/macros/sql/sqlserver_trace_flag_on.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/sqlserver_trace_flag_on.sql rename to transformations/gcp/macros/sql/sqlserver_trace_flag_on.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/sqlserver_user_connections_flag_not_set.sql b/transformations/gcp/macros/sql/sqlserver_user_connections_flag_not_set.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/sqlserver_user_connections_flag_not_set.sql rename to transformations/gcp/macros/sql/sqlserver_user_connections_flag_not_set.sql diff --git a/transformations/gcp_compliance/macros/pro/sql/sqlserver_user_options_flag_set.sql b/transformations/gcp/macros/sql/sqlserver_user_options_flag_set.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/sql/sqlserver_user_options_flag_set.sql rename to transformations/gcp/macros/sql/sqlserver_user_options_flag_set.sql diff --git a/transformations/gcp_compliance/macros/pro/storage/buckets_publicly_accessible.sql b/transformations/gcp/macros/storage/buckets_publicly_accessible.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/storage/buckets_publicly_accessible.sql rename to transformations/gcp/macros/storage/buckets_publicly_accessible.sql diff --git a/transformations/gcp_compliance/macros/pro/storage/buckets_without_uniform_bucket_level_access.sql b/transformations/gcp/macros/storage/buckets_without_uniform_bucket_level_access.sql similarity index 100% rename from transformations/gcp_compliance/macros/pro/storage/buckets_without_uniform_bucket_level_access.sql rename to transformations/gcp/macros/storage/buckets_without_uniform_bucket_level_access.sql diff --git a/transformations/gcp_compliance/Makefile b/transformations/gcp_compliance/Makefile deleted file mode 100644 index bf738dd2a..000000000 --- a/transformations/gcp_compliance/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -.PHONY: build-free -build-free: - @echo "Building free tier compliance pack" - rm -rf ./build/gcp_compliance_free - mkdir -p ./build/gcp_compliance_free - mkdir ./build/gcp_compliance_free/macros - mkdir ./build/gcp_compliance_free/models - cp -r macros/free ./build/gcp_compliance_free/macros/. - cp -r models/free ./build/gcp_compliance_free/models/. - cp dbt_project.yml ./build/gcp_compliance_free/ - zip -r ./build/gcp_compliance_free.zip ./build/gcp_compliance_free - -.PHONY: build-premium -build-premium: - @echo "Building premium tier compliance pack" - rm -rf ./build/gcp_compliance_premium - mkdir -p ./build/gcp_compliance_premium - mkdir ./build/gcp_compliance_premium/macros - mkdir ./build/gcp_compliance_premium/models - cp -r macros/free ./build/gcp_compliance_premium/macros/. - cp -r macros/pro ./build/gcp_compliance_premium/macros/. - cp -r models/pro ./build/gcp_compliance_premium/models/. - cp dbt_project.yml ./build/gcp_compliance_premium/ - cp requirements.txt ./build/gcp_compliance_premium/ - zip -r ./build/gcp_compliance_premium.zip ./build/gcp_compliance_premium \ No newline at end of file diff --git a/transformations/gcp_compliance/tests/gcp.yml b/transformations/gcp_compliance/tests/gcp.yml deleted file mode 100644 index 49c88737c..000000000 --- a/transformations/gcp_compliance/tests/gcp.yml +++ /dev/null @@ -1,7 +0,0 @@ -kind: source -spec: - name: gcp - path: cloudquery/gcp - version: "v10.0.0" # latest version of source gcp plugin - destinations: ["dest"] - tables: ["*"] diff --git a/transformations/gcp_compliance/tests/pg.yml b/transformations/gcp_compliance/tests/pg.yml deleted file mode 100644 index 6cd41c262..000000000 --- a/transformations/gcp_compliance/tests/pg.yml +++ /dev/null @@ -1,8 +0,0 @@ -kind: destination -spec: - name: "dest" - path: "cloudquery/postgresql" - version: "v6.1.1" - spec: - batch_size: 10000 - connection_string: ${CQ_DSN} \ No newline at end of file