AWSConfig/AWS-Config-OPA/cfn_templates/config_rules/opa-ebs-attachment.yaml [24:51]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  OpaPolicyRuleToEval:
    Description: The rule from your OPA policy which will be evaluated
    Type: String
    Default: compliant

Resources:
  OpaConfigRule:
    Type: AWS::Config::ConfigRule
    Properties:
      InputParameters:
        ASSETS_BUCKET: !Ref AssetsBucket
        REGO_POLICIES_PREFIX: !Ref OpaPoliciesS3Prefix
        REGO_POLICY_KEY: !Ref OpaPolicyS3Key
        OPA_POLICY_PACKAGE_NAME: !Ref OpaPolicyPackageName
        OPA_POLICY_RULE_TO_EVAL: !Ref OpaPolicyRuleToEval
      Scope:
        ComplianceResourceTypes: !Ref ConfigRuleScope
      Source:
        Owner: CUSTOM_LAMBDA
        SourceDetails:
          - EventSource: aws.config
            MessageType: ConfigurationItemChangeNotification
        SourceIdentifier: !ImportValue opa-lambda-arn

Outputs:
  ConfigRuleName:
    Description: Name of the Config rule deployed
    Value: !Ref OpaConfigRule
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



AWSConfig/AWS-Config-OPA/cfn_templates/config_rules/opa-eip-attachment.yaml [24:51]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  OpaPolicyRuleToEval:
    Description: The rule from your OPA policy which will be evaluated
    Type: String
    Default: compliant

Resources:
  OpaConfigRule:
    Type: AWS::Config::ConfigRule
    Properties:
      InputParameters:
        ASSETS_BUCKET: !Ref AssetsBucket
        REGO_POLICIES_PREFIX: !Ref OpaPoliciesS3Prefix
        REGO_POLICY_KEY: !Ref OpaPolicyS3Key
        OPA_POLICY_PACKAGE_NAME: !Ref OpaPolicyPackageName
        OPA_POLICY_RULE_TO_EVAL: !Ref OpaPolicyRuleToEval
      Scope:
        ComplianceResourceTypes: !Ref ConfigRuleScope
      Source:
        Owner: CUSTOM_LAMBDA
        SourceDetails:
          - EventSource: aws.config
            MessageType: ConfigurationItemChangeNotification
        SourceIdentifier: !ImportValue opa-lambda-arn

Outputs:
  ConfigRuleName:
    Description: Name of the Config rule deployed
    Value: !Ref OpaConfigRule
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



