Skip to content

Commit

Permalink
add some data
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jul 30, 2024
1 parent d8fc592 commit d6219b0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion aws_data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,26 @@ data "aws_region" "current" {}
data "aws_arn" "current" {
arn = data.aws_caller_identity.current.arn
}

data "aws_subnets" "container-subnets" {
filter {
name = "tag:Name"
values = [local.container_subnets_name]
}
filter {
name = "vpc-id"
values = [data.aws_vpc.eks_vpc.id]
}
}
data "aws_subnets" "lb-subnets" {
filter {
name = "tag:Name"
values = [local.lb_subnets_name]
}
filter {
name = "vpc-id"
values = [data.aws_vpc.eks_vpc.id]
}
}
locals {
base_arn = format("arn:%v:%%v:%v:%v:%%v:%%v", data.aws_arn.current.partition, data.aws_region.current.name, data.aws_caller_identity.current.account_id)
iam_arn = format("arn:%v:iam::%v:%%v", data.aws_arn.current.partition, data.aws_caller_identity.current.account_id)
Expand Down

0 comments on commit d6219b0

Please sign in to comment.