class GeoEngineer::Resources::AwsCloudwatchEventRule

AwsCloudwatchEventRule is the aws_cloudwatch_event_rule terrform resource,

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

Public Class Methods

_fetch_remote_resources(provider) click to toggle source
# File lib/geoengineer/resources/aws_cloudwatch_event_rule.rb, line 23
def self._fetch_remote_resources(provider)
  AwsClients
    .cloudwatchevents(provider)
    .list_rules.rules.map(&:to_h).map do |cloudwatch_event_rule|
    cloudwatch_event_rule.merge(
      {
        _terraform_id: cloudwatch_event_rule[:name],
        _geo_id: cloudwatch_event_rule[:name]
      }
    )
  end
end

Public Instance Methods

support_tags?() click to toggle source
# File lib/geoengineer/resources/aws_cloudwatch_event_rule.rb, line 19
def support_tags?
  false
end
validate_schedule_or_event() click to toggle source
# File lib/geoengineer/resources/aws_cloudwatch_event_rule.rb, line 10
def validate_schedule_or_event
  return if !self[:schedule_expression] && self[:event_pattern]
  return if self[:schedule_expression] && !self[:event_pattern]
  ["#{self.id}: Need either schedule_expression or event_pattern defined"]
end