Add optional BQ table as a file export config

This commit is contained in:
Arseny Chernov
2021-12-16 17:54:38 +08:00
parent 976fabdf86
commit b36688ec78
9 changed files with 199 additions and 3 deletions

View File

@@ -18,6 +18,7 @@ module "test" {
source = "../../../../cloud-operations/scheduled-asset-inventory-export-bq"
billing_account = var.billing_account
cai_config = var.cai_config
file_config = var.file_config
project_create = var.project_create
project_id = var.project_id
}

View File

@@ -32,6 +32,23 @@ variable "cai_config" {
}
}
variable "file_config" {
type = object({
bucket = string
filename = string
format = string
bq_dataset = string
bq_table = string
})
default = {
bucket = "my-bucket"
filename = "my-folder/myfile.json"
format = "NEWLINE_DELIMITED_JSON"
bq_dataset = "my-dataset"
bq_table = "my_table"
}
}
variable "project_create" {
type = bool

View File

@@ -23,5 +23,5 @@ FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture')
def test_resources(e2e_plan_runner):
"Test that plan works and the numbers of resources is as expected."
modules, resources = e2e_plan_runner(FIXTURES_DIR)
assert len(modules) == 5
assert len(resources) == 23
assert len(modules) == 7
assert len(resources) == 28