diff --git a/docs/deploy_on_foundation_v4.0.0.md b/docs/deploy_on_foundation_v4.0.0.md index 5a875044..bcc6b814 100644 --- a/docs/deploy_on_foundation_v4.0.0.md +++ b/docs/deploy_on_foundation_v4.0.0.md @@ -94,12 +94,6 @@ cp policy-library/policies/constraints/network_enable_firewall_logs.yaml ../gcp- cp policy-library/policies/constraints/require_dnssec.yaml ../gcp-policies/policies/constraints/require_dnssec.yaml ``` -- Copy `storage_logging.yaml` from this repository to the policies repository: - -``` bash -cp policy-library/policies/constraints/storage_logging.yaml ../gcp-policies/policies/constraints/storage_logging.yaml -``` - - On `gcp-policies` change `serviceusage_allow_basic_apis.yaml` and add the following apis: ```yaml @@ -238,9 +232,161 @@ cp docs/assets/terraform/2-environments/ml_key_rings.tf ../gcp-environments/modu cp docs/assets/terraform/2-environments/ml_logging.tf ../gcp-environments/modules/env_baseline ``` +- On `gcp-environments/modules/env_baseline/variables.tf` add the following variables: + +```terraform +variable "keyring_name" { + description = "Name to be used for KMS Keyring" + type = string + default = "ml-env-keyring" +} + +variable "keyring_regions" { + description = "Regions to create keyrings in" + type = list(string) + default = [ + "us-central1", + "us-east4" + ] +} + +variable "kms_prevent_destroy" { + description = "Wheter to prevent keyring and keys destruction. Must be set to false if the user wants to disable accidental terraform deletions protection." + type = bool + default = true +} + +variable "gcs_bucket_prefix" { + description = "Bucket Prefix" + type = string + default = "bkt" +} + +variable "gcs_logging_bucket_location" { + description = "Location of environment logging bucket" + type = string + default = "us-central1" +} + +variable "gcs_logging_retention_period" { + description = "Retention configuration for environment logging bucket" + type = object({ + is_locked = bool + retention_period_days = number + }) + default = null +} + +variable "gcs_logging_key_rotation_period" { + description = "Rotation period in seconds to be used for KMS Key" + type = string + default = "7776000s" +} +``` + +- On `gcp-environments/modules/env_baseline/variables.tf` add the following field to `project_budget` specification: + +```terraform +logging_budget_amount = optional(number, 1000) +logging_alert_spent_percents = optional(list(number), [1.2]) +logging_alert_pubsub_topic = optional(string, null) +logging_budget_alert_spend_basis = optional(string, "FORECASTED_SPEND") +``` + +This will result in a variable similar to the variable specified below: + +```terraform +variable "project_budget" { + description = <