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_slb_load_balancer closes #307 #321

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_slb_load_balancer [] PRETEST: tests/alicloud_slb_load_balancer TEST: tests/alicloud_slb_load_balancer Running terraform data.alicloud_caller_identity.current: Reading... data.alicloud_caller_identity.current: Read complete after 2s [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_slb_load_balancer.named_test_resource will be created + resource "alicloud_slb_load_balancer" "named_test_resource" { + address = (known after apply) + address_type = "intranet" + delete_protection = "off" + id = (known after apply) + instance_charge_type = "PayBySpec" + internet = (known after apply) + load_balancer_name = "turbottest60401" + load_balancer_spec = "slb.s2.small" + master_zone_id = (known after apply) + modification_protection_status = (known after apply) + name = (known after apply) + payment_type = (known after apply) + resource_group_id = (known after apply) + slave_zone_id = (known after apply) + specification = (known after apply) + status = (known after apply) + tags = { + "info" = "create for internet" } + vswitch_id = (known after apply) } # alicloud_vpc.named_test_resource will be created + resource "alicloud_vpc" "named_test_resource" { + cidr_block = "10.0.0.0/8" + id = (known after apply) + ipv6_cidr_block = (known after apply) + name = "turbottest60401" + 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_vswitch.named_test_resource will be created + resource "alicloud_vswitch" "named_test_resource" { + availability_zone = "us-east-1b" + cidr_block = "10.10.0.0/20" + id = (known after apply) + name = "turbottest60401" + status = (known after apply) + vpc_id = (known after apply) + vswitch_name = (known after apply) + zone_id = (known after apply) } Plan: 3 to add, 0 to change, 0 to destroy. Changes to Outputs: + account_id = "5982111499156037" + resource_address = (known after apply) + resource_id = (known after apply) + resource_name = "turbottest60401" + vpc_id = (known after apply) alicloud_vpc.named_test_resource: Creating... alicloud_vpc.named_test_resource: Creation complete after 8s [id=vpc-0xitrx79adefxybzdfv1r] alicloud_vswitch.named_test_resource: Creating... alicloud_vswitch.named_test_resource: Creation complete after 8s [id=vsw-0xilfx2cgygkeiv6zk9sm] alicloud_slb_load_balancer.named_test_resource: Creating... alicloud_slb_load_balancer.named_test_resource: Still creating... [10s elapsed] alicloud_slb_load_balancer.named_test_resource: Creation complete after 17s [id=lb-7gojjt3v45rkyrjicsk6a] 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 27, in resource "alicloud_vpc" "named_test_resource": 27: resource "alicloud_vpc" "named_test_resource" { (and 2 more similar warnings elsewhere) Warning: "name": [DEPRECATED] Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead. with alicloud_vswitch.named_test_resource, on variables.tf line 32, in resource "alicloud_vswitch" "named_test_resource": 32: resource "alicloud_vswitch" "named_test_resource" { (and 2 more similar warnings elsewhere) Warning: "availability_zone": [DEPRECATED] Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead. with alicloud_vswitch.named_test_resource, on variables.tf line 32, in resource "alicloud_vswitch" "named_test_resource": 32: resource "alicloud_vswitch" "named_test_resource" { (and 2 more similar warnings elsewhere) Apply complete! Resources: 3 added, 0 changed, 0 destroyed. Outputs: account_id = "5982111499156037" resource_address = "10.10.7.112" resource_id = "lb-7gojjt3v45rkyrjicsk6a" resource_name = "turbottest60401" vpc_id = "vpc-0xitrx79adefxybzdfv1r" Running SQL query: test-get-query.sql [ { "load_balancer_id": "lb-7gojjt3v45rkyrjicsk6a", "load_balancer_name": "turbottest60401", "load_balancer_status": "active", "vpc_id": "vpc-0xitrx79adefxybzdfv1r" } ] ✔ PASSED Running SQL query: test-list-query.sql [ { "address": "10.10.7.112", "load_balancer_id": "lb-7gojjt3v45rkyrjicsk6a", "load_balancer_name": "turbottest60401" } ] ✔ PASSED Running SQL query: test-not-found-query.sql null ✔ PASSED Running SQL query: test-turbot-query.sql [ { "load_balancer_name": "turbottest60401", "title": "turbottest60401" } ] ✔ PASSED TEARDOWN: tests/alicloud_slb_load_balancer SUMMARY: 1/1 passed. ```

Example query results

Results ``` > select * from alicloud_slb_load_balancer +--------------------+--------------------------+----------------------+------------+--------------+---------------------------+---------------------------+--------------+----------------+---------------+----------------------+---------------------------+--------------- | load_balancer_name | load_balancer_id | load_balancer_status | address | address_type | v_switch_id | vpc_id | network_type | master_zone_id | slave_zone_id | internet_charge_type | create_time | create_time_st +--------------------+--------------------------+----------------------+------------+--------------+---------------------------+---------------------------+--------------+----------------+---------------+----------------------+---------------------------+--------------- | turbottest51736 | lb-7go39a3fg3illapihbc5n | active | 10.10.6.26 | intranet | vsw-0xi9rggvpdezmbm3dzt9g | vpc-0xiufx7nfhcn0sah1j6pk | | us-east-1a | us-east-1b | 4 | 2023-01-19T19:41:00+05:30 | 1674108718000 | turbottest51736 | lb-7go39a3fg3illapihbc5n | active | 10.10.6.26 | intranet | vsw-0xi9rggvpdezmbm3dzt9g | vpc-0xiufx7nfhcn0sah1j6pk | | us-east-1a | us-east-1b | 4 | 2023-01-19T19:41:00+05:30 | 1674108718000 | turbottest51736 | lb-7go39a3fg3illapihbc5n | active | 10.10.6.26 | intranet | vsw-0xi9rggvpdezmbm3dzt9g | vpc-0xiufx7nfhcn0sah1j6pk | | us-east-1a | us-east-1b | 4 | 2023-01-19T19:41:00+05:30 | 1674108718000 +--------------------+--------------------------+----------------------+------------+--------------+---------------------------+---------------------------+--------------+----------------+---------------+----------------------+---------------------------+---------- ```