lib/kontena/cli/master/aws/create_command.rb in kontena-cli-0.10.3 vs lib/kontena/cli/master/aws/create_command.rb in kontena-cli-0.11.0
- old
+ new
@@ -1,5 +1,7 @@
+require 'securerandom'
+
module Kontena::Cli::Master::Aws
class CreateCommand < Clamp::Command
include Kontena::Cli::Common
option "--access-key", "ACCESS_KEY", "AWS access key ID", required: true
@@ -10,10 +12,12 @@
option "--zone", "ZONE", "EC2 Availability Zone", default: 'a'
option "--vpc-id", "VPC ID", "Virtual Private Cloud (VPC) ID"
option "--subnet-id", "SUBNET ID", "VPC option to specify subnet to launch instance into"
option "--type", "SIZE", "Instance type", default: 't2.small'
option "--storage", "STORAGE", "Storage size (GiB)", default: '30'
+ option "--vault-secret", "VAULT_SECRET", "Secret key for Vault"
+ option "--vault-iv", "VAULT_IV", "Initialization vector for Vault"
option "--version", "VERSION", "Define installed Kontena version", default: 'latest'
option "--auth-provider-url", "AUTH_PROVIDER_URL", "Define authentication provider url"
def execute
require 'kontena/machine/aws'
@@ -26,10 +30,12 @@
subnet: subnet_id,
ssl_cert: ssl_cert,
storage: storage,
version: version,
key_pair: key_pair,
- auth_server: auth_provider_url
+ auth_server: auth_provider_url,
+ vault_secret: vault_secret || SecureRandom.hex(24),
+ vault_iv: vault_iv || SecureRandom.hex(24)
)
end
end
end