Skip to content

Commit

Permalink
Remove the instance ip fetch from autoscaling group (#453)
Browse files Browse the repository at this point in the history
Signed-off-by: Sasikanth Eda <[email protected]>
  • Loading branch information
sasikeda authored Nov 24, 2023
1 parent 9604c95 commit 98922ac
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 48 deletions.
3 changes: 0 additions & 3 deletions aws_scale_templates/sub_modules/bastion_template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,5 @@ The below steps will provision the AWS Bastion instance required for the IBM Spe
| Name | Description |
|------|-------------|
| <a name="output_bastion_instance_autoscaling_group_ref"></a> [bastion_instance_autoscaling_group_ref](#output_bastion_instance_autoscaling_group_ref) | Bastion instances autoscaling group (id/self-link). |
| <a name="output_bastion_instance_private_ip"></a> [bastion_instance_private_ip](#output_bastion_instance_private_ip) | Bastion instance private ip addresses. |
| <a name="output_bastion_instance_public_ip"></a> [bastion_instance_public_ip](#output_bastion_instance_public_ip) | Bastion instance public ip addresses. |
| <a name="output_bastion_instance_ref"></a> [bastion_instance_ref](#output_bastion_instance_ref) | Bastion instance ref. |
| <a name="output_bastion_security_group_ref"></a> [bastion_security_group_ref](#output_bastion_security_group_ref) | Bastion security group reference (id/self-link). |
<!-- END_TF_DOCS -->
15 changes: 0 additions & 15 deletions aws_scale_templates/sub_modules/bastion_template/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,3 @@ output "bastion_security_group_ref" {
value = module.bastion_security_group.sec_group_id
description = "Bastion security group reference (id/self-link)."
}

output "bastion_instance_ref" {
value = module.bastion_autoscaling_group.asg_instance_id
description = "Bastion instance ref."
}

output "bastion_instance_public_ip" {
value = module.bastion_autoscaling_group.asg_instance_public_ip
description = "Bastion instance public ip addresses."
}

output "bastion_instance_private_ip" {
value = module.bastion_autoscaling_group.asg_instance_private_ip
description = "Bastion instance private ip addresses."
}
30 changes: 0 additions & 30 deletions resources/aws/asg/asg_group/asg_group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,6 @@ resource "aws_autoscaling_group" "itself" {
}
}

data "aws_instances" "itself" {
depends_on = [aws_autoscaling_group.itself]

instance_tags = {
Name = var.asg_tags["value"]
}
}

data "aws_instance" "itself" {
count = var.asg_desired_size
depends_on = [data.aws_instances.itself]
instance_id = data.aws_instances.itself.ids[count.index]
}

output "asg_id" {
value = aws_autoscaling_group.itself[*].id
}

output "asg_arn" {
value = aws_autoscaling_group.itself[*].arn
}

output "asg_instance_id" {
value = data.aws_instance.itself[*].id
}

output "asg_instance_public_ip" {
value = data.aws_instance.itself[*].public_ip
}

output "asg_instance_private_ip" {
value = data.aws_instance.itself[*].private_ip
}

0 comments on commit 98922ac

Please sign in to comment.