{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Bootstrap Defaults",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "global": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "folder_name": {
          "type": "string",
          "default": "networking"
        },
        "stage_name": {
          "type": "string",
          "default": "2-networking"
        }
      },
      "required": []
    },
    "projects": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "defaults": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "billing_account": {
              "type": "string"
            },
            "bucket": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "force_destroy": {
                  "type": "boolean"
                }
              }
            },
            "contacts": {
              "type": "object",
              "default": {},
              "additionalProperties": false,
              "patternProperties": {
                "^[a-z0-9_-]+$": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "deletion_policy": {
              "type": "string",
              "enum": [
                "PREVENT",
                "DELETE",
                "ABANDON"
              ]
            },
            "labels": {
              "type": "object",
              "default": {},
              "additionalProperties": false,
              "patternProperties": {
                "^[a-z0-9_-]+$": {
                  "type": "string"
                }
              }
            },
            "locations": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "bigquery": {
                  "type": "string"
                },
                "logging": {
                  "type": "string"
                },
                "storage": {
                  "type": "string"
                }
              }
            },
            "metric_scopes": {
              "type": "array",
              "default": [],
              "items": {
                "type": "string"
              }
            },
            "parent": {
              "type": "string"
            },
            "prefix": {
              "type": "string"
            },
            "project_reuse": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "use_data_source": {
                  "type": "boolean",
                  "default": true
                },
                "attributes": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "number": {
                      "type": "number"
                    },
                    "services_enabled": {
                      "type": "array",
                      "default": [],
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "name",
                    "number"
                  ]
                }
              }
            },
            "service_encryption_key_ids": {
              "type": "object",
              "default": {},
              "additionalProperties": false,
              "patternProperties": {
                "^[a-z0-9_-]+$": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "services": {
              "type": "array",
              "default": [],
              "items": {
                "type": "string"
              }
            },
            "shared_vpc_service_config": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "host_project": {
                  "type": "string"
                },
                "iam_bindings_additive": {
                  "$ref": "#/$defs/iam_bindings_additive"
                },
                "network_users": {
                  "type": "array",
                  "default": [],
                  "items": {
                    "type": "string"
                  }
                },
                "service_agent_iam": {
                  "type": "object",
                  "default": {},
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "service_agent_subnet_iam": {
                  "type": "object",
                  "default": {},
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "service_iam_grants": {
                  "type": "array",
                  "default": [],
                  "items": {
                    "type": "string"
                  }
                },
                "network_subnet_users": {
                  "type": "object",
                  "default": {},
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "required": [
                "host_project"
              ]
            },
            "tag_bindings": {
              "type": "object",
              "default": {},
              "additionalProperties": {
                "type": "string"
              }
            },
            "service_accounts": {
              "type": "object",
              "default": {},
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "display_name": {
                    "type": "string",
                    "default": "Terraform-managed."
                  },
                  "iam_self_roles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "universe": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "domain",
                "prefix"
              ],
              "properties": {
                "domain": {
                  "type": "string"
                },
                "forced_jit_service_identities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "prefix": {
                  "type": "string"
                },
                "unavailable_service_identities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "vpc_sc": {
              "type": "object",
              "properties": {
                "perimeter_name": {
                  "type": "string"
                },
                "is_dry_run": {
                  "type": "boolean",
                  "default": false
                }
              },
              "required": [
                "perimeter_name"
              ]
            }
          }
        },
        "overrides": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "billing_account": {
              "type": "string"
            },
            "bucket": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "force_destroy": {
                  "type": "boolean"
                }
              }
            },
            "contacts": {
              "type": "object",
              "default": {},
              "additionalProperties": false,
              "patternProperties": {
                "^[a-z0-9_-]+$": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "deletion_policy": {
              "type": "string",
              "enum": [
                "PREVENT",
                "DELETE",
                "ABANDON"
              ]
            },
            "locations": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "bigquery": {
                  "type": "string"
                },
                "logging": {
                  "type": "string"
                },
                "storage": {
                  "type": "string"
                }
              }
            },
            "parent": {
              "type": "string"
            },
            "prefix": {
              "type": "string"
            },
            "service_encryption_key_ids": {
              "type": "object",
              "default": {},
              "additionalProperties": false,
              "patternProperties": {
                "^[a-z0-9_-]+$": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "tag_bindings": {
              "type": "object",
              "default": {},
              "additionalProperties": {
                "type": "string"
              }
            },
            "service_accounts": {
              "type": "object",
              "default": {},
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "display_name": {
                    "type": "string",
                    "default": "Terraform-managed."
                  },
                  "iam_self_roles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "universe": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "domain",
                "prefix"
              ],
              "properties": {
                "domain": {
                  "type": "string"
                },
                "forced_jit_service_identities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "prefix": {
                  "type": "string"
                },
                "unavailable_service_identities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "vpc_sc": {
              "type": "object",
              "properties": {
                "perimeter_name": {
                  "type": "string"
                },
                "is_dry_run": {
                  "type": "boolean",
                  "default": false
                }
              },
              "required": [
                "perimeter_name"
              ]
            }
          }
        }
      }
    },
    "vpcs": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "defaults": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "project_id": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "auto_create_subnetworks": {
              "type": "boolean"
            },
            "delete_default_routes_on_create": {
              "type": "boolean"
            },
            "mtu": {
              "type": "number",
              "minimum": 1460,
              "maximum": 1500
            },
            "routing_mode": {
              "type": "string",
              "enum": [
                "GLOBAL",
                "REGIONAL"
              ]
            },
            "firewall_policy_enforcement_order": {
              "type": "string",
              "enum": [
                "BEFORE_CLASSIC_FIREWALL",
                "AFTER_CLASSIC_FIREWALL"
              ]
            },
            "create_googleapis_routes": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "directpath": {
                  "type": "boolean"
                },
                "directpath-6": {
                  "type": "boolean"
                },
                "private": {
                  "type": "boolean"
                },
                "private-6": {
                  "type": "boolean"
                },
                "restricted": {
                  "type": "boolean"
                },
                "restricted-6": {
                  "type": "boolean"
                }
              }
            },
            "dns_policy": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "inbound": {
                  "type": "boolean"
                },
                "logging": {
                  "type": "boolean"
                },
                "outbound": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "private_ns": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "public_ns": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "ipv6_config": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "enable_ula_internal": {
                  "type": "boolean"
                },
                "internal_range": {
                  "type": "string"
                }
              }
            }
          }
        },
        "overrides": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "project_id": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "auto_create_subnetworks": {
              "type": "boolean"
            },
            "delete_default_routes_on_create": {
              "type": "boolean"
            },
            "mtu": {
              "type": "number",
              "minimum": 1460,
              "maximum": 1500
            },
            "routing_mode": {
              "type": "string",
              "enum": [
                "GLOBAL",
                "REGIONAL"
              ]
            },
            "firewall_policy_enforcement_order": {
              "type": "string",
              "enum": [
                "BEFORE_CLASSIC_FIREWALL",
                "AFTER_CLASSIC_FIREWALL"
              ]
            },
            "create_googleapis_routes": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "directpath": {
                  "type": "boolean"
                },
                "directpath-6": {
                  "type": "boolean"
                },
                "private": {
                  "type": "boolean"
                },
                "private-6": {
                  "type": "boolean"
                },
                "restricted": {
                  "type": "boolean"
                },
                "restricted-6": {
                  "type": "boolean"
                }
              }
            },
            "dns_policy": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "inbound": {
                  "type": "boolean"
                },
                "logging": {
                  "type": "boolean"
                },
                "outbound": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "private_ns": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "public_ns": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "ipv6_config": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "enable_ula_internal": {
                  "type": "boolean"
                },
                "internal_range": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "context": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "cidr_ranges_sets": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "custom_roles": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "email_addresses": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "folder_ids": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "kms_keys": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "iam_principals": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "locations": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "project_ids": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "storage_buckets": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "tag_keys": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "tag_values": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "tag_vars": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "projects": {
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "organization": {
              "type": "string"
            }
          }
        },
        "vpc_sc_perimeters": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "output_files": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "local_path": {
          "type": "string"
        },
        "storage_bucket": {
          "type": "string"
        }
      }
    }
  },
  "$defs": {
    "iam": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "^(?:roles/|\\$custom_roles:|organizations/[0-9]+/roles/|([a-z0-9.]+:)?projects/[a-z0-9-]+/roles/)": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^(?:domain:|group:|serviceAccount:|user:|principal:|principalSet:||\\$iam_principals:[a-z0-9_-]+)"
          }
        }
      }
    },
    "iam_bindings": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "^[a-z0-9_-]+$": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "members": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^(?:domain:|group:|serviceAccount:|user:|principal:|principalSet:|\\$iam_principals:[a-z0-9_-]+)"
              }
            },
            "role": {
              "type": "string",
              "pattern": "^(?:roles/|\\$custom_roles:|organizations/[0-9]+/roles/|([a-z0-9.]+:)?projects/[a-z0-9-]+/roles/)"
            },
            "condition": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "expression",
                "title"
              ],
              "properties": {
                "expression": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "iam_bindings_additive": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "^[a-z0-9_-]+$": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "member": {
              "type": "string",
              "pattern": "^(?:domain:|group:|serviceAccount:|user:|principal:|principalSet:|\\$iam_principals:[a-z0-9_-]+)"
            },
            "role": {
              "type": "string",
              "pattern": "^(?:roles/|\\$custom_roles:|organizations/[0-9]+/roles/|([a-z0-9.]+:)?projects/[a-z0-9-]+/roles/)"
            },
            "condition": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "expression",
                "title"
              ],
              "properties": {
                "expression": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "iam_by_principals": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "^(?:domain:|group:|serviceAccount:|user:|principal:|principalSet:|\\$iam_principals:[a-z0-9_-]+)": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^(?:roles/|\\$custom_roles:|organizations/[0-9]+/roles/|([a-z0-9.]+:)?projects/[a-z0-9-]+/roles/)"
          }
        }
      }
    }
  }
}
