%h1
  Amazon EC2 Configuration

%p
  Amazon EC2 allows you to easily run instances of your appliance on Amazon's webservers.

%h2 Roles and permissions
%p
  To upload your appliances to Amazon EC2, the Open Build Service requires permission to run EC2 instances.
  This may incur costs,
  %a{ href: 'https://aws.amazon.com/partners/suse/' }
    read Amazon's price list
  for details.
%p
  %ul
    %li
      Go to
      %i
        IAM -> Roles -> Create role
      and select
      %i
        Another AWS Account.
    %li
      Enter
      %b
        = @aws_account_id
      as
      %i
        Account ID.
    %li
      Select option
      %i
        Require external ID
      and enter
      %b
        = @ec2_configuration.external_id
      as External ID.
    %li
      Attach
      %i
        AmazonEC2FullAccess
      permission policy and create the role.

.container
  .row.grid_8
    = form_for @ec2_configuration, url: cloud_ec2_configuration_path, method: :put do
      = label_tag(:ec2_configuration, 'Please enter now the obtained')
      %b
        Amazon Resouce Name (ARN):
      .row.grid_12{ style: "margin-top: 8px;margin-bottom: 8px;" }
        = text_field :ec2_configuration, :arn, value: @ec2_configuration.arn, size: 40
      .row
        = submit_tag "Submit"
