Skip to content

Commit

Permalink
Remove unused variables/locals from FAST
Browse files Browse the repository at this point in the history
  • Loading branch information
juliocc committed Apr 16, 2024
1 parent e919bb6 commit 6e3aa63
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 41 deletions.
12 changes: 1 addition & 11 deletions fast/stages/0-bootstrap/organization.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,7 @@ locals {
var.org_policies_config.constraints.allowed_policy_member_domains
)
drs_tag_name = "${var.organization.id}/${var.org_policies_config.tag_name}"
fast_custom_roles = [
"organization_admin_viewer",
"organization_iam_admin",
"service_project_network_admin",
"storage_viewer",
"tag_viewer",
"tenant_network_admin",
]

# intermediate values before we merge in what comes from the checklist
_iam_principals = {
for k, v in local.iam_principal_bindings : k => v.authoritative
Expand Down Expand Up @@ -101,9 +94,6 @@ locals {
flatten(values(local._iam_principals)),
keys(local._iam)
))
iam_roles_additive = distinct([
for k, v in local._iam_bindings_additive : v.role
])
}

# TODO: add a check block to ensure our custom roles exist in the factory files
Expand Down
7 changes: 0 additions & 7 deletions fast/stages/0-bootstrap/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,6 @@ variable "fast_features" {
nullable = false
}

variable "group_iam" {
description = "Organization-level authoritative IAM binding for groups, in {GROUP_EMAIL => [ROLES]} format. Group emails need to be static. Can be used in combination with the `iam` variable."
type = map(list(string))
default = {}
nullable = false
}

variable "groups" {
# https://cloud.google.com/docs/enterprise/setup-checklist
description = "Group names or IAM-format principals to grant organization-level permissions. If just the name is provided, the 'group:' principal and organization domain are interpolated."
Expand Down
12 changes: 0 additions & 12 deletions fast/stages/1-resman/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,6 @@ variable "locations" {
nullable = false
}

variable "org_policy_tags" {
# tfdoc:variable:source 0-bootstrap
description = "Resource management tags for organization policy exceptions."
type = object({
key_id = optional(string)
key_name = optional(string)
values = optional(map(string), {})
})
nullable = false
default = {}
}

variable "organization" {
# tfdoc:variable:source 0-bootstrap
description = "Organization details."
Expand Down
3 changes: 1 addition & 2 deletions fast/stages/2-networking-d-separate-envs/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,6 @@
# tfdoc:file:description Networking folder and hierarchical policy.

locals {
custom_roles = coalesce(var.custom_roles, {})
# combine all regions from variables and subnets
regions = distinct(concat(
values(var.regions),
Expand Down
9 changes: 0 additions & 9 deletions fast/stages/2-networking-d-separate-envs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@ variable "billing_account" {
}
}

variable "custom_roles" {
# tfdoc:variable:source 0-bootstrap
description = "Custom roles defined at the org level, in key => id format."
type = object({
service_project_network_admin = string
})
default = null
}

variable "dns" {
description = "DNS configuration."
type = object({
Expand Down

0 comments on commit 6e3aa63

Please sign in to comment.