summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-07-24 18:10:03 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-07-24 18:10:03 -0400
commit91105587c2d53199b5e5df89c508305f8efd4e70 (patch)
treeb954e2750de8feb10888746337ecd89e6b8ea7ff
parentd2805c075dc5bc83f65e8dc9673e88d2a01bc11d (diff)
aws_context is now reliably the first non-self argument, rather than sporadically the last one
-rw-r--r--src/converge.rs4
-rw-r--r--src/ec2.rs2
-rw-r--r--src/route53.rs2
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<C>(
+ aws_context: &C,
asg_name: &str,
dns_suffix: &Name,
dns_ttl: i64,
live_instance_ids: &[String],
- aws_context: &C,
) -> Result<HashSet<Hashable<ResourceRecordSet>>>
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<C>(name: &Name, aws_context: &C) -> Result<HostedZone>
+pub async fn zone_for_domain<C>(aws_context: &C, name: &Name) -> Result<HostedZone>
where
C: Route53,
{