turbot / steampipe-plugin-alicloud

Use SQL to instantly query Alibaba Cloud resources across regions and accounts. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/alicloud
Apache License 2.0
12 stars 6 forks source link

Add table alicloud_vpc_flow_log closes #304 #312

Closed ParthaI closed 1 year ago

ParthaI commented 1 year ago

Integration test logs

Logs ``` No env file present for the current environment: staging Falling back to .env config No env file present for the current environment: staging customEnv TURBOT_TEST_EXPECTED_TIMEOUT undefined SETUP: tests/alicloud_vpc_flow_log [] PRETEST: tests/alicloud_vpc_flow_log TEST: tests/alicloud_vpc_flow_log Running terraform data.alicloud_caller_identity.current: Reading... data.alicloud_caller_identity.current: Read complete after 1s [id=295372922530649815] data.null_data_source.resource: Reading... data.null_data_source.resource: Read complete after 0s [id=static] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # alicloud_vpc.named_test_resource will be created + resource "alicloud_vpc" "named_test_resource" { + cidr_block = "192.168.0.0/24" + id = (known after apply) + ipv6_cidr_block = (known after apply) + name = "turbottest18893" + resource_group_id = (known after apply) + route_table_id = (known after apply) + router_id = (known after apply) + router_table_id = (known after apply) + secondary_cidr_blocks = (known after apply) + status = (known after apply) + vpc_name = (known after apply) } # alicloud_vpc_flow_log.named_test_resource will be created + resource "alicloud_vpc_flow_log" "named_test_resource" { + flow_log_name = "turbottest18893" + id = (known after apply) + log_store_name = "turbottest18893" + project_name = "turbottest18893" + resource_id = (known after apply) + resource_type = "VPC" + status = "Active" + traffic_type = "All" } Plan: 2 to add, 0 to change, 0 to destroy. Changes to Outputs: + account_id = "5982111499156037" + resource_aka = (known after apply) + resource_id = (known after apply) + resource_name = "turbottest18893" + router_id = (known after apply) + vpc_id = (known after apply) alicloud_vpc.named_test_resource: Creating... alicloud_vpc.named_test_resource: Creation complete after 8s [id=vpc-0xi3y1g8568vtysi14ncy] alicloud_vpc_flow_log.named_test_resource: Creating... alicloud_vpc_flow_log.named_test_resource: Creation complete after 6s [id=fl-0xicqln8ag513krk9psek] Warning: Deprecated with data.null_data_source.resource, on variables.tf line 20, in data "null_data_source" "resource": 20: data "null_data_source" "resource" { The null_data_source was historically used to construct intermediate values to re-use elsewhere in configuration, the same can now be achieved using locals (and one more similar warning elsewhere) Warning: "name": [DEPRECATED] Field 'name' has been deprecated from provider version 1.119.0. New field 'vpc_name' instead. with alicloud_vpc.named_test_resource, on variables.tf line 26, in resource "alicloud_vpc" "named_test_resource": 26: resource "alicloud_vpc" "named_test_resource" { (and 2 more similar warnings elsewhere) Warning: Quoted references are deprecated on variables.tf line 32, in resource "alicloud_vpc_flow_log" "named_test_resource": 32: depends_on = ["alicloud_vpc.named_test_resource"] In this context, references are expected literally rather than in quotes. Terraform 0.11 and earlier required quotes, but quoted references are now deprecated and will be removed in a future version of Terraform. Remove the quotes surrounding this reference to silence this warning. Apply complete! Resources: 2 added, 0 changed, 0 destroyed. Outputs: account_id = "5982111499156037" resource_aka = "acs:vpc:us-east-1:5982111499156037:flowlog/fl-0xicqln8ag513krk9psek" resource_id = "fl-0xicqln8ag513krk9psek" resource_name = "turbottest18893" router_id = "vrt-0xiy2gixw5e1570u3w477" vpc_id = "vpc-0xi3y1g8568vtysi14ncy" Running SQL query: test-get-query.sql [ { "flow_log_id": "fl-0xicqln8ag513krk9psek", "name": "turbottest18893" } ] ✔ PASSED Running SQL query: test-list-query.sql [ { "flow_log_id": "fl-0xicqln8ag513krk9psek", "name": "turbottest18893" } ] ✔ PASSED Running SQL query: test-not-found-query.sql null ✔ PASSED Running SQL query: test-turbot-query.sql [ { "akas": [ "acs:vpc:us-east-1:5982111499156037:flowlog/fl-0xicqln8ag513krk9psek" ], "title": "turbottest18893" } ] ✔ PASSED POSTTEST: tests/alicloud_vpc_flow_log TEARDOWN: tests/alicloud_vpc_flow_log SUMMARY: 1/1 passed. ```

Example query results

Results ``` > select * from alicloud_vpc_flow_log +-----------------+--------------------------+-------------+---------------------------+---------------+---------------------------+-----------------+-----------------+--------+--------------+-----------------+------------------------------------------------------------ | name | flow_log_id | description | creation_time | resource_type | resource_id | project_name | log_store_name | status | traffic_type | title | akas +-----------------+--------------------------+-------------+---------------------------+---------------+---------------------------+-----------------+-----------------+--------+--------------+-----------------+------------------------------------------------------------ | turbottest69263 | fl-0xirv7cjsd6dg7l9wyw4q | | 2023-01-11T12:00:00+05:30 | VPC | vpc-0xi8jwyw1hi1nozeexwrv | turbottest69263 | turbottest69263 | Active | All | turbottest69263 | ["acs:vpc:us-east-1:5982111499156037:flowlog/fl-0xirv7cjsd6 +-----------------+--------------------------+-------------+---------------------------+---------------+---------------------------+-----------------+-----------------+--------+--------------+-----------------+------------------------------------------------------------ ```