From 91105587c2d53199b5e5df89c508305f8efd4e70 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 24 Jul 2024 18:10:03 -0400 Subject: aws_context is now reliably the first non-self argument, rather than sporadically the last one --- src/converge.rs | 4 ++-- src/ec2.rs | 2 +- src/route53.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/converge.rs b/src/converge.rs index 5e6b817..8846aec 100644 --- a/src/converge.rs +++ b/src/converge.rs @@ -33,18 +33,18 @@ where live_instance_ids, } = AutoScalingGroupConfig::try_from(auto_scaling_group)?; - let zone = zone_for_domain(dns_name, aws_context).await?; + 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 (intended_records, actual_records) = try_join!( instance_recordsets( + aws_context, &asg_name, dns_name, dns_ttl, &live_instance_ids, - aws_context ), zone_suffix_recordsets(aws_context, zone_id, dns_name), )?; diff --git a/src/ec2.rs b/src/ec2.rs index 604c2a2..2035a64 100644 --- a/src/ec2.rs +++ b/src/ec2.rs @@ -15,11 +15,11 @@ pub trait Ec2 { } pub async fn instance_recordsets( + aws_context: &C, asg_name: &str, dns_suffix: &Name, dns_ttl: i64, live_instance_ids: &[String], - aws_context: &C, ) -> Result>> where C: Ec2, diff --git a/src/route53.rs b/src/route53.rs index c3fea47..b9d4c34 100644 --- a/src/route53.rs +++ b/src/route53.rs @@ -13,7 +13,7 @@ pub trait Route53 { fn route53(&self) -> &route53::Client; } -pub async fn zone_for_domain(name: &Name, aws_context: &C) -> Result +pub async fn zone_for_domain(aws_context: &C, name: &Name) -> Result where C: Route53, { -- cgit v1.2.3