class Serverkit::Resources::CloudFrontWebDistribution

Constants

DEFAULT_DISTRIBUTION_CONFIG

Public Instance Methods

apply() click to toggle source

@note Override

# File lib/serverkit/resources/cloud_front_web_distribution.rb, line 36
def apply
  client.create_distribution(
    distribution_config: DEFAULT_DISTRIBUTION_CONFIG.deep_merge(
      distribution_config.deep_symbolize_keys,
    )
  )
rescue ::Aws::CloudFront::Errors::DistributionAlreadyExists
end
check() click to toggle source

@note Override

# File lib/serverkit/resources/cloud_front_web_distribution.rb, line 46
def check
  false
end
recheck() click to toggle source

@note Override

# File lib/serverkit/resources/cloud_front_web_distribution.rb, line 51
def recheck
  true
end

Private Instance Methods

client() click to toggle source

@return [Aws::Cloudfront::Client]

# File lib/serverkit/resources/cloud_front_web_distribution.rb, line 58
def client
  @client ||= ::Aws::CloudFront::Client.new(client_options)
end