dtan4 / terraforming

Export existing AWS resources to Terraform style (tf, tfstate) / No longer actively maintained
http://terraforming.dtan4.net/
MIT License
4.29k stars 659 forks source link

terraforming efs cause SocketError #372

Closed koooge closed 7 years ago

koooge commented 7 years ago

Hello. Thank you sharing very useful tool. I report SocketError encountered.

$ terraforming efs --profile default
/Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.6.0/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call': Encountered a `SocketError` while attempting to connect to: (Aws::Errors::NoSuchEndpointError)

  https://elasticfilesystem.ap-northeast-1.amazonaws.com/2015-02-01/file-systems

This is typically the result of an invalid `:region` option or a
poorly formatted `:endpoint` option.

* Avoid configuring the `:endpoint` option directly. Endpoints are constructed
  from the `:region`. The `:endpoint` option is reserved for connecting to
  non-standard test endpoints.

* Not every service is available in every region.

* Never suffix region names with availability zones.
  Use "us-east-1", not "us-east-1a"

Known AWS regions include (not specific to this service):

ap-northeast-1
ap-northeast-2
ap-south-1
ap-southeast-1
ap-southeast-2
ca-central-1
eu-central-1
eu-west-1
eu-west-2
sa-east-1
us-east-1
us-east-2
us-west-1
us-west-2
cn-north-1
us-gov-west-1
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/plugins/idempotency_token.rb:17:in `call'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/plugins/param_converter.rb:24:in `call'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/plugins/response_paging.rb:10:in `call'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.6.0/lib/seahorse/client/plugins/response_target.rb:23:in `call'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.6.0/lib/seahorse/client/request.rb:70:in `send_request'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/aws-sdk-efs-1.0.0/lib/aws-sdk-efs/client.rb:840:in `describe_file_systems'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/terraforming-0.15.0/lib/terraforming/resource/efs_file_system.rb:52:in `file_systems'
    from (erb):1:in `apply_template'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/2.4.0/erb.rb:896:in `eval'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/2.4.0/erb.rb:896:in `result'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/terraforming-0.15.0/lib/terraforming/util.rb:4:in `apply_template'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/terraforming-0.15.0/lib/terraforming/resource/efs_file_system.rb:19:in `tf'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/terraforming-0.15.0/lib/terraforming/resource/efs_file_system.rb:7:in `tf'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/terraforming-0.15.0/lib/terraforming/cli.rb:250:in `tf'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/terraforming-0.15.0/lib/terraforming/cli.rb:237:in `execute'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/terraforming-0.15.0/lib/terraforming/cli.rb:64:in `efs'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
    from /Users/koooge/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/terraforming-0.15.0/bin/terraforming:5:in `<top (required)>'
    from /Users/koooge/.rbenv/versions/2.4.2/bin/terraforming:23:in `load'
    from /Users/koooge/.rbenv/versions/2.4.2/bin/terraforming:23:in `<main>'
dtan4 commented 7 years ago

EFS is available at limited region now. https://aws.amazon.com/efs/pricing/?nc1=h_ls

image

If your AWS_REGION points to the region where EFS hasn't been released (e.g., ap-northeast-1), this error will be raised. Please specify the correct region by AWS_REGION or --region option.

Thanks!