1
- data "snowflake_system_get_privatelink_config" "this" {}
1
+ data "snowflake_system_get_privatelink_config" "this" {
2
+ count = module. this . enabled ? 1 : 0
3
+ }
2
4
3
5
data "aws_vpc" "this" {
4
6
count = local. vpc_cidr_enabled
@@ -35,7 +37,7 @@ resource "aws_vpc_endpoint" "this" {
35
37
count = module. this . enabled ? 1 : 0
36
38
37
39
vpc_id = var. vpc_id
38
- service_name = data. snowflake_system_get_privatelink_config . this . aws_vpce_id
40
+ service_name = one ( data. snowflake_system_get_privatelink_config . this [ * ] . aws_vpce_id )
39
41
vpc_endpoint_type = " Interface"
40
42
security_group_ids = [one (aws_security_group. this [* ]. id )]
41
43
subnet_ids = var. subnet_ids
@@ -65,7 +67,7 @@ resource "aws_route53_record" "snowflake_private_link_url" {
65
67
count = module. this . enabled ? 1 : 0
66
68
67
69
zone_id = one (aws_route53_zone. this [* ]. zone_id )
68
- name = data. snowflake_system_get_privatelink_config . this . account_url
70
+ name = one ( data. snowflake_system_get_privatelink_config . this [ * ] . account_url )
69
71
type = " CNAME"
70
72
ttl = " 300"
71
73
records = [one (aws_vpc_endpoint. this ). dns_entry [0 ][" dns_name" ]]
@@ -75,7 +77,7 @@ resource "aws_route53_record" "snowflake_private_link_ocsp_url" {
75
77
count = module. this . enabled ? 1 : 0
76
78
77
79
zone_id = one (aws_route53_zone. this [* ]. zone_id )
78
- name = data. snowflake_system_get_privatelink_config . this . ocsp_url
80
+ name = one ( data. snowflake_system_get_privatelink_config . this [ * ] . ocsp_url )
79
81
type = " CNAME"
80
82
ttl = " 300"
81
83
records = [one (aws_vpc_endpoint. this ). dns_entry [0 ][" dns_name" ]]
0 commit comments