File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,14 @@ resource "aws_iam_role_policy_attachment" "cloudwatch_insights" {
32
32
}
33
33
34
34
resource "aws_iam_role_policy_attachment" "vpc_access" {
35
- count = local. enabled && try ( length ( var. vpc_config ), 0 ) > 0 ? 1 : 0
35
+ count = local. enabled && var. vpc_config != null ? 1 : 0
36
36
37
37
policy_arn = " arn:${ local . partition } :iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"
38
38
role = aws_iam_role. this [0 ]. name
39
39
}
40
40
41
41
resource "aws_iam_role_policy_attachment" "xray" {
42
- count = local. enabled && try ( length ( var. tracing_config_mode ), 0 ) > 0 ? 1 : 0
42
+ count = local. enabled && var. tracing_config_mode != null ? 1 : 0
43
43
44
44
policy_arn = " arn:${ local . partition } :iam::aws:policy/AWSXRayDaemonWriteAccess"
45
45
role = aws_iam_role. this [0 ]. name
You can’t perform that action at this time.
0 commit comments