Skip to content

Commit

Permalink
Merge branch 'main' into chore/add_bigquery
Browse files Browse the repository at this point in the history
  • Loading branch information
erezrokah authored Dec 12, 2023
2 parents 02b838b + b7ff919 commit 77d78cf
Show file tree
Hide file tree
Showing 23 changed files with 51 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=is_snowflake()) }}
{{ config(enabled=block_bigquery() and block_postgres()) }}

with
aggregated as (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery()) }}

with
aggregated as (
({{ autoscaling_groups_elb_check('pci_dss_v3.2.1','autoscaling.1') }})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(enabled=is_snowflake()) }}
{{ config(enabled=block_bigquery() and block_postgres()) }}

with
aggregated as (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery() and block_snowflake()) }}

with
aggregated as (
({{ ec2_not_imdsv2_instances('imds_v2','EC2-IMDSv2') }})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery() and block_snowflake()) }}

with
aggregated as (
({{ autoscaling_groups_elb_check('pci_dss_v3.2.1','autoscaling.1') }})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery() and block_snowflake()) }}

with
aggregated as (
({{ public_egress_sg_and_routing_instances('public_egress','ec2-all-instances-with-routes-and-security-groups') }})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery() and block_snowflake()) }}

with
aggregated as (
({{ api_gw_publicly_accessible('publicly_available','API-Gateways') }})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{{ config(enabled=is_snowflake()) }}

{% macro access_point_enforce_user_identity(framework, check_id) %}
{{ return(adapter.dispatch('access_point_enforce_user_identity')(framework, check_id)) }}
{% endmacro %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{{ config(enabled=block_bigquery()) }}

{{ api_gateway_method_settings() }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery()) }}

with
aggregated as (
({{ networks_acls_ingress_rules() }})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery()) }}

with
aggregated as (
({{ security_group_egress_rules() }})
Expand Down
2 changes: 1 addition & 1 deletion transformations/azure/compliance-free/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery()) }}

with
aggregated as (
({{iam_custom_subscription_owner_roles('cis_v1.3.0','1.21')}})
Expand Down
12 changes: 0 additions & 12 deletions transformations/azure/compliance-free/profiles.yml

This file was deleted.

2 changes: 1 addition & 1 deletion transformations/azure/compliance-premium/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery()) }}

with
aggregated as (
({{iam_custom_subscription_owner_roles('cis_v1.3.0','1.21')}})
Expand Down
12 changes: 0 additions & 12 deletions transformations/azure/compliance-premium/profiles.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery()) }}

with
aggregated as (
({{view_azure_nsg_dest_port_ranges()}})
Expand Down
2 changes: 2 additions & 0 deletions transformations/azure/models/view_azure_nsg_rules.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery()) }}

with
aggregated as (
({{view_azure_nsg_rules()}})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ config(enabled=block_bigquery()) }}

with
aggregated as (
({{view_azure_security_policy_parameters()}})
Expand Down
7 changes: 7 additions & 0 deletions transformations/macros/block_bigquery.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% macro block_bigquery() %}
{% if target.type == 'bigquery' %}
{{ return(false) }}
{% else %}
{{ return(true) }}
{% endif %}
{% endmacro %}
7 changes: 7 additions & 0 deletions transformations/macros/block_posgres.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% macro block_postgres() %}
{% if target.type == 'postgres' %}
{{ return(false) }}
{% else %}
{{ return(true) }}
{% endif %}
{% endmacro %}
7 changes: 7 additions & 0 deletions transformations/macros/block_snowflake.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% macro block_snowflake() %}
{% if target.type == 'snowflake' %}
{{ return(false) }}
{% else %}
{{ return(true) }}
{% endif %}
{% endmacro %}

0 comments on commit 77d78cf

Please sign in to comment.