class GeoEngineer::Resources::AwsVpcDhcpOptionsAssociation

AwsVpcDhcpOptionsAssociation is the aws_vpc_dhcp_options_association terrform resource,

{www.terraform.io/docs/providers/aws/r/vpc_dhcp_options_association.html Terraform Docs}

Public Class Methods

_fetch_remote_resources(provider) click to toggle source
# File lib/geoengineer/resources/aws_vpc_dhcp_options_association.rb, line 26
def self._fetch_remote_resources(provider)
  AwsClients
    .ec2(provider)
    .describe_vpcs['vpcs']
    .map(&:to_h)
    .select { |vpc| vpc[:dhcp_options_id] }
    .map do |vpc|
      {
        vpc_id: vpc[:vpc_id],
        dhcp_options_id: vpc[:dhcp_options_id],
        _terraform_id: "#{vpc[:dhcp_options_id]}-#{vpc[:vpc_id]}"
      }
    end
end

Public Instance Methods

support_tags?() click to toggle source
# File lib/geoengineer/resources/aws_vpc_dhcp_options_association.rb, line 22
def support_tags?
  false
end
to_terraform_state() click to toggle source
# File lib/geoengineer/resources/aws_vpc_dhcp_options_association.rb, line 13
def to_terraform_state
  tfstate = super
  tfstate[:primary][:attributes] = {
    'vpc_id' => vpc_id,
    'dhcp_options_id' => dhcp_options_id
  }
  tfstate
end