insert.sql
\set id random(1, 100000 * :scale)
\set uuid gen_random_uuid()
insert into my_table (id, uuid)
values
terraform { | |
required_providers { | |
http = { | |
source = "terraform-aws-modules/http" | |
version = "2.4.1" | |
} | |
} | |
required_version = ">= 0.13" | |
} |
#!/usr/bin/env bash | |
IP=$(curl ifconfig.me) | |
echo "ip is $IP" | |
MSG="{ | |
\"Changes\": [ | |
{ | |
\"Action\": \"UPSERT\", | |
\"ResourceRecordSet\": { |
terraform apply | |
2020/02/18 15:58:02 [INFO] Terraform version: 0.12.13 | |
2020/02/18 15:58:02 [INFO] Go runtime version: go1.12.9 | |
2020/02/18 15:58:02 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/1.0.2/versions/0.12.13/terraform", "apply"} | |
2020/02/18 15:58:02 [DEBUG] Attempting to open CLI config file: /Users/stephen/.terraformrc | |
2020/02/18 15:58:02 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2020/02/18 15:58:02 [INFO] CLI command args: []string{"apply"} | |
2020/02/18 15:58:02 [DEBUG] checking for provider in "." | |
2020/02/18 15:58:02 [DEBUG] checking for provider in "/usr/local/Cellar/tfenv/1.0.2/versions/0.12.13" | |
2020/02/18 15:58:02 [DEBUG] checking for provider in ".terraform/plugins/darwin_amd64" |
terraform apply | |
An execution plan has been generated and is shown below. | |
Resource actions are indicated with the following symbols: | |
+ create | |
Terraform will perform the following actions: | |
# docker_container.nginx will be created | |
+ resource "docker_container" "nginx" { |
val skip = Set.empty[String] | |
import java.util.{Map => JMap, List => JList} | |
def diff(a: JMap[String, Any], b: JMap[String, Any], prefix: String = ""): Unit = { | |
(a.keySet().asScala.toSet ++ b.keySet().asScala.toSet).filterNot(skip.contains).foreach { key => | |
val prefixKey = s"$prefix.$key" | |
(Option(a.get(key)), Option(b.get(key))) match { | |
case (Some(av), Some(bv)) if av.isInstanceOf[JMap[String, Any]] && bv.isInstanceOf[JMap[String, Any]] => | |
diff(av.asInstanceOf[JMap[String, Any]], bv.asInstanceOf[JMap[String, Any]], prefixKey) |
# results from https://github.com/stephennancekivell/circe-argonaut-compile-times | |
# 100 case classes with up to 15 values | |
play-json 2.12 | |
23 | |
19 | |
play-json.topic 2.12 | |
17 | |
20 | |
circe 2.12 |
/* | |
* gather unordered takes an Array of promise's running them in parallel returning a single promise of their result and cancel function. | |
* | |
* If a error is encountered the first error will be returned, remaining unordered thunks will not be executed. | |
* | |
* @inputThunks Array[() => Promise[A]] an array of promises not yet started, thunks () => Promise | |
* @parallism number of promises to run at once | |
* @returns Object { | |
* promise: Promise[Array[A]] | |
* cancel: Function() to cancel |
/* | |
* traverse cancellable takes an Array of promise's running them in parallel returning a single promise of their result and cancel function. | |
* | |
* @inputThunks Array[() => Promise[A]] an array of promises not yet started, thunks () => Promise | |
* @returns Object { | |
* promise: Promise[Array[A]] | |
* cancel: Function() to cancel | |
* } | |
*/ | |
export function traverseCancellable(inputThunks) { |