FAST light implementation (#3255)
* data wip * wip data * update org schema, add note on expansion * all schemas, workload notes * Update WORKLOG.md * Update WORKLOG.md * Update WORKLOG.md * Update WORKLOG.md * wip * data wip * wip * wip * wip * wip * org module IAM context (using lookup) * new-style context expansion in project IAM * remove spurious file * project module contexts * finalize context replacement format for project module * revert org module changes * fix tag id interpolation in project * fix tag id interpolation in project * organization module context * organization context test * context expansion for folder tag bindings * test context expansion for tag bindings * service account module context * simplify context local * context for iam service account * nuke blueprints * remove links to blueprints * vpc sc context in project module * Add context to GCS module * Add inline deps to plan_summary script * Make context a top-level variable for folder, organization, sa * Add add context top-level to VPC-SC * move context out of factories_config variable * tfdoc * fix merge * fix merge * fix examples * net-vpc module context * add parent ids to folder context * rename folder parent context * fix folder parent check * new project factory stub * wip * wip * refactor defaults * project iam * bueckts and service accounts * start adding context replacements * better test data * automation resources for folders and projects * automation * add support for project id interpolation * first tested apply * improve IAM description in gcs module * add context to billing account module * add notification channels to billing account module context * add billing budgets to new pf * schemas and defaults * bootstrap wip * bootstrap wip * bootstrap wip * pf outputs * pf fixes * fix pf sample data * bootstrap lite fixes * add locations to organization module contexts * bootstrap lite fixes * org fixes, billing accounts * fix default project parent * bootstrap lite wip * add locations to gcs module context * add context support to logging bucket module * add context to pubsub module * split out iam variables in gcs module * fix logging bucket context test * bootstrap log sink destinations * streamline logging-bucket module variables * fix logging bucket context test * align logging bucket module interface in fast bootstrap * add support for project-level log buckets to project factory * support full context expansion in organization module log sinks * log buckets in fast-lite bootstrap * make og sink type optional in organization module * log sinks in fast-lite bootstrap * set tag values in factory context * bootstrap lite data * output files schema * billing account schema * output files * output providers * gcs output files * boilerplate * tflint * check documentation * check docs * fix project module parent variable validation * fix log bucket examples * allow null parent in project module * silence folder test errors * fix billing account sink example * fix project example * fix billing account module * fix folder tests * fix FAST * fix fast * tfvars outputs * wif * cicd service accounts * cicd * allow defaults in context, minimal org policies * support gcs managed folders in project factory and bootstrap lite * support prefix in provider output files * rename bootstrap stage * gitignore * gitignore * security folder, billing IAM * wip tfvars * fix typo * security IAM * control tag iam/context via variables in organization module * split tag creation from tag IAM to avoid circular refs * port organization module tag changes to project module * implement new-style context expansion in vpc-sc module * fix fast vpc-sc tests * boilerplate * vpc sc stage * schemas * fast-lite compatibility for vpc sc stage * make log project number optional in vpc-sc stage * networking * networking * networking * networking * rename and move new stage under fast * clone pf tests * use context replacement for internal notification channels in billing account module * support service agents in project module iam context replacements * support service agents in project module iam context replacements * add support for kms keys to project module context * experimental pf example test and fixes * fix schemas * fix tests * tfdoc * tfdoc * pf config * experimental pf * remove redundant dot from gcs managed folder IAM keys * bootstrap experimental test * project factory exp stage test * skip tflint for bootstrap experimental test * tflint * fix gcs test * documentation work * documentation work * Update README.md * tfdoc * tfdoc * readme * tfdoc * readme * readme * readme * readme * support universe in pf exp projects * missing universe service agents * org policies import, non-admin billing IAM * todo * fix test * custom constraints * fast classic dataset * fix test data * context replacements in billing module log sinks * fix typo * add support for billing log sinks * update docs * readme * cicd fix and test --------- Co-authored-by: Julio Castillo <jccb@google.com>
This commit is contained in:
committed by
GitHub
parent
dcd762370c
commit
36648b6b63
22
tests/modules/vpc_sc/context.tfvars
Normal file
22
tests/modules/vpc_sc/context.tfvars
Normal file
@@ -0,0 +1,22 @@
|
||||
access_policy = "12345678"
|
||||
context = {
|
||||
identity_sets = {
|
||||
test = ["user:one@example.com", "user:two@example.com"]
|
||||
}
|
||||
project_numbers = {
|
||||
test-0 = 111111
|
||||
test-1 = 222222
|
||||
}
|
||||
resource_sets = {
|
||||
test = ["projects/321", "projects/654"]
|
||||
}
|
||||
service_sets = {
|
||||
test = ["compute.googleapis.com", "container.googleapis.com"]
|
||||
}
|
||||
}
|
||||
factories_config = {
|
||||
access_levels = "data/access-levels"
|
||||
egress_policies = "data/egress-policies"
|
||||
ingress_policies = "data/ingress-policies"
|
||||
perimeters = "data/perimeters"
|
||||
}
|
||||
111
tests/modules/vpc_sc/context.yaml
Normal file
111
tests/modules/vpc_sc/context.yaml
Normal file
@@ -0,0 +1,111 @@
|
||||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
values:
|
||||
google_access_context_manager_access_level.basic["test-context"]:
|
||||
basic:
|
||||
- combining_function: AND
|
||||
conditions:
|
||||
- device_policy: []
|
||||
ip_subnetworks: []
|
||||
members:
|
||||
- user:one@example.com
|
||||
- user:two@example.com
|
||||
negate: null
|
||||
regions: []
|
||||
required_access_levels: []
|
||||
vpc_network_sources: []
|
||||
custom: []
|
||||
description: null
|
||||
name: accessPolicies/12345678/accessLevels/test-context
|
||||
parent: accessPolicies/12345678
|
||||
timeouts: null
|
||||
title: test-context
|
||||
google_access_context_manager_service_perimeter.additive["default"]:
|
||||
description: null
|
||||
name: accessPolicies/12345678/servicePerimeters/default
|
||||
parent: accessPolicies/12345678
|
||||
perimeter_type: PERIMETER_TYPE_REGULAR
|
||||
spec: []
|
||||
status:
|
||||
- egress_policies:
|
||||
- egress_from:
|
||||
- identities:
|
||||
- user:one@example.com
|
||||
- user:two@example.com
|
||||
identity_type: null
|
||||
source_restriction: SOURCE_RESTRICTION_ENABLED
|
||||
sources:
|
||||
- access_level: null
|
||||
resource: projects/111111
|
||||
- access_level: null
|
||||
resource: projects/321
|
||||
- access_level: null
|
||||
resource: projects/654
|
||||
egress_to:
|
||||
- external_resources: null
|
||||
operations:
|
||||
- method_selectors:
|
||||
- method: '*'
|
||||
permission: null
|
||||
service_name: artifactregistry.googleapis.com
|
||||
resources:
|
||||
- projects/111111
|
||||
- projects/321
|
||||
- projects/654
|
||||
roles: []
|
||||
title: test-context
|
||||
ingress_policies:
|
||||
- ingress_from:
|
||||
- identities:
|
||||
- user:one@example.com
|
||||
- user:two@example.com
|
||||
identity_type: null
|
||||
sources:
|
||||
- access_level: '*'
|
||||
resource: null
|
||||
- access_level: null
|
||||
resource: projects/111111
|
||||
- access_level: null
|
||||
resource: projects/321
|
||||
- access_level: null
|
||||
resource: projects/654
|
||||
ingress_to:
|
||||
- operations:
|
||||
- method_selectors: []
|
||||
service_name: '*'
|
||||
resources:
|
||||
- projects/111111
|
||||
- projects/321
|
||||
- projects/654
|
||||
roles: []
|
||||
title: test-context
|
||||
resources:
|
||||
- projects/111111
|
||||
- projects/222222
|
||||
- projects/321
|
||||
- projects/654
|
||||
restricted_services:
|
||||
- compute.googleapis.com
|
||||
- container.googleapis.com
|
||||
vpc_accessible_services: []
|
||||
timeouts: null
|
||||
title: default
|
||||
use_explicit_dry_run_spec: true
|
||||
|
||||
counts:
|
||||
google_access_context_manager_access_level: 1
|
||||
google_access_context_manager_service_perimeter: 1
|
||||
modules: 0
|
||||
resources: 2
|
||||
19
tests/modules/vpc_sc/data/access-levels/test-context.yaml
Normal file
19
tests/modules/vpc_sc/data/access-levels/test-context.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# yaml-language-server: $schema=../../../../../modules/vpc-sc/schemas/access-level.schema.json
|
||||
|
||||
conditions:
|
||||
- members:
|
||||
- $identity_sets:test
|
||||
30
tests/modules/vpc_sc/data/egress-policies/test-context.yaml
Normal file
30
tests/modules/vpc_sc/data/egress-policies/test-context.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# yaml-language-server: $schema=../../../../../modules/vpc-sc/schemas/egress-policy.schema.json
|
||||
|
||||
from:
|
||||
identities:
|
||||
- $identity_sets:test
|
||||
resources:
|
||||
- $project_numbers:test-0
|
||||
- $resource_sets:test
|
||||
to:
|
||||
operations:
|
||||
- service_name: artifactregistry.googleapis.com
|
||||
method_selectors:
|
||||
- "*"
|
||||
resources:
|
||||
- $project_numbers:test-0
|
||||
- $resource_sets:test
|
||||
30
tests/modules/vpc_sc/data/ingress-policies/test-context.yaml
Normal file
30
tests/modules/vpc_sc/data/ingress-policies/test-context.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# yaml-language-server: $schema=../../../../../modules/vpc-sc/schemas/ingress-policy.schema.json
|
||||
|
||||
from:
|
||||
access_levels:
|
||||
- "*"
|
||||
identities:
|
||||
- $identity_sets:test
|
||||
resources:
|
||||
- $project_numbers:test-0
|
||||
- $resource_sets:test
|
||||
to:
|
||||
operations:
|
||||
- service_name: "*"
|
||||
resources:
|
||||
- $project_numbers:test-0
|
||||
- $resource_sets:test
|
||||
31
tests/modules/vpc_sc/data/perimeters/default.yaml
Normal file
31
tests/modules/vpc_sc/data/perimeters/default.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# yaml-language-server: $schema=../../../../../modules/vpc-sc/schemas/perimeters.schema.json
|
||||
|
||||
ignore_resource_changes: true
|
||||
use_explicit_dry_run_spec: true
|
||||
status:
|
||||
access_levels:
|
||||
- test-context
|
||||
egress_policies:
|
||||
- test-context
|
||||
ingress_policies:
|
||||
- test-context
|
||||
restricted_services:
|
||||
- $service_sets:test
|
||||
resources:
|
||||
- $project_numbers:test-0
|
||||
- $project_numbers:test-1
|
||||
- $resource_sets:test
|
||||
88
tests/modules/vpc_sc/data/restricted-services.yaml
Normal file
88
tests/modules/vpc_sc/data/restricted-services.yaml
Normal file
@@ -0,0 +1,88 @@
|
||||
# skip boilerplate check
|
||||
- accessapproval.googleapis.com
|
||||
- adsdatahub.googleapis.com
|
||||
- aiplatform.googleapis.com
|
||||
- alpha-documentai.googleapis.com
|
||||
- apigee.googleapis.com
|
||||
- apigeeconnect.googleapis.com
|
||||
- artifactregistry.googleapis.com
|
||||
- assuredworkloads.googleapis.com
|
||||
- automl.googleapis.com
|
||||
- bigquery.googleapis.com
|
||||
- bigquerydatatransfer.googleapis.com
|
||||
- bigtable.googleapis.com
|
||||
- binaryauthorization.googleapis.com
|
||||
- cloudasset.googleapis.com
|
||||
- cloudbuild.googleapis.com
|
||||
- cloudfunctions.googleapis.com
|
||||
- cloudkms.googleapis.com
|
||||
- cloudprofiler.googleapis.com
|
||||
- cloudresourcemanager.googleapis.com
|
||||
- cloudsearch.googleapis.com
|
||||
- cloudtrace.googleapis.com
|
||||
- composer.googleapis.com
|
||||
- compute.googleapis.com
|
||||
- connectgateway.googleapis.com
|
||||
- contactcenterinsights.googleapis.com
|
||||
- container.googleapis.com
|
||||
- containeranalysis.googleapis.com
|
||||
- containerregistry.googleapis.com
|
||||
- containerthreatdetection.googleapis.com
|
||||
- datacatalog.googleapis.com
|
||||
- dataflow.googleapis.com
|
||||
- datafusion.googleapis.com
|
||||
- dataproc.googleapis.com
|
||||
- datastream.googleapis.com
|
||||
- dialogflow.googleapis.com
|
||||
- dlp.googleapis.com
|
||||
- dns.googleapis.com
|
||||
- documentai.googleapis.com
|
||||
- eventarc.googleapis.com
|
||||
- file.googleapis.com
|
||||
- gameservices.googleapis.com
|
||||
- gkeconnect.googleapis.com
|
||||
- gkehub.googleapis.com
|
||||
- healthcare.googleapis.com
|
||||
- iam.googleapis.com
|
||||
- iaptunnel.googleapis.com
|
||||
- language.googleapis.com
|
||||
- lifesciences.googleapis.com
|
||||
- logging.googleapis.com
|
||||
- managedidentities.googleapis.com
|
||||
- memcache.googleapis.com
|
||||
- meshca.googleapis.com
|
||||
- metastore.googleapis.com
|
||||
- ml.googleapis.com
|
||||
- monitoring.googleapis.com
|
||||
- networkconnectivity.googleapis.com
|
||||
- networkmanagement.googleapis.com
|
||||
- networksecurity.googleapis.com
|
||||
- networkservices.googleapis.com
|
||||
- notebooks.googleapis.com
|
||||
- opsconfigmonitoring.googleapis.com
|
||||
- osconfig.googleapis.com
|
||||
- oslogin.googleapis.com
|
||||
- privateca.googleapis.com
|
||||
- pubsub.googleapis.com
|
||||
- pubsublite.googleapis.com
|
||||
- recaptchaenterprise.googleapis.com
|
||||
- recommender.googleapis.com
|
||||
- redis.googleapis.com
|
||||
- run.googleapis.com
|
||||
- secretmanager.googleapis.com
|
||||
- servicecontrol.googleapis.com
|
||||
- servicedirectory.googleapis.com
|
||||
- spanner.googleapis.com
|
||||
- speakerid.googleapis.com
|
||||
- speech.googleapis.com
|
||||
- sqladmin.googleapis.com
|
||||
- storage.googleapis.com
|
||||
- storagetransfer.googleapis.com
|
||||
- texttospeech.googleapis.com
|
||||
- tpu.googleapis.com
|
||||
- trafficdirector.googleapis.com
|
||||
- transcoder.googleapis.com
|
||||
- translate.googleapis.com
|
||||
- videointelligence.googleapis.com
|
||||
- vision.googleapis.com
|
||||
- vpcaccess.googleapis.com
|
||||
@@ -1,52 +0,0 @@
|
||||
# Copyright 2023 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
values:
|
||||
module.test.google_access_context_manager_service_perimeter.bridge["b1"]:
|
||||
description: null
|
||||
name: accessPolicies/12345678/servicePerimeters/b1
|
||||
parent: accessPolicies/12345678
|
||||
perimeter_type: PERIMETER_TYPE_BRIDGE
|
||||
spec: []
|
||||
status:
|
||||
- access_levels: null
|
||||
egress_policies: []
|
||||
ingress_policies: []
|
||||
resources:
|
||||
- projects/111110
|
||||
- projects/111111
|
||||
restricted_services: null
|
||||
vpc_accessible_services: []
|
||||
title: b1
|
||||
use_explicit_dry_run_spec: false
|
||||
module.test.google_access_context_manager_service_perimeter.bridge["b2"]:
|
||||
description: null
|
||||
name: accessPolicies/12345678/servicePerimeters/b2
|
||||
parent: accessPolicies/12345678
|
||||
perimeter_type: PERIMETER_TYPE_BRIDGE
|
||||
spec:
|
||||
- access_levels: null
|
||||
egress_policies: []
|
||||
ingress_policies: []
|
||||
resources:
|
||||
- projects/222220
|
||||
- projects/222221
|
||||
restricted_services: null
|
||||
vpc_accessible_services: []
|
||||
status: []
|
||||
title: b2
|
||||
use_explicit_dry_run_spec: true
|
||||
|
||||
counts:
|
||||
google_access_context_manager_service_perimeter: 2
|
||||
20
tests/modules/vpc_sc/tftest.yaml
Normal file
20
tests/modules/vpc_sc/tftest.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
module: modules/vpc-sc
|
||||
|
||||
tests:
|
||||
context:
|
||||
extra_dirs:
|
||||
- ../../tests/modules/vpc_sc/data
|
||||
Reference in New Issue
Block a user