Skip to content

Commit

Permalink
Additional module schemas (#2494)
Browse files Browse the repository at this point in the history
* resman modules

* billing account

* net-vpc subnets

* fast schemas and subnet validation
  • Loading branch information
ludoo authored Aug 9, 2024
1 parent 6c42ac0 commit db04429
Show file tree
Hide file tree
Showing 57 changed files with 504 additions and 216 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=../../../../../modules/organization/schemas/custom-role.schema.json
# yaml-language-server: $schema=../../schemas/custom-role.schema.json

name: gcveNetworkAdmin
includedPermissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=../../../../../modules/organization/schemas/custom-role.schema.json
# yaml-language-server: $schema=../../schemas/custom-role.schema.json

name: networkFirewallPoliciesAdmin
includedPermissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=../../../../../modules/organization/schemas/custom-role.schema.json
# yaml-language-server: $schema=../../schemas/custom-role.schema.json

name: ngfwEnterpriseAdmin
includedPermissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=../../../../../modules/organization/schemas/custom-role.schema.json
# yaml-language-server: $schema=../../schemas/custom-role.schema.json
# this is used by the plan-only admin SA

name: organizationAdminViewer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=../../../../../modules/organization/schemas/custom-role.schema.json
# yaml-language-server: $schema=../../schemas/custom-role.schema.json
# this is needed for use in additive IAM bindings, to avoid conflicts

name: organizationIamAdmin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=../../../../../modules/organization/schemas/custom-role.schema.json
# yaml-language-server: $schema=../../schemas/custom-role.schema.json

name: serviceProjectNetworkAdmin
includedPermissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=../../../../../modules/organization/schemas/custom-role.schema.json
# yaml-language-server: $schema=../../schemas/custom-role.schema.json
# the following permissions are a descoped version of storage.admin

name: storageViewer
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/0-bootstrap/data/custom-roles/tag_viewer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=../../../../../modules/organization/schemas/custom-role.schema.json
# yaml-language-server: $schema=../../schemas/custom-role.schema.json
# the following permissions are a descoped version of tagAdm

name: tagViewer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=../../../../../modules/organization/schemas/custom-role.schema.json
# yaml-language-server: $schema=../../schemas/custom-role.schema.json

name: tenantNetworkAdmin
includedPermissions:
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/0-bootstrap/data/org-policies/compute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# sample subset of useful organization policies, edit to suit requirements
# start of document (---) avoids errors if the file only contains comments

# yaml-language-server: $schema=../../../../../modules/organization/schemas/org-policies.schema.json
# yaml-language-server: $schema=../../schemas/org-policies.schema.json

compute.disableGuestAttributesAccess:
rules:
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/0-bootstrap/data/org-policies/gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# sample subset of useful organization policies, edit to suit requirements
# start of document (---) avoids errors if the file only contains comments

# yaml-language-server: $schema=../../../../../modules/organization/schemas/org-policies.schema.json
# yaml-language-server: $schema=../../schemas/org-policies.schema.json

# gcp.resourceLocations:
# rules:
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/0-bootstrap/data/org-policies/iam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# sample subset of useful organization policies, edit to suit requirements
# start of document (---) avoids errors if the file only contains comments

# yaml-language-server: $schema=../../../../../modules/organization/schemas/org-policies.schema.json
# yaml-language-server: $schema=../../schemas/org-policies.schema.json

iam.automaticIamGrantsForDefaultServiceAccounts:
rules:
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/0-bootstrap/data/org-policies/serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# sample subset of useful organization policies, edit to suit requirements
# start of document (---) avoids errors if the file only contains comments

# yaml-language-server: $schema=../../../../../modules/organization/schemas/org-policies.schema.json
# yaml-language-server: $schema=../../schemas/org-policies.schema.json

run.allowedIngress:
rules:
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/0-bootstrap/data/org-policies/sql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# sample subset of useful organization policies, edit to suit requirements
# start of document (---) avoids errors if the file only contains comments

# yaml-language-server: $schema=../../../../../modules/organization/schemas/org-policies.schema.json
# yaml-language-server: $schema=../../schemas/org-policies.schema.json

sql.restrictAuthorizedNetworks:
rules:
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/0-bootstrap/data/org-policies/storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# sample subset of useful organization policies, edit to suit requirements
# start of document (---) avoids errors if the file only contains comments

# yaml-language-server: $schema=../../../../../modules/organization/schemas/org-policies.schema.json
# yaml-language-server: $schema=../../schemas/org-policies.schema.json

storage.uniformBucketLevelAccess:
rules:
Expand Down
1 change: 1 addition & 0 deletions fast/stages/0-bootstrap/schemas/custom-role.schema.json
1 change: 1 addition & 0 deletions fast/stages/0-bootstrap/schemas/org-policies.schema.json
2 changes: 2 additions & 0 deletions fast/stages/1-resman/data/org-policies/sandbox/compute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# Terraform will be unable to decode this file if it does not contain valid YAML
# You can retain `---` (start of the document) to indicate an empty document.

# yaml-language-server: $schema=../../../schemas/org-policies.schema.json

compute.vmExternalIpAccess:
rules:
- allow:
Expand Down
2 changes: 2 additions & 0 deletions fast/stages/1-resman/data/org-policies/sandbox/sql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# Terraform will be unable to decode this file if it does not contain valid YAML
# You can retain `---` (start of the document) to indicate an empty document.

# yaml-language-server: $schema=../../../schemas/org-policies.schema.json

sql.restrictPublicIp:
rules:
- enforce: true
1 change: 1 addition & 0 deletions fast/stages/1-resman/schemas/org-policies.schema.json
2 changes: 1 addition & 1 deletion fast/stages/1-vpcsc/data/access-levels/geo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# 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
# yaml-language-server: $schema=../../schemas/access-level.schema.json

# this is just an example that reflects the FAST core team members' locations
# and needs to be edited, or not referenced in the perimeter variable
Expand Down
1 change: 1 addition & 0 deletions fast/stages/1-vpcsc/schemas/access-level.schema.json
1 change: 1 addition & 0 deletions fast/stages/1-vpcsc/schemas/egress-policy.schema.json
1 change: 1 addition & 0 deletions fast/stages/1-vpcsc/schemas/ingress-policy.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dev-dataplatform
region: primary
description: Default subnet for dev Data Platform
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dev-default
region: primary
ip_cidr_range: 10.68.0.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dev-gke-nodes
region: primary
description: Default subnet for prod gke nodes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: landing-default
region: primary
ip_cidr_range: 10.64.0.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: prod-default
region: primary
ip_cidr_range: 10.72.0.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dev-dataplatform
region: primary
description: Default subnet for dev Data Platform
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dev-default
region: primary
ip_cidr_range: 10.68.0.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dev-default
region: secondary
ip_cidr_range: 10.84.0.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dev-gke-nodes
region: primary
description: Default subnet for prod gke nodes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dmz-default
region: primary
ip_cidr_range: 10.64.128.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dmz-default
region: secondary
ip_cidr_range: 10.80.128.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: landing-default
region: primary
ip_cidr_range: 10.64.0.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: landing-default
region: secondary
ip_cidr_range: 10.80.0.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: prod-default
region: primary
ip_cidr_range: 10.72.0.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: prod-default
region: secondary
ip_cidr_range: 10.88.0.0/24
Expand Down
1 change: 1 addition & 0 deletions fast/stages/2-networking-b-nva/schemas/subnet.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dev-dataplatform
region: primary
description: Default subnet for dev Data Platform
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dev-default
region: europe-west1
ip_cidr_range: 10.68.0.0/24
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: dev-gke-nodes
region: primary
description: Default subnet for prod gke nodes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# skip boilerplate check

# yaml-language-server: $schema=../../../schemas/subnet.schema.json

name: prod-default
region: primary
ip_cidr_range: 10.72.0.0/24
Expand Down
3 changes: 2 additions & 1 deletion modules/billing-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ module "billing-account" {
```

```yaml
# tftest-file id=test-1 path=data/billing-budgets/folder-net-month-current-100.yaml
display_name: 100 dollars in current spend
amount:
units: 100
Expand All @@ -255,6 +254,8 @@ update_rules:
disable_default_iam_recipients: true
monitoring_notification_channels:
- billing-default

# tftest-file id=test-1 path=data/billing-budgets/folder-net-month-current-100.yaml schema=budget.schema.json
```

<!-- markdownlint-enable -->
Expand Down
Loading

0 comments on commit db04429

Please sign in to comment.