Add optional BQ table as a file export config
This commit is contained in:
Binary file not shown.
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user