Closed abhaysrivastava-orange closed 3 years ago
@abhaysrivastava-orange could you try to set the credentials in a URL, e.g. https://username:password@example.com/file.img?
@ShiChangkuo Thanks its working fine for me.
@ShiChangkuo From this above solution we are able to create image in glance but its only 12kb size although qcow2 size is 1.5G. That's why from this new image its created faulty instance.
As well as I want to inform that I am picking qcow2 image from my flexible engine bucket. So i used accesskey and secret key
@abhaysrivastava-orange does huaweicloud_images_image meet your needs?
If yes, I will try to implement a new resource in flexible engine.
@ShiChangkuo In huaweicloud_images_image also how can we provide access_key and secret_key of obs bucket There is no option.
access_key and secret_key are unnecessary because the bucket belongs to you. for more details, please refer to https://docs.prod-cloud-ocb.orange-business.com/api/ims/en-us_topic_0037131984.html
@ShiChangkuo In my case bucket is not belong to me I have to fetch image from other user bucket so I need to provide access_key and secret_key
Do you mean you want to fetch the image with others AK/SK?
@ShiChangkuo yes other ak/sk and I have those as/sk. But need to insert in terraform
can the bucket owner add a policy that allows you to fetch the image file? then you can download it without authorization. I think it's more safer.
@ShiChangkuo Yes but if they make it public then it will be public for all. So anyhow we need to pass ak.sk while download. Is it possible to give ak/sk in this terraform module "flexibleengine_images_image_v2" or I will think on different approach.
@abhaysrivastava-orange AK/SK is only an authorization method, but we cannot cover all situations where the image file can be obtained through authorization.
Maybe you can download it manually, then try to use local_file_path
in "flexibleengine_images_image_v2".
@ShiChangkuo Thanks
Hi there,
In module "flexibleengine_images_image_v2" if we need to provide credentials for image_source_url url then there is no option to provide it.