def create
      if current_command == "addons:add"
        deprecate("`heroku #{current_command}` has been deprecated. Please use `heroku addons:create` instead.")
      end

      requires_preauth

      service_plan = expand_hpg_shorthand(args.shift)

      raise CommandFailed.new("Missing requested service or plan") if service_plan.nil? || %w{--fork --follow --rollback}.include?(service_plan)

      config = parse_options(args)
      raise CommandFailed.new("Unexpected arguments: #{args.join(' ')}") unless args.empty?

      addon = request(
        :body     => json_encode({
          "attachment" => { "name" => options[:as] },
          "config"     => config,
          "name"       => options[:name],
          "confirm"    => options[:confirm],
          "plan"       => { "name" => service_plan }
        }),
        :headers  => {
          # Temporary hack for getting provider messages while a cleaner
          # endpoint is designed to communicate this data.
          #
          # WARNING: Do not depend on this having any effect permanently.
          "Accept-Expansion" => "plan",
          "X-Heroku-Legacy-Provider-Messages" => "true"
        },
        :expects  => 201,
        :method   => :post,
        :path     => "/apps/#{app}/addons"
      )
      @status = "(#{format_price addon['plan']['price']})" if addon['plan'].has_key?('price')

      action("Creating #{addon['name'].downcase}") {}
      action("Adding #{addon['name'].downcase} to #{app}") {}

      if addon['config_vars'].any?
        action("Setting #{addon['config_vars'].join(', ')} and restarting #{app}") do
          @status = api.get_release(app, 'current').body['name']
        end
      end

      display addon['provision_message'] unless addon['provision_message'].to_s.strip == ""

      display("Use `heroku addons:docs #{addon['addon_service']['name']}` to view documentation.")
    end
def create
      if current_command == "addons:add"
        deprecate("`heroku #{current_command}` has been deprecated. Please use `heroku addons:create` instead.")
      end

      requires_preauth

      service_plan = expand_hpg_shorthand(args.shift)

      raise CommandFailed.new("Missing requested service or plan") if service_plan.nil? || %w{--fork --follow --rollback}.include?(service_plan)

      config = parse_options(args)
      raise CommandFailed.new("Unexpected arguments: #{args.join(' ')}") unless args.empty?

      addon = request(
        :body     => json_encode({
          "attachment" => { "name" => options[:as] },
          "config"     => config,
          "name"       => options[:name],
          "confirm"    => options[:confirm],
          "plan"       => { "name" => service_plan }
        }),
        :headers  => {
          # Temporary hack for getting provider messages while a cleaner
          # endpoint is designed to communicate this data.
          #
          # WARNING: Do not depend on this having any effect permanently.
          "Accept-Expansion" => "plan",
          "X-Heroku-Legacy-Provider-Messages" => "true"
        },
        :expects  => 201,
        :method   => :post,
        :path     => "/apps/#{app}/addons"
      )
      @status = "(#{format_price addon['plan']['price']})" if addon['plan'].has_key?('price')

      action("Creating #{addon['name'].downcase}") {}
      action("Adding #{addon['name'].downcase} to #{app}") {}

      if addon['config_vars'].any?
        action("Setting #{addon['config_vars'].join(', ')} and restarting #{app}") do
          @status = api.get_release(app, 'current').body['name']
        end
      end

      display addon['provision_message'] unless addon['provision_message'].to_s.strip == ""

      display("Use `heroku addons:docs #{addon['addon_service']['name']}` to view documentation.")
    end
addons:create SERVICE:PLAN

 create an add-on resource

 --name ADDON_NAME       # (optional) name for the add-on resource
 --as ATTACHMENT_NAME    # (optional) name for the initial add-on attachment
 --confirm APP_NAME      # (optional) ovewrite existing config vars or existing add-on attachments