Clone this repo:
git clone https://gist.github.com/08be6d6e7605a43fe52d1f201c2b47d8.git
cd 08be6d6e7605a43fe52d1f201c2b47d8Start the docker stack:
| *.tfbackup | |
| .terraform/ | |
| *.tfstate | |
| .terraform.tfstate.lock.info |
| import socket | |
| import ctypes | |
| from enum import IntEnum, Enum | |
| import time | |
| class PacketID(IntEnum): | |
| MOTION = 0 | |
| SESSION = 1 | |
| LAP_DATA = 2 | |
| EVENT = 3 |
| MYSQL_ROOT_PASSWORD=rootpass |
| resource "aws_acm_certificate" "certificate" { | |
| certificate_body = acme_certificate.certificate.certificate_pem | |
| private_key = acme_certificate.certificate.private_key_pem | |
| certificate_chain = acme_certificate.certificate.issuer_pem | |
| } |
| output "certificate_pem" { | |
| value = acme_certificate.certificate.certificate_pem | |
| } | |
| output "issuer_pem" { | |
| value = acme_certificate.certificate.issuer_pem | |
| } | |
| output "private_key_pem" { | |
| value = nonsensitive(acme_certificate.certificate.private_key_pem) |
| resource "aws_s3_object" "certificate_artifacts_s3_objects" { | |
| for_each = toset(["certificate_pem", "issuer_pem", "private_key_pem"]) | |
| bucket = "test-singh-cl-ssl-cert" # TODO put your own S3 bucket, and create it before if necessary! | |
| key = each.key # TODO prefix with your own bucket path if there is any | |
| content = lookup(acme_certificate.certificate, "${each.key}") | |
| } |
| provider "acme" { | |
| server_url = "https://acme-staging-v02.api.letsencrypt.org/directory" | |
| #server_url = "https://acme-v02.api.letsencrypt.org/directory" | |
| } | |
| data "aws_route53_zone" "base_domain" { | |
| name = "eks.singh.cl" # TODO put your own DNS in here! | |
| } | |
| resource "tls_private_key" "private_key" { |
| terraform { | |
| required_version = "~> 1.9.5" | |
| required_providers { | |
| acme = { | |
| source = "vancluever/acme" | |
| version = "~> 2.5.3" | |
| } | |
| aws = { | |
| source = "hashicorp/aws" |
| eks_pod_identity_associations = {} |