class GeoEngineer::Resources::AwsEip
Currently geo can't create EIPs - only codify existing ones It does this by requiring the '_public_ip' attribute and hard-coding the '_geo_id' to that
Public Class Methods
_fetch_remote_resources(provider)
click to toggle source
# File lib/geoengineer/resources/aws_eip.rb, line 36 def self._fetch_remote_resources(provider) AwsClients.ec2(provider).describe_addresses['addresses'].map(&:to_h).map do |address| address[:_terraform_id] = address[:allocation_id] address[:_geo_id] = address[:public_ip] address end end
Public Instance Methods
validate_instance_or_network_interface()
click to toggle source
Can't associate both an instance and a network interface with an elastic IP
# File lib/geoengineer/resources/aws_eip.rb, line 17 def validate_instance_or_network_interface errors = [] unless instance.nil? || network_interface.nil? errors << "Must associate and Elastic IP with either and EC2 instance or a network interface" end errors end
vpc()
click to toggle source
Always create within a VPC
# File lib/geoengineer/resources/aws_eip.rb, line 32 def vpc true end