@@ -7,7 +7,7 @@ data "aws_vpc" "this" {
7
7
}
8
8
9
9
resource "aws_security_group" "this" {
10
- count = local . enabled
10
+ count = module . this . enabled ? 1 : 0
11
11
12
12
vpc_id = var. vpc_id
13
13
description = " Security group for Snowflake AWS PrivateLink VPC Endpoint"
@@ -32,7 +32,7 @@ resource "aws_security_group" "this" {
32
32
}
33
33
34
34
resource "aws_vpc_endpoint" "this" {
35
- count = local . enabled
35
+ count = module . this . enabled ? 1 : 0
36
36
37
37
vpc_id = var. vpc_id
38
38
service_name = data. snowflake_system_get_privatelink_config . this . aws_vpce_id
@@ -49,7 +49,7 @@ resource "aws_vpc_endpoint" "this" {
49
49
}
50
50
51
51
resource "aws_route53_zone" "this" {
52
- count = local . enabled
52
+ count = module . this . enabled ? 1 : 0
53
53
54
54
name = " privatelink.snowflakecomputing.com"
55
55
comment = " Snowflake AWS PrivateLink records"
@@ -62,7 +62,7 @@ resource "aws_route53_zone" "this" {
62
62
}
63
63
64
64
resource "aws_route53_record" "snowflake_private_link_url" {
65
- count = local . enabled
65
+ count = module . this . enabled ? 1 : 0
66
66
67
67
zone_id = one (aws_route53_zone. this [* ]. zone_id )
68
68
name = data. snowflake_system_get_privatelink_config . this . account_url
@@ -72,7 +72,7 @@ resource "aws_route53_record" "snowflake_private_link_url" {
72
72
}
73
73
74
74
resource "aws_route53_record" "snowflake_private_link_ocsp_url" {
75
- count = local . enabled
75
+ count = module . this . enabled ? 1 : 0
76
76
77
77
zone_id = one (aws_route53_zone. this [* ]. zone_id )
78
78
name = data. snowflake_system_get_privatelink_config . this . ocsp_url
0 commit comments