wallix / awless

A Mighty CLI for AWS
http://awless.io/
Apache License 2.0
4.97k stars 263 forks source link

DNS hostnames setting for VPC. #184

Open skloeckner-inc opened 6 years ago

skloeckner-inc commented 6 years ago

I cannot set the option on a newly created VPC for DNS-Hostnames:

$ awless create vpc -h
Create a EC2 vpc

Usage:
  awless create vpc [param=value ...] [flags]

Params: 
  cidr..... The IPv4 network range for the VPC, in CIDR notation
  [name]... The 'Name' Tag for the VPC to create

Params patterns:
  cidr + [name]

Flags:
  -h, --help                   help for vpc
  -a, --prompt-all             Prompt all non-provided parameters
      --prompt-only-required   Prompt only required parameters

Global Flags:
  -p, --aws-profile string   Override AWS profile temporarily for the current command
  -r, --aws-region string    Override AWS region temporarily for the current command
      --color string         Force enabling/disabling colors in display (auto, never, always) (default "auto")
  -e, --extra-verbose        Turn on extra verbose mode (including regular verbose) for all commands
  -f, --force                Force the command and bypass confirmation prompts
  -l, --local                Work offline only using locally synced resources
      --no-sync              Do not run any sync on command
      --revert-in string     Schedule the revertion of this command
      --run-in string        Postpone the execution of this command
      --silent               Turn on silent mode for all commands: disable logging, etc...
  -v, --verbose              Turn on verbose mode for all commands

No options exists for me to manipulate this setting and it's stopping me from automating a publicly accessible RDS instance.

Would it be possible to add this in somehow? Or is there a parameter I'm missing?

I tried adding public=true to my RDS instances and it fails at creation:

[info]    KO create database
        InvalidVPCNetworkStateFault: Cannot create a publicly accessible DBInstance.  The specified VPC does not support DNS resolution, DNS hostnames, or both. Update the VPC and then try again
        status code: 400

After enabling DNS-Hostnames setting in the console, I can then resolve the public IP of the RDS instance from outside the VPC.

fxaguessy commented 6 years ago

Hello,

The call ModifyVpcAttribute is not yet bound into awless, so you can not yet set this option on VPC. We are currently doing a important design improvement on template compilation. Then, we might add this property to "update vpc".