diff options
Diffstat (limited to 'src/autoscaling.rs')
| -rw-r--r-- | src/autoscaling.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/autoscaling.rs b/src/autoscaling.rs index 024b556..79ac2b0 100644 --- a/src/autoscaling.rs +++ b/src/autoscaling.rs @@ -4,10 +4,10 @@ use anyhow::{anyhow, bail, Result}; use aws_sdk_autoscaling as autoscaling; use aws_sdk_autoscaling::types::{AutoScalingGroup, Instance, LifecycleState}; use aws_sdk_route53::types::ResourceRecordSet; -use trust_dns_proto::rr::Name; -use crate::ec2::{instance_proposal, Ec2}; +use crate::ec2::{asg_instances_proposal, Ec2}; use crate::hashable::Hashable; +use crate::route53::Target; pub trait AutoScaling { fn autoscaling(&self) -> &autoscaling::Client; @@ -15,9 +15,8 @@ pub trait AutoScaling { pub async fn propose_asg_recordsets<C>( aws_context: &C, + target: &Target, asg_name: &str, - dns_name: &Name, - dns_ttl: i64, ) -> Result<HashSet<Hashable<ResourceRecordSet>>> where C: AutoScaling + Ec2, @@ -28,7 +27,7 @@ where .ok_or(anyhow!("Autoscaling group returned from AWS with no name"))?; let live_instance_ids = live_instance_ids(asg.instances()); let proposed = - instance_proposal(aws_context, asg_name, dns_name, dns_ttl, &live_instance_ids).await?; + asg_instances_proposal(aws_context, target, asg_name, &live_instance_ids).await?; Ok(proposed) } |
