Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix restricted services not being added to the perimeter configurations #1085

Merged
merged 1 commit into from
Jan 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions fast/stages/02-security/vpc-sc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,19 @@ locals {
)
}
# compute spec/status for each perimeter
vpc_sc_perimeters = {
vpc_sc_perimeters_spec_status = {
dev = merge(var.vpc_sc_perimeters.dev, {
restricted_services = local._vpc_sc_restricted_services
vpc_accessible_services = local._vpc_sc_vpc_accessible_services
})
landing = merge(var.vpc_sc_perimeters.landing, {
restricted_services = local._vpc_sc_restricted_services
vpc_accessible_services = local._vpc_sc_vpc_accessible_services
})
prod = merge(var.vpc_sc_perimeters.prod, {
restricted_services = local._vpc_sc_restricted_services
vpc_accessible_services = local._vpc_sc_vpc_accessible_services
})
}
}

Expand Down Expand Up @@ -98,13 +106,13 @@ module "vpc-sc" {
dev = {
spec = (
local.vpc_sc_explicit_dry_run_spec
? var.vpc_sc_perimeters.dev
? local.vpc_sc_perimeters_spec_status.dev
: null
)
status = (
local.vpc_sc_explicit_dry_run_spec
? null
: var.vpc_sc_perimeters.dev
: local.vpc_sc_perimeters_spec_status.dev
)
use_explicit_dry_run_spec = local.vpc_sc_explicit_dry_run_spec
}
Expand All @@ -114,13 +122,13 @@ module "vpc-sc" {
landing = {
spec = (
local.vpc_sc_explicit_dry_run_spec
? var.vpc_sc_perimeters.landing
? local.vpc_sc_perimeters_spec_status.landing
: null
)
status = (
local.vpc_sc_explicit_dry_run_spec
? null
: var.vpc_sc_perimeters.landing
: local.vpc_sc_perimeters_spec_status.landing
)
use_explicit_dry_run_spec = local.vpc_sc_explicit_dry_run_spec
}
Expand All @@ -130,13 +138,13 @@ module "vpc-sc" {
prod = {
spec = (
local.vpc_sc_explicit_dry_run_spec
? var.vpc_sc_perimeters.prod
? local.vpc_sc_perimeters_spec_status.prod
: null
)
status = (
local.vpc_sc_explicit_dry_run_spec
? null
: var.vpc_sc_perimeters.prod
: local.vpc_sc_perimeters_spec_status.prod
)
use_explicit_dry_run_spec = local.vpc_sc_explicit_dry_run_spec
}
Expand Down