aws: add more dependencies to prevent race on deletion (#88)

This commit is contained in:
David Dollar 2020-01-29 13:45:03 -05:00 committed by GitHub
parent 14afc2dae0
commit 7e803634eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,11 +33,21 @@ resource "aws_iam_role" "cluster" {
}
resource "aws_iam_role_policy_attachment" "cluster_eks_cluster" {
depends_on = [
aws_subnet.private,
aws_subnet.public,
]
role = aws_iam_role.cluster.name
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy"
}
resource "aws_iam_role_policy_attachment" "cluster_eks_service" {
depends_on = [
aws_subnet.private,
aws_subnet.public,
]
role = aws_iam_role.cluster.name
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSServicePolicy"
}