This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"logs:CreateLogGroup" | |
], | |
"Resource": "arn:aws:logs:<AWS_REGION>:<AWS_ACCOUNT_ID>:*" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cloudwatch event rule that runs acme-dns-route53 lambda every 12 hours | |
resource "aws_cloudwatch_event_rule" "acme_dns_route53_sheduler" { | |
name = "acme-dns-route53-issuer-scheduler" | |
schedule_expression = "cron(0 */12 * * ? *)" | |
} | |
# Specify the lambda function to run | |
resource "aws_cloudwatch_event_target" "acme_dns_route53_sheduler_target" { | |
rule = "${aws_cloudwatch_event_rule.acme_dns_route53_sheduler.name}" | |
arn = "${aws_lambda_function.acme_dns_route53.arn}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.0; | |
// Lottery implements simple lottery contract. | |
// In this contract, the enter function allows players to enter the lottery | |
// by sending a positive value to the contract, which is added to the jackpot total. | |
// The random function generates a random index within the bounds of the players | |
// array length, using the current block timestamp, difficulty, and array length. | |
// | |
// The pickWinner function selects the winner by calling the random function and |