outscale / packer-plugin-outscale

Packer plugin for Outscale OMI Builder
https://www.packer.io/docs/builders/outscale
Mozilla Public License 2.0
6 stars 13 forks source link

New AK/SK environment variables and configuration files #15

Open RomLecat opened 3 years ago

RomLecat commented 3 years ago

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

Outscale does now have a standard of environment variables and config files for its API configuration that we'd like to see implemented in Packer to have a consistent scheme between all Outscale tools.

This is the new environment variables:

Name Type Example Description
OSC_ACCESS_KEY string F4K4T706S9XKGIABNWB9 Access Key
OSC_SECRET_KEY string E4XJE8EJ98ZEJ18E4J9ZE84J19Q8E1J9S87ZEZEJ5E41K Secret Key
OSC_X509_CLIENT_CERT string /etc/secret/client.crt Full path to client certificate (.crt, public part)
OSC_X509_CLIENT_KEY string /etc/secret/client.key Full path to client key related to certificate (.key, secret part)
OSC_PROTOCOL string https Protocol to use: https (default) or http
OSC_METHOD string post HTTP method to use: "post" or "get" (default is "post")
OSC_REGION string eu-west-2  
OSC_ENDPOINT_API string api.eu-west-2.outscale.com/api/v1 Endpoint of Outscale API (without protocol)
OSC_PROFILE string default Profile to use in configuration file (default is "default")

(Those AK/SK are example only and not tied to any account, no worries) The configuration file is located in ~/.osc/config.json and looks like this:

{
  "default": {
    "access_key": "xxxx",
    "secret_key": "xxxx",
    "x509_client_cert": "/etc/secret/client.crt",
    "x509_client_cert": "/etc/secret/client.key",
    "protocol": "https",
    "method": "post",
    "region": "us-east-2"
    "endpoints": {
      "api": "api.eu-west-2.outscale.com/api/v1"
    }
  }
}

The new environment variables should be evaluated first, with a fallback to the legacy (current) ones if they're not defined. A new profile setting should also be added to Packer configuration to define which profile needs to be used in the config file (if config file is used), and would be set to "default" if the field is omitted.

RomLecat commented 2 years ago

Hello,

Any update on this one ?

outscale-mdr commented 2 years ago

Hello @RomLecat,

We currently don't have any estimated date for the next release. The next release will include this enhancement.