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 5 forks source link

Alibaba plugin support for profile connection #405

Closed jzhuuuu closed 2 months ago

jzhuuuu commented 4 months ago

Is your feature request related to a problem? Please describe.

add support for alibaba plugin support multi-account connection configuration with profile(similar to AWS)?

currently if there are many alibaba accounts, you have to add them all and have separate aksk for each of them.

instead of add aksk for each connection, add a aksk for the main account and add the profile for the other sub-account. just like AWS plugin's profile connection configuration

Describe the solution you'd like similar to AWS profile connection configuration

jzhuuuu commented 4 months ago

hi team, are we going to have an estimate about when this feature will be added?

ParthaI commented 4 months ago

Hello @jzhuuuu, we are currently working on it. Will update you once it is over. Thanks!

ParthaI commented 4 months ago

Hi @jzhuuuu,

I have initiated a draft PR to address this issue.

Overview of Changes

Profile Credential Status Region Language
default AK: ***t1u Valid ap-south-1 en
ramRoleArn RamRoleArn: ***g3D Valid cn-hangzhou en
stsTokenProfile* StsToken: ***KpC Valid cn-hangzhou en
ecsRole EcsRamRole: acs:ram::****:role/ecs-trust Valid cn-hangzhou en

It would be great if you want to test these changes on the PR branch (issue-405) and share your feedback.

Steps to Build the Plugin Locally

Follow these steps to build the plugin with the code changes from the PR branch:

Thank you!

zhujian0805 commented 4 months ago

Thanks! will start to test it.

zhujian0805 commented 3 months ago

hi @ParthaI, I followed the instruction and got this error: `> select * from cf.alicloud_vpc;

Error: cf: unsupported authentication mode 'ChainableRamRoleArn' (SQLSTATE HV000)

+------+-----+--------+--------+---------------+------------+-----------------+------------+-------------+------------+-----------------+-------------------+------------+----------+--------------------------+-------------------+---------------------+-------------------------+-----> | name | arn | vpc_id | status | creation_time | cidr_block | ipv6_cidr_block | vrouter_id | description | is_default | network_acl_num | resource_group_id | cen_status | owner_id | support_advanced_feature | advanced_resource | dhcp_options_set_id | dhcp_options_set_status | asso> +------+-----+--------+--------+---------------+------------+-----------------+------------+-------------+------------+-----------------+-------------------+------------+----------+--------------------------+-------------------+---------------------+-------------------------+-----> +------+-----+--------+--------+---------------+------------+-----------------+------------+-------------+------------+-----------------+-------------------+------------+----------+--------------------------+-------------------+---------------------+-------------------------+-----> `

zhujian0805 commented 3 months ago

aliyun cli works as expected

ParthaI commented 3 months ago

@zhujian0805, originally, our main objective was to incorporate support for various profile modes such as:

However, I've now made additional updates to the same branch issue-405 to include support for the ChainableRamRoleArn profile mode.

Could you please pull the latest changes from the issue-405 branch into your local environment, build the plugin locally, and re-run the query?

Thanks!

zhujian0805 commented 3 months ago

@ParthaI I have tested and confirm it work as expected. Thanks so much.

can you cut a release for it?

ParthaI commented 3 months ago

Thank you @zhujian0805 for your confirmation. This PR is currently undergoing the review process. I will consult with the team regarding the next steps afterward.

zhujian0805 commented 3 months ago

@ParthaI any updates on this?

ParthaI commented 3 months ago

Hi @zhujian0805, sorry, it is still under review. It may be released early next week. Thanks!