# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html
module CloudFormer
  module EC2
    class Instance < Resource
      autoload :ElasticGpuSpecification, 'cloud_former/resource_properties/ec2/instance/elastic_gpu_specification'
      autoload :NetworkInterface, 'cloud_former/resource_properties/ec2/instance/network_interface'
      autoload :InstanceIpv6Address, 'cloud_former/resource_properties/ec2/instance/instance_ipv6_address'
      autoload :Volume, 'cloud_former/resource_properties/ec2/instance/volume'
      autoload :AssociationParameter, 'cloud_former/resource_properties/ec2/instance/association_parameter'
      autoload :Ebs, 'cloud_former/resource_properties/ec2/instance/ebs'
      autoload :NoDevice, 'cloud_former/resource_properties/ec2/instance/no_device'
      autoload :SsmAssociation, 'cloud_former/resource_properties/ec2/instance/ssm_association'
      autoload :CreditSpecification, 'cloud_former/resource_properties/ec2/instance/credit_specification'
      autoload :BlockDeviceMapping, 'cloud_former/resource_properties/ec2/instance/block_device_mapping'
      autoload :PrivateIpAddressSpecification, 'cloud_former/resource_properties/ec2/instance/private_ip_address_specification'

      aws_property :additional_info, type: String
      aws_property :affinity, type: String
      aws_property :availability_zone, type: String
      aws_property :block_device_mappings, type: Instance::BlockDeviceMapping, list: true, embed: true
      aws_property :credit_specification, type: Instance::CreditSpecification, embed: true
      aws_property :disable_api_termination, type: Boolean
      aws_property :ebs_optimized, type: Boolean
      aws_property :elastic_gpu_specifications, type: Instance::ElasticGpuSpecification, list: true, embed: true
      aws_property :host_id, type: String
      aws_property :iam_instance_profile, type: String
      aws_property :image_id, type: String, required: true
      aws_property :instance_initiated_shutdown_behavior, type: String
      aws_property :instance_type, type: String
      aws_property :ipv6_address_count, type: Integer
      aws_property :ipv6_addresses, type: Instance::InstanceIpv6Address, list: true, embed: true
      aws_property :kernel_id, type: String
      aws_property :key_name, type: String
      aws_property :monitoring, type: Boolean
      aws_property :network_interfaces, type: Instance::NetworkInterface, list: true, embed: true
      aws_property :placement_group_name, type: String
      aws_property :private_ip_address, type: String
      aws_property :ramdisk_id, type: String
      aws_property :security_group_ids, type: String, list: true
      aws_property :security_groups, type: String, list: true
      aws_property :source_dest_check, type: Boolean
      aws_property :ssm_associations, type: Instance::SsmAssociation, list: true, embed: true
      aws_property :subnet_id, type: String
      aws_property :tags, type: Tag, list: true, embed: true
      aws_property :tenancy, type: String
      aws_property :user_data, type: String
      aws_property :volumes, type: Instance::Volume, list: true, embed: true
    end
  end
end
