Skip to content

Commit 4f29b69

Browse files
committed
fix: Add requested changes
1 parent 57c9832 commit 4f29b69

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

locals.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
locals {
2-
enabled = module.this.enabled ? 1 : 0
3-
42
vpc_cidr_enabled = module.this.enabled && var.allow_vpc_cidr ? 1 : 0
53

64
name_from_descriptor = module.this.enabled ? trim(replace(

main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ data "aws_vpc" "this" {
77
}
88

99
resource "aws_security_group" "this" {
10-
count = local.enabled
10+
count = module.this.enabled ? 1 : 0
1111

1212
vpc_id = var.vpc_id
1313
description = "Security group for Snowflake AWS PrivateLink VPC Endpoint"
@@ -32,7 +32,7 @@ resource "aws_security_group" "this" {
3232
}
3333

3434
resource "aws_vpc_endpoint" "this" {
35-
count = local.enabled
35+
count = module.this.enabled ? 1 : 0
3636

3737
vpc_id = var.vpc_id
3838
service_name = data.snowflake_system_get_privatelink_config.this.aws_vpce_id
@@ -49,7 +49,7 @@ resource "aws_vpc_endpoint" "this" {
4949
}
5050

5151
resource "aws_route53_zone" "this" {
52-
count = local.enabled
52+
count = module.this.enabled ? 1 : 0
5353

5454
name = "privatelink.snowflakecomputing.com"
5555
comment = "Snowflake AWS PrivateLink records"
@@ -62,7 +62,7 @@ resource "aws_route53_zone" "this" {
6262
}
6363

6464
resource "aws_route53_record" "snowflake_private_link_url" {
65-
count = local.enabled
65+
count = module.this.enabled ? 1 : 0
6666

6767
zone_id = one(aws_route53_zone.this[*].zone_id)
6868
name = data.snowflake_system_get_privatelink_config.this.account_url
@@ -72,7 +72,7 @@ resource "aws_route53_record" "snowflake_private_link_url" {
7272
}
7373

7474
resource "aws_route53_record" "snowflake_private_link_ocsp_url" {
75-
count = local.enabled
75+
count = module.this.enabled ? 1 : 0
7676

7777
zone_id = one(aws_route53_zone.this[*].zone_id)
7878
name = data.snowflake_system_get_privatelink_config.this.ocsp_url

0 commit comments

Comments
 (0)