Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: terraform-google-modules/terraform-example-foundation
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2.0
Choose a base ref
...
head repository: terraform-google-modules/terraform-example-foundation
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.0
Choose a head ref
  • 10 commits
  • 36 files changed
  • 8 contributors

Commits on Jul 27, 2021

  1. chore: improve instructions to include expected directory (#509)

    * chore: fixes for issue 489
    
    * chore: Updates for issue 489
    
    * Update 1-org/README.md
    
    Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
    mark1000 and bharathkkb authored Jul 27, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a9145f4 View commit details

Commits on Jul 29, 2021

  1. chore: Update terraform-validator to v0.4.0 (#513)

    * Update terraform-validator to v0.4.0
    
    * Update 0-bootstrap/README.md
    
    Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
    
    * Use correct terraform-validator link
    
    Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
    vovinacci and bharathkkb authored Jul 29, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    61e8014 View commit details

Commits on Aug 3, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d7758f7 View commit details
  2. chore: Dependabot for upstream TF modules (#511)

    * Create dependabot.yml
    
    * Update dependabot.yml
    
    * Update versions.tf
    
    * Update dependabot.yml
    
    * Update dependabot.yml
    
    * Update versions.tf
    bharathkkb authored Aug 3, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ec70bcb View commit details

Commits on Aug 5, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c6ce7c8 View commit details

Commits on Aug 6, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    27a31a6 View commit details

Commits on Aug 24, 2021

  1. feat: replace scc gcloud provisioner with native resource (#514)

    * replace scc configure gcloud to Terraform resource
    
    * fix the format
    
    * format
    
    * add readme
    ericyz authored Aug 24, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d2cdfb6 View commit details

Commits on Aug 27, 2021

  1. chore: Removed references to Forseti (#548)

    * Removed references to Forseti
    
    The policy-library has moved to GoogleCloudPlatform
    
    * switch to more generic terms for policy library
    
    Co-authored-by: Morgante Pell <morgante.pell@morgante.net>
    
    Co-authored-by: Morgante Pell <morgante.pell@morgante.net>
    melinath and morgante authored Aug 27, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e8f2f84 View commit details

Commits on Sep 2, 2021

  1. chore: Remove duplicate line and add impersonation (#539)

    Remove duplicate line and add impersonation step for running terraform manually
    DaxterM authored Sep 2, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f28985a View commit details

Commits on Sep 15, 2021

  1. chore: release 2.3.0 (#549)

    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored Sep 15, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c5b1114 View commit details
Showing with 268 additions and 156 deletions.
  1. +97 −0 .github/dependabot.yml
  2. +5 −0 0-bootstrap/README-Jenkins.md
  3. +6 −11 0-bootstrap/README.md
  4. +3 −3 0-bootstrap/main.tf
  5. +1 −1 0-bootstrap/modules/jenkins-agent/files/jenkins_gce_startup_script.sh
  6. +8 −2 0-bootstrap/modules/jenkins-agent/versions.tf
  7. +1 −10 0-bootstrap/versions.tf
  8. +18 −14 1-org/README.md
  9. +1 −1 1-org/envs/shared/README.md
  10. +8 −23 1-org/envs/shared/scc_notification.tf
  11. +1 −1 1-org/envs/shared/variables.tf
  12. +4 −4 1-org/envs/shared/versions.tf
  13. +17 −13 2-environments/README.md
  14. +2 −2 2-environments/modules/env_baseline/versions.tf
  15. +12 −12 3-networks/README.md
  16. +2 −2 3-networks/modules/base_shared_vpc/versions.tf
  17. +2 −2 3-networks/modules/dedicated_interconnect/versions.tf
  18. +17 −0 3-networks/modules/hierarchical_firewall_policy/README.md
  19. +2 −2 3-networks/modules/hierarchical_firewall_policy/versions.tf
  20. +2 −2 3-networks/modules/partner_interconnect/versions.tf
  21. +2 −2 3-networks/modules/restricted_shared_vpc/versions.tf
  22. +2 −2 3-networks/modules/transitivity/versions.tf
  23. +13 −14 4-projects/README.md
  24. +1 −1 4-projects/modules/infra_pipelines/README.md
  25. +1 −1 4-projects/modules/infra_pipelines/cloudbuild_builder/Dockerfile
  26. +1 −1 4-projects/modules/infra_pipelines/cloudbuild_builder/cloudbuild.yaml
  27. +1 −1 4-projects/modules/infra_pipelines/variables.tf
  28. +2 −2 4-projects/modules/infra_pipelines/versions.tf
  29. +2 −2 4-projects/modules/single_project/versions.tf
  30. +18 −16 5-app-infra/README.md
  31. +2 −2 5-app-infra/modules/env_base/versions.tf
  32. +7 −0 CHANGELOG.md
  33. +3 −3 README.md
  34. +1 −1 build/cloudbuild-tf-apply.yaml
  35. +1 −1 build/cloudbuild-tf-plan.yaml
  36. +2 −2 build/tf-wrapper.sh
97 changes: 97 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "terraform"
directory: "0-bootstrap"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
commit-message:
prefix: "chore(deps): "
rebase-strategy: "disabled"
- package-ecosystem: "terraform"
directory: "0-bootstrap/modules/jenkins-agent"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
commit-message:
prefix: "chore(deps): "
rebase-strategy: "disabled"
- package-ecosystem: "terraform"
directory: "2-environments/modules/env_baseline"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
commit-message:
prefix: "chore(deps): "
rebase-strategy: "disabled"
- package-ecosystem: "terraform"
directory: "3-networks/modules/base_shared_vpc"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
commit-message:
prefix: "chore(deps): "
rebase-strategy: "disabled"
- package-ecosystem: "terraform"
directory: "3-networks/modules/dedicated_interconnect"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
commit-message:
prefix: "chore(deps): "
rebase-strategy: "disabled"
- package-ecosystem: "terraform"
directory: "3-networks/modules/restricted_shared_vpc"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
commit-message:
prefix: "chore(deps): "
rebase-strategy: "disabled"
- package-ecosystem: "terraform"
directory: "3-networks/modules/transitivity"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
commit-message:
prefix: "chore(deps): "
rebase-strategy: "disabled"
- package-ecosystem: "terraform"
directory: "3-networks/modules/vpn-ha"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
commit-message:
prefix: "chore(deps): "
rebase-strategy: "disabled"
- package-ecosystem: "terraform"
directory: "4-projects/modules/single_project"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
commit-message:
prefix: "chore(deps): "
rebase-strategy: "disabled"
- package-ecosystem: "terraform"
directory: "5-app-infra/modules/env_base"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
commit-message:
prefix: "chore(deps): "
rebase-strategy: "disabled"
5 changes: 5 additions & 0 deletions 0-bootstrap/README-Jenkins.md
Original file line number Diff line number Diff line change
@@ -30,6 +30,11 @@ It is a best practice to have two separate projects here (`prj-b-seed` and `prj-

Please see the **[requirements](./modules/jenkins-agent/README.md#Requirements)** of Software, Infrastructure and Permissions before following the instructions below.

## Usage

**Note:** If you are using MacOS, replace `cp -RT` with `cp -R` in the relevant
commands. The `-T` flag is needed for Linux, but causes problems for MacOS.

## Instructions

You arrived to these instructions because you are using the `jenkins_bootstrap` to run the 0-bootstrap step instead of `cloudbuild_bootstrap`. Please follow the indications below:
17 changes: 6 additions & 11 deletions 0-bootstrap/README.md
Original file line number Diff line number Diff line change
@@ -15,35 +15,30 @@ step also configures a CI/CD pipeline for foundations code in subsequent
stages.</td>
</tr>
<tr>
<td><a
href="../1-org">1-org</a></td>
<td><a href="../1-org">1-org</a></td>
<td>Sets up top level shared folders, monitoring and networking projects, and
organization-level logging, and sets baseline security settings through
organizational policy.</td>
</tr>
<tr>
<td><a
href="../2-environments"><span style="white-space: nowrap;">2-environments</span></a></td>
<td><a href="../2-environments"><span style="white-space: nowrap;">2-environments</span></a></td>
<td>Sets up development, non-production, and production environments within the
Google Cloud organization that you've created.</td>
</tr>
<tr>
<td><a
href="../3-networks">3-networks</a></td>
<td><a href="../3-networks">3-networks</a></td>
<td>Sets up base and restricted shared VPCs with default DNS, NAT (optional),
Private Service networking, VPC service controls, on-premises Dedicated
Interconnect, and baseline firewall rules for each environment. Also sets
up the global DNS hub.</td>
</tr>
<tr>
<td><a
href="../4-projects">4-projects</a></td>
<td><a href="../4-projects">4-projects</a></td>
<td>Set up a folder structure, projects, and application infrastructure pipeline for applications,
which are connected as service projects to the shared VPC created in the previous stage.</td>
</tr>
<tr>
<td><a
href="../5-app-infra">5-app-infra</a></td>
<td><a href="../5-app-infra">5-app-infra</a></td>
<td>Deploy a simple <a href="https://cloud.google.com/compute/">Compute Engine</a> instance in one of the business unit projects using the infra pipeline set up in 4-projects.</td>
</tr>
</tbody>
@@ -113,7 +108,7 @@ your current Jenkins manager (master) environment.
```
1. Run `terraform init`.
1. Run `terraform plan` and review the output.
1. To run terraform-validator steps please follow the [instructions](https://github.com/forseti-security/policy-library/blob/master/docs/user_guide.md#install-terraform-validator) in the **Install Terraform Validator** section and install version `2021-03-22`. You will also need to rename the binary from `terraform-validator-<your-platform>` to `terraform-validator`and the terraform-validator binary must be in your PATH.
1. To run terraform-validator steps please follow the [instructions](https://github.com/GoogleCloudPlatform/terraform-validator/blob/main/docs/install.md) in the **Install Terraform Validator** section and install version `v0.4.0`. You will also need to rename the binary from `terraform-validator-<your-platform>` to `terraform-validator` and the terraform-validator binary must be in your PATH.
1. Run `terraform plan -input=false -out bootstrap.tfplan`
1. Run `terraform show -json bootstrap.tfplan > bootstrap.json`
1. Run `terraform-validator validate bootstrap.json --policy-path="../policy-library" --project <A-VALID-PROJECT-ID>` and check for violations (`<A-VALID-PROJECT-ID>` must be an existing project you have access to, this is necessary because Terraform-validator needs to link resources to a valid Google Cloud Platform project).
6 changes: 3 additions & 3 deletions 0-bootstrap/main.tf
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ resource "google_folder" "bootstrap" {

module "seed_bootstrap" {
source = "terraform-google-modules/bootstrap/google"
version = "~> 2.1"
version = "~> 3.0"
org_id = var.org_id
folder_id = google_folder.bootstrap.id
project_id = "${var.project_prefix}-b-seed"
@@ -102,7 +102,7 @@ resource "google_billing_account_iam_member" "tf_billing_admin" {
// Comment-out the cloudbuild_bootstrap module and its outputs if you want to use Jenkins instead of Cloud Build
module "cloudbuild_bootstrap" {
source = "terraform-google-modules/bootstrap/google//modules/cloudbuild"
version = "~> 2.1"
version = "~> 3.0"
org_id = var.org_id
folder_id = google_folder.bootstrap.id
project_id = "${var.project_prefix}-b-cicd"
@@ -117,7 +117,7 @@ module "cloudbuild_bootstrap" {
cloudbuild_apply_filename = "cloudbuild-tf-apply.yaml"
project_prefix = var.project_prefix
cloud_source_repos = var.cloud_source_repos
terraform_validator_release = "2021-03-22"
terraform_validator_release = "v0.4.0"
terraform_version = "0.13.7"
terraform_version_sha256sum = "4a52886e019b4fdad2439da5ff43388bbcc6cce9784fde32c53dcd0e28ca9957"

Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ wget "https://releases.hashicorp.com/terraform/${tpl_TERRAFORM_VERSION}/terrafor
rm -rf /var/lib/apt/lists/*

echo "**** Startup Step 6/9: Download and install the Terraform validator ****"
gsutil cp gs://terraform-validator/releases/2021-03-22/terraform-validator-linux-amd64 .
gsutil cp gs://terraform-validator/releases/v0.4.0/terraform-validator-linux-amd64 .
chmod 755 "${tpl_TERRAFORM_DIR}terraform-validator-linux-amd64"
mv "${tpl_TERRAFORM_DIR}terraform-validator-linux-amd64" "${tpl_TERRAFORM_DIR}terraform-validator"

10 changes: 8 additions & 2 deletions 0-bootstrap/modules/jenkins-agent/versions.tf
Original file line number Diff line number Diff line change
@@ -18,7 +18,13 @@ terraform {
required_version = ">= 0.13"

required_providers {
google = "~> 3.5"
google-beta = "~> 3.5"
google = {
source = "hashicorp/google"
version = ">= 3.50"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 3.50"
}
}
}
11 changes: 1 addition & 10 deletions 0-bootstrap/versions.tf
Original file line number Diff line number Diff line change
@@ -21,19 +21,10 @@ terraform {
source = "hashicorp/google"
version = ">= 3.50"
}
null = {
source = "hashicorp/null"
version = "~> 2.1"
}

random = {
source = "hashicorp/random"
version = "~> 2.3"
}
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-example-foundation:bootstrap/v2.2.0"
module_name = "blueprints/terraform/terraform-example-foundation:bootstrap/v2.3.0"
}

}
32 changes: 18 additions & 14 deletions 1-org/README.md
Original file line number Diff line number Diff line change
@@ -8,8 +8,7 @@ the example.com reference architecture described in
<table>
<tbody>
<tr>
<td><a
href="../0-bootstrap">0-bootstrap</a></td>
<td><a href="../0-bootstrap">0-bootstrap</a></td>
<td>Bootstraps a Google Cloud organization, creating all the required resources
and permissions to start using the Cloud Foundation Toolkit (CFT). This
step also configures a CI/CD pipeline for foundations code in subsequent
@@ -22,28 +21,24 @@ organization-level logging, and sets baseline security settings through
organizational policy.</td>
</tr>
<tr>
<td><a
href="../2-environments"><span style="white-space: nowrap;">2-environments</span></a></td>
<td><a href="../2-environments"><span style="white-space: nowrap;">2-environments</span></a></td>
<td>Sets up development, non-production, and production environments within the
Google Cloud organization that you've created.</td>
</tr>
<tr>
<td><a
href="../3-networks">3-networks</a></td>
<td><a href="../3-networks">3-networks</a></td>
<td>Sets up base and restricted shared VPCs with default DNS, NAT (optional),
Private Service networking, VPC service controls, on-premises Dedicated
Interconnect, and baseline firewall rules for each environment. It also sets
up the global DNS hub.</td>
</tr>
<tr>
<td><a
href="../4-projects">4-projects</a></td>
<td><a href="../4-projects">4-projects</a></td>
<td>Sets up a folder structure, projects, and application infrastructure pipeline for applications,
which are connected as service projects to the shared VPC created in the previous stage.</td>
</tr>
<tr>
<td><a
href="../5-app-infra">5-app-infra</a></td>
<td><a href="../5-app-infra">5-app-infra</a></td>
<td>Deploy a simple <a href="https://cloud.google.com/compute/">Compute Engine</a> instance in one of the business unit projects using the infra pipeline set up in 4-projects.</td>
</tr>
</tbody>
@@ -89,6 +84,9 @@ If those limitations do not apply to your workload/environment, you can choose t

**Note:** You need to set variable `enable_hub_and_spoke` to `true` to be able to used the **Hub-and-Spoke** architecture detailed in the **Networking** section of the [google cloud security foundations guide](https://services.google.com/fh/files/misc/google-cloud-security-foundations-guide.pdf).

**Note:** If you are using MacOS, replace `cp -RT` with `cp -R` in the relevant
commands. The `-T` flag is needed for Linux, but causes problems for MacOS.

**Note:** This module creates a Security Command Center Notification.
The notification name must be unique in the organization.
The suggested name in the `terraform.tfvars` file is **scc-notify**.
@@ -106,7 +104,9 @@ Run `terraform output cloudbuild_project_id` in the `0-bootstrap` folder to see
```
gcloud source repos clone gcp-policies --project=YOUR_CLOUD_BUILD_PROJECT_ID
```
1. Navigate into the repo.
1. Navigate into the repo. All subsequent steps assume you are running them
from the gcp-policies directory. If you run them from another directory,
adjust your copy paths accordingly.
```
cd gcp-policies
```
@@ -132,7 +132,9 @@ Run `terraform output cloudbuild_project_id` in the `0-bootstrap` folder to see
```
gcloud source repos clone gcp-org --project=YOUR_CLOUD_BUILD_PROJECT_ID
```
1. Navigate into the repo and change to a non-production branch.
1. Navigate into the repo and change to a non-production branch. All subsequent
steps assume you are running them from the gcp-environments directory. If
you run them from another directory, adjust your copy paths accordingly.
```
cd gcp-org
git checkout -b plan
@@ -190,7 +192,9 @@ to run the command as the Terraform service account.
```
git clone <YOUR_NEW_REPO-1-org>
```
1. Navigate into the repo and change to a non-production branch.
1. Navigate into the repo and change to a non-production branch. All subsequent
steps assume you are running them from the gcp-environments directory. If
you run them from another directory, adjust your copy paths accordingly.
```
cd YOUR_NEW_REPO_CLONE-1-org
git checkout -b plan
@@ -264,7 +268,7 @@ to run the command as the Terraform service account.
We will now deploy our environment (production) using this script.
When using Cloud Build or Jenkins as your CI/CD tool each environment corresponds to a branch is the repository for 1-org step and only the corresponding environment is applied.
To use the `validate` option of the `tf-wrapper.sh` script, please follow the [instructions](https://github.com/forseti-security/policy-library/blob/master/docs/user_guide.md#install-terraform-validator) in the **Install Terraform Validator** section and install version `2021-03-22` in your system. You will also need to rename the binary from `terraform-validator-<your-platform>` to `terraform-validator` and the `terraform-validator` binary must be in your `PATH`.
To use the `validate` option of the `tf-wrapper.sh` script, please follow the [instructions](https://github.com/GoogleCloudPlatform/terraform-validator/blob/main/docs/install.md) in the **Install Terraform Validator** section and install version `v0.4.0` in your system. You will also need to rename the binary from `terraform-validator-<your-platform>` to `terraform-validator` and the `terraform-validator` binary must be in your `PATH`.
1. Run `./tf-wrapper.sh init production`.
1. Run `./tf-wrapper.sh plan production` and review output.
2 changes: 1 addition & 1 deletion 1-org/envs/shared/README.md
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@
| restricted\_net\_hub\_project\_alert\_pubsub\_topic | The name of the Cloud Pub/Sub topic where budget related messages will be published, in the form of `projects/{project_id}/topics/{topic_id}` for the restricted net hub project. | `string` | `null` | no |
| restricted\_net\_hub\_project\_alert\_spent\_percents | A list of percentages of the budget to alert on when threshold is exceeded for the restricted net hub project. | `list(number)` | <pre>[<br> 0.5,<br> 0.75,<br> 0.9,<br> 0.95<br>]</pre> | no |
| restricted\_net\_hub\_project\_budget\_amount | The amount to use as the budget for the restricted net hub project. | `number` | `1000` | no |
| scc\_notification\_filter | Filter used to create the Security Command Center Notification, you can see more details on how to create filters in https://cloud.google.com/security-command-center/docs/how-to-api-filter-notifications#create-filter | `string` | `"state=\\\"ACTIVE\\\""` | no |
| scc\_notification\_filter | Filter used to create the Security Command Center Notification, you can see more details on how to create filters in https://cloud.google.com/security-command-center/docs/how-to-api-filter-notifications#create-filter | `string` | `"state = \"ACTIVE\""` | no |
| scc\_notification\_name | Name of the Security Command Center Notification. It must be unique in the organization. Run `gcloud scc notifications describe <scc_notification_name> --organization=org_id` to check if it already exists. | `string` | n/a | yes |
| scc\_notifications\_project\_alert\_pubsub\_topic | The name of the Cloud Pub/Sub topic where budget related messages will be published, in the form of `projects/{project_id}/topics/{topic_id}` for the SCC notifications project. | `string` | `null` | no |
| scc\_notifications\_project\_alert\_spent\_percents | A list of percentages of the budget to alert on when threshold is exceeded for the SCC notifications project. | `list(number)` | <pre>[<br> 0.5,<br> 0.75,<br> 0.9,<br> 0.95<br>]</pre> | no |
31 changes: 8 additions & 23 deletions 1-org/envs/shared/scc_notification.tf
Original file line number Diff line number Diff line change
@@ -29,28 +29,13 @@ resource "google_pubsub_subscription" "scc_notification_subscription" {
project = module.scc_notifications.project_id
}

module "scc_notification" {
source = "terraform-google-modules/gcloud/google"
version = "~> 1.1.0"
resource "google_scc_notification_config" "scc_notification_config" {
config_id = var.scc_notification_name
organization = var.org_id
description = "SCC Notification for all active findings"
pubsub_topic = google_pubsub_topic.scc_notification_topic.id

additional_components = var.skip_gcloud_download ? [] : ["alpha"]

create_cmd_entrypoint = "gcloud"
create_cmd_body = <<-EOF
scc notifications create ${var.scc_notification_name} --organization ${var.org_id} \
--description "SCC Notification for all active findings" \
--pubsub-topic projects/${module.scc_notifications.project_id}/topics/${google_pubsub_topic.scc_notification_topic.name} \
--filter "${var.scc_notification_filter}" \
--project "${module.scc_notifications.project_id}" \
--impersonate-service-account=${var.terraform_service_account}
EOF

destroy_cmd_entrypoint = "gcloud"
destroy_cmd_body = <<-EOF
scc notifications delete organizations/${var.org_id}/notificationConfigs/${var.scc_notification_name} \
--impersonate-service-account ${var.terraform_service_account} \
--project "${module.scc_notifications.project_id}" \
--quiet
EOF
skip_download = var.skip_gcloud_download
streaming_config {
filter = var.scc_notification_filter
}
}
2 changes: 1 addition & 1 deletion 1-org/envs/shared/variables.tf
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ variable "skip_gcloud_download" {
variable "scc_notification_filter" {
description = "Filter used to create the Security Command Center Notification, you can see more details on how to create filters in https://cloud.google.com/security-command-center/docs/how-to-api-filter-notifications#create-filter"
type = string
default = "state=\\\"ACTIVE\\\""
default = "state = \"ACTIVE\""
}

variable "parent_folder" {
Loading