summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-07-24 19:26:45 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-07-24 19:26:45 -0400
commite872bcdc978283b45da22a4de5ed195dce613a71 (patch)
tree6a7c7813e52e5c546cc6f187e12b5f5bdca42f6e
parent77642df3e17b5272617c48832f37b7ab3dd6f27b (diff)
Upgrade AWS libraries.
This comes with some substantial removals, because the AWS libs no longer treat every last field as optional when it's inappropriate to do so. Hooray!
-rw-r--r--Cargo.lock564
-rw-r--r--Cargo.toml10
-rw-r--r--src/apply.rs6
-rw-r--r--src/autoscaling.rs2
-rw-r--r--src/aws_context.rs6
-rw-r--r--src/converge.rs6
-rw-r--r--src/dns.rs2
-rw-r--r--src/ec2.rs23
-rw-r--r--src/route53.rs21
9 files changed, 220 insertions, 420 deletions
diff --git a/Cargo.lock b/Cargo.lock
index b9e032e..5c04aef 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -18,15 +18,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
-name = "aho-corasick"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
-dependencies = [
- "memchr",
-]
-
-[[package]]
name = "anstream"
version = "0.6.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -107,108 +98,111 @@ dependencies = [
"aws-sdk-autoscaling",
"aws-sdk-ec2",
"aws-sdk-route53",
- "aws-types",
"clap",
"futures",
+ "itertools",
"tokio",
"trust-dns-proto",
]
[[package]]
name = "aws-config"
-version = "0.56.1"
+version = "1.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc6b3804dca60326e07205179847f17a4fce45af3a1106939177ad41ac08a6de"
+checksum = "caf6cfe2881cb1fcbba9ae946fb9a6480d3b7a714ca84c74925014a89ef3387a"
dependencies = [
"aws-credential-types",
- "aws-http",
+ "aws-runtime",
"aws-sdk-sso",
+ "aws-sdk-ssooidc",
"aws-sdk-sts",
"aws-smithy-async",
- "aws-smithy-client",
"aws-smithy-http",
- "aws-smithy-http-tower",
"aws-smithy-json",
+ "aws-smithy-runtime",
+ "aws-smithy-runtime-api",
"aws-smithy-types",
"aws-types",
"bytes",
"fastrand",
"hex",
- "http",
+ "http 0.2.12",
"hyper",
- "ring 0.16.20",
+ "ring",
"time",
"tokio",
- "tower",
"tracing",
+ "url",
"zeroize",
]
[[package]]
name = "aws-credential-types"
-version = "0.56.1"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70a66ac8ef5fa9cf01c2d999f39d16812e90ec1467bd382cbbb74ba23ea86201"
+checksum = "e16838e6c9e12125face1c1eff1343c75e3ff540de98ff7ebd61874a89bcfeb9"
dependencies = [
"aws-smithy-async",
+ "aws-smithy-runtime-api",
"aws-smithy-types",
- "fastrand",
- "tokio",
- "tracing",
"zeroize",
]
[[package]]
-name = "aws-http"
-version = "0.56.1"
+name = "aws-runtime"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e626370f9ba806ae4c439e49675fd871f5767b093075cdf4fef16cac42ba900"
+checksum = "87c5f920ffd1e0526ec9e70e50bf444db50b204395a0fa7016bbf9e31ea1698f"
dependencies = [
"aws-credential-types",
+ "aws-sigv4",
+ "aws-smithy-async",
"aws-smithy-http",
+ "aws-smithy-runtime-api",
"aws-smithy-types",
"aws-types",
"bytes",
- "http",
- "http-body",
- "lazy_static",
+ "fastrand",
+ "http 0.2.12",
+ "http-body 0.4.6",
"percent-encoding",
"pin-project-lite",
"tracing",
+ "uuid",
]
[[package]]
-name = "aws-runtime"
-version = "0.56.1"
+name = "aws-sdk-autoscaling"
+version = "1.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07ac5cf0ff19c1bca0cea7932e11b239d1025a45696a4f44f72ea86e2b8bdd07"
+checksum = "9fb157beaa5462c10d118288ef5d6ef3a957352b841d07e402cae80e844c2b1c"
dependencies = [
"aws-credential-types",
- "aws-http",
- "aws-sigv4",
+ "aws-runtime",
"aws-smithy-async",
"aws-smithy-http",
+ "aws-smithy-json",
+ "aws-smithy-query",
+ "aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
+ "aws-smithy-xml",
"aws-types",
- "fastrand",
- "http",
- "percent-encoding",
+ "http 0.2.12",
+ "once_cell",
+ "regex-lite",
"tracing",
- "uuid",
]
[[package]]
-name = "aws-sdk-autoscaling"
-version = "0.33.0"
+name = "aws-sdk-ec2"
+version = "1.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8efc42fe2c87e3ff9d0ae730f6bdde2f91a77d774f944b5433a70f05bfda6e1a"
+checksum = "7e31b40d3fc7f1f2165f4705c4293f74890bfd8a9bef37d481e7b45957a051f2"
dependencies = [
"aws-credential-types",
- "aws-http",
"aws-runtime",
"aws-smithy-async",
- "aws-smithy-client",
"aws-smithy-http",
"aws-smithy-json",
"aws-smithy-query",
@@ -217,73 +211,66 @@ dependencies = [
"aws-smithy-types",
"aws-smithy-xml",
"aws-types",
- "http",
- "regex",
- "tokio-stream",
+ "fastrand",
+ "http 0.2.12",
+ "once_cell",
+ "regex-lite",
"tracing",
]
[[package]]
-name = "aws-sdk-ec2"
-version = "0.33.1"
+name = "aws-sdk-route53"
+version = "1.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85092ae53cec4fb99eed322e2b5b5946818e23e92b36db07cf344a6e77e4b617"
+checksum = "e254936e4d5c08e9077869db4dd1959e594cba681741841cfdb53840f2da9d8c"
dependencies = [
"aws-credential-types",
- "aws-http",
"aws-runtime",
"aws-smithy-async",
- "aws-smithy-client",
"aws-smithy-http",
"aws-smithy-json",
- "aws-smithy-query",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
"aws-smithy-xml",
"aws-types",
- "fastrand",
- "http",
- "regex",
- "tokio-stream",
+ "http 0.2.12",
+ "once_cell",
+ "regex-lite",
"tracing",
]
[[package]]
-name = "aws-sdk-route53"
-version = "0.33.1"
+name = "aws-sdk-sso"
+version = "1.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97a3a3d8adc398258c8e80be668e082a8845ed788c47ad30d75adfda3cfe86c2"
+checksum = "6acca681c53374bf1d9af0e317a41d12a44902ca0f2d1e10e5cb5bb98ed74f35"
dependencies = [
"aws-credential-types",
- "aws-http",
"aws-runtime",
"aws-smithy-async",
- "aws-smithy-client",
"aws-smithy-http",
"aws-smithy-json",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
- "aws-smithy-xml",
"aws-types",
- "http",
- "regex",
- "tokio-stream",
+ "bytes",
+ "http 0.2.12",
+ "once_cell",
+ "regex-lite",
"tracing",
]
[[package]]
-name = "aws-sdk-sso"
-version = "0.30.0"
+name = "aws-sdk-ssooidc"
+version = "1.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "903f888ff190e64f6f5c83fb0f8d54f9c20481f1dc26359bb8896f5d99908949"
+checksum = "b79c6bdfe612503a526059c05c9ccccbf6bd9530b003673cb863e547fd7c0c9a"
dependencies = [
"aws-credential-types",
- "aws-http",
"aws-runtime",
"aws-smithy-async",
- "aws-smithy-client",
"aws-smithy-http",
"aws-smithy-json",
"aws-smithy-runtime",
@@ -291,23 +278,21 @@ dependencies = [
"aws-smithy-types",
"aws-types",
"bytes",
- "http",
- "regex",
- "tokio-stream",
+ "http 0.2.12",
+ "once_cell",
+ "regex-lite",
"tracing",
]
[[package]]
name = "aws-sdk-sts"
-version = "0.30.0"
+version = "1.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a47ad6bf01afc00423d781d464220bf69fb6a674ad6629cbbcb06d88cdc2be82"
+checksum = "32e6ecdb2bd756f3b2383e6f0588dc10a4e65f5d551e70a56e0bfe0c884673ce"
dependencies = [
"aws-credential-types",
- "aws-http",
"aws-runtime",
"aws-smithy-async",
- "aws-smithy-client",
"aws-smithy-http",
"aws-smithy-json",
"aws-smithy-query",
@@ -316,25 +301,30 @@ dependencies = [
"aws-smithy-types",
"aws-smithy-xml",
"aws-types",
- "http",
- "regex",
+ "http 0.2.12",
+ "once_cell",
+ "regex-lite",
"tracing",
]
[[package]]
name = "aws-sigv4"
-version = "0.56.1"
+version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7b28f4910bb956b7ab320b62e98096402354eca976c587d1eeccd523d9bac03"
+checksum = "5df1b0fa6be58efe9d4ccc257df0a53b89cd8909e86591a13ca54817c87517be"
dependencies = [
+ "aws-credential-types",
"aws-smithy-http",
+ "aws-smithy-runtime-api",
+ "aws-smithy-types",
+ "bytes",
"form_urlencoded",
"hex",
"hmac",
- "http",
+ "http 0.2.12",
+ "http 1.1.0",
"once_cell",
"percent-encoding",
- "regex",
"sha2",
"time",
"tracing",
@@ -342,92 +332,49 @@ dependencies = [
[[package]]
name = "aws-smithy-async"
-version = "0.56.1"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2cdb73f85528b9d19c23a496034ac53703955a59323d581c06aa27b4e4e247af"
+checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c"
dependencies = [
"futures-util",
"pin-project-lite",
"tokio",
- "tokio-stream",
-]
-
-[[package]]
-name = "aws-smithy-client"
-version = "0.56.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c27b2756264c82f830a91cb4d2d485b2d19ad5bea476d9a966e03d27f27ba59a"
-dependencies = [
- "aws-smithy-async",
- "aws-smithy-http",
- "aws-smithy-http-tower",
- "aws-smithy-types",
- "bytes",
- "fastrand",
- "http",
- "http-body",
- "hyper",
- "hyper-rustls",
- "lazy_static",
- "pin-project-lite",
- "rustls",
- "tokio",
- "tower",
- "tracing",
]
[[package]]
name = "aws-smithy-http"
-version = "0.56.1"
+version = "0.60.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54cdcf365d8eee60686885f750a34c190e513677db58bbc466c44c588abf4199"
+checksum = "d9cd0ae3d97daa0a2bf377a4d8e8e1362cae590c4a1aad0d40058ebca18eb91e"
dependencies = [
+ "aws-smithy-runtime-api",
"aws-smithy-types",
"bytes",
"bytes-utils",
"futures-core",
- "http",
- "http-body",
- "hyper",
+ "http 0.2.12",
+ "http-body 0.4.6",
"once_cell",
"percent-encoding",
"pin-project-lite",
"pin-utils",
- "tokio",
- "tokio-util",
- "tracing",
-]
-
-[[package]]
-name = "aws-smithy-http-tower"
-version = "0.56.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "822de399d0ce62829a69dfa8c5cd08efdbe61a7426b953e2268f8b8b52a607bd"
-dependencies = [
- "aws-smithy-http",
- "aws-smithy-types",
- "bytes",
- "http",
- "http-body",
- "pin-project-lite",
- "tower",
"tracing",
]
[[package]]
name = "aws-smithy-json"
-version = "0.56.1"
+version = "0.60.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fb1e7ab8fa7ad10c193af7ae56d2420989e9f4758bf03601a342573333ea34f"
+checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6"
dependencies = [
"aws-smithy-types",
]
[[package]]
name = "aws-smithy-query"
-version = "0.56.1"
+version = "0.60.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28556a3902091c1f768a34f6c998028921bdab8d47d92586f363f14a4a32d047"
+checksum = "f2fbd61ceb3fe8a1cb7352e42689cec5335833cd9f94103a61e98f9bb61c64bb"
dependencies = [
"aws-smithy-types",
"urlencoding",
@@ -435,76 +382,93 @@ dependencies = [
[[package]]
name = "aws-smithy-runtime"
-version = "0.56.1"
+version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "745e096b3553e7e0f40622aa04971ce52765af82bebdeeac53aa6fc82fe801e6"
+checksum = "ce87155eba55e11768b8c1afa607f3e864ae82f03caf63258b37455b0ad02537"
dependencies = [
"aws-smithy-async",
- "aws-smithy-client",
"aws-smithy-http",
"aws-smithy-runtime-api",
"aws-smithy-types",
"bytes",
"fastrand",
- "http",
- "http-body",
+ "h2",
+ "http 0.2.12",
+ "http-body 0.4.6",
+ "http-body 1.0.1",
+ "httparse",
+ "hyper",
+ "hyper-rustls",
"once_cell",
"pin-project-lite",
"pin-utils",
+ "rustls",
"tokio",
"tracing",
]
[[package]]
name = "aws-smithy-runtime-api"
-version = "0.56.1"
+version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93d0ae0c9cfd57944e9711ea610b48a963fb174a53aabacc08c5794a594b1d02"
+checksum = "30819352ed0a04ecf6a2f3477e344d2d1ba33d43e0f09ad9047c12e0d923616f"
dependencies = [
"aws-smithy-async",
- "aws-smithy-http",
"aws-smithy-types",
"bytes",
- "http",
+ "http 0.2.12",
+ "http 1.1.0",
+ "pin-project-lite",
"tokio",
"tracing",
+ "zeroize",
]
[[package]]
name = "aws-smithy-types"
-version = "0.56.1"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d90dbc8da2f6be461fa3c1906b20af8f79d14968fe47f2b7d29d086f62a51728"
+checksum = "cfe321a6b21f5d8eabd0ade9c55d3d0335f3c3157fc2b3e87f05f34b539e4df5"
dependencies = [
"base64-simd",
+ "bytes",
+ "bytes-utils",
+ "futures-core",
+ "http 0.2.12",
+ "http 1.1.0",
+ "http-body 0.4.6",
+ "http-body 1.0.1",
+ "http-body-util",
"itoa",
"num-integer",
+ "pin-project-lite",
+ "pin-utils",
"ryu",
"serde",
"time",
+ "tokio",
+ "tokio-util",
]
[[package]]
name = "aws-smithy-xml"
-version = "0.56.1"
+version = "0.60.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e01d2dedcdd8023043716cfeeb3c6c59f2d447fce365d8e194838891794b23b6"
+checksum = "d123fbc2a4adc3c301652ba8e149bf4bc1d1725affb9784eb20c953ace06bf55"
dependencies = [
"xmlparser",
]
[[package]]
name = "aws-types"
-version = "0.56.1"
+version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85aa0451bf8af1bf22a4f028d5d28054507a14be43cb8ac0597a8471fba9edfe"
+checksum = "5221b91b3e441e6675310829fd8984801b772cb1546ef6c0e54dec9f1ac13fef"
dependencies = [
"aws-credential-types",
"aws-smithy-async",
- "aws-smithy-client",
- "aws-smithy-http",
+ "aws-smithy-runtime-api",
"aws-smithy-types",
- "http",
"rustc_version",
"tracing",
]
@@ -556,12 +520,6 @@ dependencies = [
]
[[package]]
-name = "bumpalo"
-version = "3.16.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
-
-[[package]]
name = "bytes"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -868,7 +826,7 @@ dependencies = [
"futures-core",
"futures-sink",
"futures-util",
- "http",
+ "http 0.2.12",
"indexmap",
"slab",
"tokio",
@@ -927,13 +885,47 @@ dependencies = [
]
[[package]]
+name = "http"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
+[[package]]
name = "http-body"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
dependencies = [
"bytes",
- "http",
+ "http 0.2.12",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "http-body"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
+dependencies = [
+ "bytes",
+ "http 1.1.0",
+]
+
+[[package]]
+name = "http-body-util"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
+dependencies = [
+ "bytes",
+ "futures-util",
+ "http 1.1.0",
+ "http-body 1.0.1",
"pin-project-lite",
]
@@ -960,8 +952,8 @@ dependencies = [
"futures-core",
"futures-util",
"h2",
- "http",
- "http-body",
+ "http 0.2.12",
+ "http-body 0.4.6",
"httparse",
"httpdate",
"itoa",
@@ -980,7 +972,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
dependencies = [
"futures-util",
- "http",
+ "http 0.2.12",
"hyper",
"log",
"rustls",
@@ -1032,25 +1024,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800"
[[package]]
-name = "itoa"
-version = "1.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
-
-[[package]]
-name = "js-sys"
-version = "0.3.69"
+name = "itertools"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d"
+checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
dependencies = [
- "wasm-bindgen",
+ "either",
]
[[package]]
-name = "lazy_static"
-version = "1.5.0"
+name = "itoa"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "libc"
@@ -1149,26 +1135,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
-name = "pin-project"
-version = "1.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
-dependencies = [
- "pin-project-internal",
-]
-
-[[package]]
-name = "pin-project-internal"
-version = "1.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
name = "pin-project-lite"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1241,48 +1207,10 @@ dependencies = [
]
[[package]]
-name = "regex"
-version = "1.10.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-automata",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-automata"
-version = "0.4.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.8.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
-
-[[package]]
-name = "ring"
-version = "0.16.20"
+name = "regex-lite"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
-dependencies = [
- "cc",
- "libc",
- "once_cell",
- "spin 0.5.2",
- "untrusted 0.7.1",
- "web-sys",
- "winapi",
-]
+checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a"
[[package]]
name = "ring"
@@ -1294,8 +1222,8 @@ dependencies = [
"cfg-if",
"getrandom",
"libc",
- "spin 0.9.8",
- "untrusted 0.9.0",
+ "spin",
+ "untrusted",
"windows-sys",
]
@@ -1321,7 +1249,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e"
dependencies = [
"log",
- "ring 0.17.8",
+ "ring",
"rustls-webpki",
"sct",
]
@@ -1353,8 +1281,8 @@ version = "0.101.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
dependencies = [
- "ring 0.17.8",
- "untrusted 0.9.0",
+ "ring",
+ "untrusted",
]
[[package]]
@@ -1378,8 +1306,8 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"
dependencies = [
- "ring 0.17.8",
- "untrusted 0.9.0",
+ "ring",
+ "untrusted",
]
[[package]]
@@ -1443,6 +1371,15 @@ dependencies = [
]
[[package]]
+name = "signal-hook-registry"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
name = "slab"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1469,12 +1406,6 @@ dependencies = [
[[package]]
name = "spin"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
-
-[[package]]
-name = "spin"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
@@ -1578,6 +1509,7 @@ dependencies = [
"libc",
"mio",
"pin-project-lite",
+ "signal-hook-registry",
"socket2",
"tokio-macros",
"windows-sys",
@@ -1605,17 +1537,6 @@ dependencies = [
]
[[package]]
-name = "tokio-stream"
-version = "0.1.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af"
-dependencies = [
- "futures-core",
- "pin-project-lite",
- "tokio",
-]
-
-[[package]]
name = "tokio-util"
version = "0.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1629,28 +1550,6 @@ dependencies = [
]
[[package]]
-name = "tower"
-version = "0.4.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
-dependencies = [
- "futures-core",
- "futures-util",
- "pin-project",
- "pin-project-lite",
- "tokio",
- "tower-layer",
- "tower-service",
- "tracing",
-]
-
-[[package]]
-name = "tower-layer"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
-
-[[package]]
name = "tower-service"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1662,7 +1561,6 @@ version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
dependencies = [
- "log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
@@ -1748,12 +1646,6 @@ dependencies = [
[[package]]
name = "untrusted"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
-
-[[package]]
-name = "untrusted"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
@@ -1815,92 +1707,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
-name = "wasm-bindgen"
-version = "0.2.92"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
-dependencies = [
- "cfg-if",
- "wasm-bindgen-macro",
-]
-
-[[package]]
-name = "wasm-bindgen-backend"
-version = "0.2.92"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
-dependencies = [
- "bumpalo",
- "log",
- "once_cell",
- "proc-macro2",
- "quote",
- "syn",
- "wasm-bindgen-shared",
-]
-
-[[package]]
-name = "wasm-bindgen-macro"
-version = "0.2.92"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
-dependencies = [
- "quote",
- "wasm-bindgen-macro-support",
-]
-
-[[package]]
-name = "wasm-bindgen-macro-support"
-version = "0.2.92"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
- "wasm-bindgen-backend",
- "wasm-bindgen-shared",
-]
-
-[[package]]
-name = "wasm-bindgen-shared"
-version = "0.2.92"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
-
-[[package]]
-name = "web-sys"
-version = "0.3.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef"
-dependencies = [
- "js-sys",
- "wasm-bindgen",
-]
-
-[[package]]
-name = "winapi"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
-dependencies = [
- "winapi-i686-pc-windows-gnu",
- "winapi-x86_64-pc-windows-gnu",
-]
-
-[[package]]
-name = "winapi-i686-pc-windows-gnu"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
-
-[[package]]
-name = "winapi-x86_64-pc-windows-gnu"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
-
-[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 86be183..9e4db1a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,12 +12,12 @@ publish = false
[dependencies]
anyhow = "1.0.86"
-aws-config = "0.56.1"
-aws-sdk-autoscaling = "0.33.0"
-aws-sdk-ec2 = "0.33.1"
-aws-sdk-route53 = "0.33.1"
-aws-types = "0.56.1"
+aws-config = "1.5.4"
+aws-sdk-autoscaling = "1.38.0"
+aws-sdk-ec2 = "1.61.0"
+aws-sdk-route53 = "1.37.0"
clap = { version = "4.5.10", features = ["derive"] }
futures = "0.3.30"
+itertools = "0.13.0"
tokio = { version = "1.39.1", features = ["macros"] }
trust-dns-proto = "0.23.2"
diff --git a/src/apply.rs b/src/apply.rs
index abf579f..85c34d7 100644
--- a/src/apply.rs
+++ b/src/apply.rs
@@ -1,5 +1,7 @@
use anyhow::Result;
use aws_sdk_route53::types::{Change, ChangeAction, ChangeBatch, ResourceRecordSet};
+// Needed until try_collect is stable, see <https://github.com/rust-lang/rust/issues/94047>
+use itertools::Itertools;
use crate::route53::Route53;
@@ -67,11 +69,11 @@ where
.build()
});
- let change_records: Vec<_> = remove_records.chain(insert_records).collect();
+ let change_records: Vec<_> = remove_records.chain(insert_records).try_collect()?;
if !change_records.is_empty() {
let change_batch = ChangeBatch::builder()
.set_changes(Some(change_records))
- .build();
+ .build()?;
aws_context
.route53()
diff --git a/src/autoscaling.rs b/src/autoscaling.rs
index 81b9961..327a4f7 100644
--- a/src/autoscaling.rs
+++ b/src/autoscaling.rs
@@ -19,7 +19,7 @@ where
.send()
.await?;
- let auto_scaling_groups = asg_resp.auto_scaling_groups().unwrap_or(&[]);
+ let auto_scaling_groups = asg_resp.auto_scaling_groups();
let auto_scaling_group = auto_scaling_groups
.iter()
.map(ToOwned::to_owned)
diff --git a/src/aws_context.rs b/src/aws_context.rs
index 2eff941..8f1ae88 100644
--- a/src/aws_context.rs
+++ b/src/aws_context.rs
@@ -1,7 +1,7 @@
+use aws_config::{BehaviorVersion, SdkConfig};
use aws_sdk_autoscaling as asg;
use aws_sdk_ec2 as ec2;
use aws_sdk_route53 as route53;
-use aws_types::SdkConfig;
use crate::autoscaling::AutoScaling;
use crate::ec2::Ec2;
@@ -15,7 +15,9 @@ pub struct AwsContext {
impl AwsContext {
pub async fn from_env() -> Self {
- let config = aws_config::from_env().load().await;
+ let config = aws_config::defaults(BehaviorVersion::v2024_03_28())
+ .load()
+ .await;
Self::new(&config)
}
diff --git a/src/converge.rs b/src/converge.rs
index 8846aec..e79ac06 100644
--- a/src/converge.rs
+++ b/src/converge.rs
@@ -1,6 +1,6 @@
use std::fmt::Debug;
-use anyhow::{anyhow, Result};
+use anyhow::Result;
use aws_sdk_autoscaling::types::AutoScalingGroup;
use aws_sdk_route53::types::ResourceRecordSet;
use futures::try_join;
@@ -34,9 +34,7 @@ where
} = AutoScalingGroupConfig::try_from(auto_scaling_group)?;
let zone = zone_for_domain(aws_context, dns_name).await?;
- let zone_id = zone
- .id()
- .ok_or(anyhow!("No ID for hosted zone for name: {}", dns_name))?;
+ let zone_id = zone.id();
let (intended_records, actual_records) = try_join!(
instance_recordsets(
diff --git a/src/dns.rs b/src/dns.rs
index 3a91290..224d56e 100644
--- a/src/dns.rs
+++ b/src/dns.rs
@@ -40,7 +40,7 @@ impl TryFrom<&AutoScalingGroup> for AutoScalingGroupConfig {
.ok_or(anyhow!("Autoscaling group returned from AWS with no name"))?
.to_owned();
- let instances = autoscaling_group.instances().unwrap_or(&[]);
+ let instances = autoscaling_group.instances();
let live_instance_ids = Self::live_instance_ids(instances);
diff --git a/src/ec2.rs b/src/ec2.rs
index 67a098c..44719ed 100644
--- a/src/ec2.rs
+++ b/src/ec2.rs
@@ -4,7 +4,8 @@ use anyhow::Result;
use aws_sdk_ec2 as ec2;
use aws_sdk_ec2::types::Filter;
use aws_sdk_route53::types::{ResourceRecord, ResourceRecordSet, RrType};
-use futures::stream::TryStreamExt;
+// Needed until try_collect is stable, see <https://github.com/rust-lang/rust/issues/94047>
+use itertools::Itertools;
use trust_dns_proto::rr::Name;
use crate::dns::absolute;
@@ -49,15 +50,15 @@ where
.send();
while let Some(reservation) = instances_paginator.try_next().await? {
- let instances = reservation.instances().unwrap_or(&[]);
+ let instances = reservation.instances();
for instance in instances {
// Mild abuse of the fact that optional values are also iterable
apex_ip4.extend(instance.public_ip_address().map(String::from));
- let instance_interfaces = instance.network_interfaces().unwrap_or(&[]);
+ let instance_interfaces = instance.network_interfaces();
let instance_ip6: Vec<_> = instance_interfaces
.iter()
- .flat_map(|interface| interface.ipv6_addresses().unwrap_or(&[]))
+ .flat_map(|interface| interface.ipv6_addresses())
// Flatmap here to drop the None values, unwrap the Some values
.flat_map(|ipv6| ipv6.ipv6_address())
.to_owned()
@@ -70,8 +71,8 @@ where
let apex_hostname = absolute(dns_suffix.clone())?;
let apex_hostname = apex_hostname.to_ascii();
- let apex_ip4_recordset = apex_recordset(&apex_hostname, dns_ttl, RrType::A, apex_ip4);
- let apex_ip6_recordset = apex_recordset(&apex_hostname, dns_ttl, RrType::Aaaa, apex_ip6);
+ let apex_ip4_recordset = apex_recordset(&apex_hostname, dns_ttl, RrType::A, apex_ip4)?;
+ let apex_ip6_recordset = apex_recordset(&apex_hostname, dns_ttl, RrType::Aaaa, apex_ip6)?;
Ok(apex_ip4_recordset
.into_iter()
@@ -85,23 +86,23 @@ fn apex_recordset(
dns_ttl: i64,
rr_type: RrType,
addresses: HashSet<impl Into<String>>,
-) -> Option<ResourceRecordSet> {
+) -> Result<Option<ResourceRecordSet>> {
if addresses.is_empty() {
- None
+ Ok(None)
} else {
let records = addresses
.into_iter()
.map(|address| address.into())
.map(|address| ResourceRecord::builder().value(address).build())
- .collect();
+ .try_collect()?;
let record_set = ResourceRecordSet::builder()
.name(apex_hostname)
.r#type(rr_type)
.ttl(dns_ttl)
.set_resource_records(Some(records))
- .build();
+ .build()?;
- Some(record_set)
+ Ok(Some(record_set))
}
}
diff --git a/src/route53.rs b/src/route53.rs
index b9d4c34..3c34e9c 100644
--- a/src/route53.rs
+++ b/src/route53.rs
@@ -31,13 +31,9 @@ where
.send()
.await?;
- let zones = zones_resp.hosted_zones().unwrap_or(&[]);
+ let zones = zones_resp.hosted_zones();
for candidate_zone in zones.iter() {
- let zone_name = match candidate_zone.name() {
- None => continue,
- Some(name) => name,
- };
- let zone_name = Name::from_str(zone_name)?;
+ let zone_name = Name::from_str(candidate_zone.name())?;
let match_position = names.iter().position(|name| *name == zone_name);
match (depth, match_position) {
(None, Some(matched_depth)) => {
@@ -89,21 +85,16 @@ where
.send()
.await?;
- let recordsets = records_resp.resource_record_sets().unwrap_or(&[]);
+ let recordsets = records_resp.resource_record_sets();
for recordset in recordsets {
- let recordset_name = recordset.name().ok_or(anyhow!(
- "Record set with no name found in zone: {}",
- zone_id
- ))?;
+ let recordset_name = recordset.name();
let recordset_name = Name::from_str(recordset_name)?;
if &recordset_name != dns_name {
break;
}
- if let Some(rr_type) = recordset.r#type() {
- if [RrType::A, RrType::Aaaa].contains(rr_type) {
- suffix_records.insert(recordset.clone().into());
- }
+ if [RrType::A, RrType::Aaaa].contains(recordset.r#type()) {
+ suffix_records.insert(recordset.clone().into());
}
}