Closed MaxymVlasov closed 4 years ago
Discussed with @gelo22 Lambda workflow: POST (Action(CREATE/UPDATE/DELETE), UserName, NS Servers, ZoneID) -> API Gateway -> Triggers Lambda (R53 record NS user-gh.cluster.dev) -> POST (DynamoDB).
What is done: Route53 management via POST request(json) Example for my test tomain:
event['body'] = {
"Action": "CREATE|DELETE|UPDATE",
"UserName": "gelo22",
"NameServers": "ns-1768.awsdns-29.co.uk.,ns-683.awsdns-21.net.,ns-484.awsdns-60.com.,ns-1156.awsdns-16.org.",
"ZoneID": "Z0978963ADA7KRYE5RPL",
"DomainName": "test-domain.fun"
}
TODO: Use some naming rules for resources. Add tags for Route53 records if possible(DomainName). Use DynamoDB as records storage Write terraform(version12) code to deploy all things to aws Add Cloudwatch alerting for lambda, integrate with Opsgenie
https://github.com/shalb/cluster.dev-domain/pull/1
TODO: Lambda:
Cloudwatch:
Terraform:
Fixes:
[ ] https://github.com/shalb/cluster.dev-domain/pull/1#discussion_r415312402
[ ] https://github.com/shalb/cluster.dev-domain/pull/1#discussion_r415312711
[ ] https://github.com/shalb/cluster.dev-domain/pull/1#discussion_r415313256
[x] https://github.com/shalb/cluster.dev-domain/pull/1#discussion_r415680674
[ ] https://github.com/shalb/cluster.dev-domain/pull/1#discussion_r415682106
[ ] Locking not enabled? https://www.terraform.io/docs/backends/types/s3.html#dynamodb_table
[ ] How to create S3 bucket and dynamoDB for state before or with main code apply process
[x] Logs filtering to readme filter example)
fields @timestamp, @message
| filter message="Exception"
| sort @timestamp desc
| limit 20
filter doc
{ $.message = "Exception" }
cluster-dev support for domains merged: https://github.com/shalb/cluster.dev/pull/60
close due inaction. Base functions works as expected.
Create service that add new subzone (UserID.cluster.dev) for all new clusters by POST request.