Add folder factory to project-factory module (#2152)
* WIP Folder Factory * parent keys and general fixes * changes * update README and example test, add support for hierarchy projects --------- Co-authored-by: Ludo <ludomagno@google.com>
This commit is contained in:
@@ -12,306 +12,20 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
values:
|
||||
module.project-factory.module.billing-account[0].google_billing_budget.default["test-100"]:
|
||||
all_updates_rule:
|
||||
- disable_default_iam_recipients: true
|
||||
pubsub_topic: null
|
||||
schema_version: '1.0'
|
||||
amount:
|
||||
- last_period_amount: null
|
||||
specified_amount:
|
||||
- nanos: null
|
||||
units: '100'
|
||||
billing_account: 123456-123456-123456
|
||||
budget_filter:
|
||||
- calendar_period: null
|
||||
credit_types_treatment: INCLUDE_ALL_CREDITS
|
||||
custom_period: []
|
||||
projects:
|
||||
- projects/test-pf-prj-app-1
|
||||
resource_ancestors:
|
||||
- folders/1234567890
|
||||
display_name: 100 dollars in current spend
|
||||
threshold_rules:
|
||||
- spend_basis: CURRENT_SPEND
|
||||
threshold_percent: 0.5
|
||||
- spend_basis: CURRENT_SPEND
|
||||
threshold_percent: 0.75
|
||||
timeouts: null
|
||||
module.project-factory.module.billing-account[0].google_monitoring_notification_channel.default["billing-default"]:
|
||||
description: null
|
||||
display_name: Budget email notification billing-default.
|
||||
enabled: true
|
||||
force_delete: false
|
||||
labels:
|
||||
email_address: gcp-billing-admins@example.com
|
||||
project: foo-billing-audit
|
||||
sensitive_labels: []
|
||||
timeouts: null
|
||||
type: email
|
||||
user_labels: null
|
||||
module.project-factory.module.projects["prj-app-1"].data.google_storage_project_service_account.gcs_sa[0]:
|
||||
project: test-pf-prj-app-1
|
||||
user_project: null
|
||||
module.project-factory.module.projects["prj-app-1"].google_essential_contacts_contact.contact["admin@example.com"]:
|
||||
email: admin@example.com
|
||||
language_tag: en
|
||||
notification_category_subscriptions:
|
||||
- ALL
|
||||
parent: projects/test-pf-prj-app-1
|
||||
timeouts: null
|
||||
? module.project-factory.module.projects["prj-app-1"].google_kms_crypto_key_iam_member.service_identity_cmek["compute.projects/kms-central-prj/locations/europe-west3/keyRings/my-keyring/cryptoKeys/europe3-gce"]
|
||||
: condition: []
|
||||
crypto_key_id: projects/kms-central-prj/locations/europe-west3/keyRings/my-keyring/cryptoKeys/europe3-gce
|
||||
role: roles/cloudkms.cryptoKeyEncrypterDecrypter
|
||||
module.project-factory.module.projects["prj-app-1"].google_project.project[0]:
|
||||
auto_create_network: false
|
||||
billing_account: 012345-67890A-BCDEF0
|
||||
effective_labels:
|
||||
app: app-1
|
||||
environment: test
|
||||
team: foo
|
||||
folder_id: '12345678'
|
||||
labels:
|
||||
app: app-1
|
||||
environment: test
|
||||
team: foo
|
||||
name: test-pf-prj-app-1
|
||||
org_id: null
|
||||
project_id: test-pf-prj-app-1
|
||||
skip_delete: false
|
||||
terraform_labels:
|
||||
app: app-1
|
||||
environment: test
|
||||
team: foo
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-1"].google_project_service.project_services["container.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-1
|
||||
service: container.googleapis.com
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-1"].google_project_service.project_services["stackdriver.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-1
|
||||
service: stackdriver.googleapis.com
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-1"].google_project_service.project_services["storage.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-1
|
||||
service: storage.googleapis.com
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-2"].data.google_storage_project_service_account.gcs_sa[0]:
|
||||
project: test-pf-prj-app-2
|
||||
user_project: null
|
||||
module.project-factory.module.projects["prj-app-2"].google_compute_shared_vpc_service_project.shared_vpc_service[0]:
|
||||
deletion_policy: null
|
||||
host_project: foo-host
|
||||
service_project: test-pf-prj-app-2
|
||||
timeouts: null
|
||||
? module.project-factory.module.projects["prj-app-2"].google_compute_subnetwork_iam_member.shared_vpc_host_robots["europe-west1:prod-default-ew1:cloudservices"]
|
||||
: condition: []
|
||||
project: foo-host
|
||||
region: europe-west1
|
||||
role: roles/compute.networkUser
|
||||
subnetwork: prod-default-ew1
|
||||
? module.project-factory.module.projects["prj-app-2"].google_compute_subnetwork_iam_member.shared_vpc_host_robots["europe-west1:prod-default-ew1:container-engine"]
|
||||
: condition: []
|
||||
project: foo-host
|
||||
region: europe-west1
|
||||
role: roles/compute.networkUser
|
||||
subnetwork: prod-default-ew1
|
||||
? module.project-factory.module.projects["prj-app-2"].google_compute_subnetwork_iam_member.shared_vpc_host_subnets_iam["europe-west1:prod-default-ew1:group:team-1@example.com"]
|
||||
: condition: []
|
||||
member: group:team-1@example.com
|
||||
project: foo-host
|
||||
region: europe-west1
|
||||
role: roles/compute.networkUser
|
||||
subnetwork: prod-default-ew1
|
||||
module.project-factory.module.projects["prj-app-2"].google_essential_contacts_contact.contact["admin@example.com"]:
|
||||
email: admin@example.com
|
||||
language_tag: en
|
||||
notification_category_subscriptions:
|
||||
- ALL
|
||||
parent: projects/test-pf-prj-app-2
|
||||
timeouts: null
|
||||
? module.project-factory.module.projects["prj-app-2"].google_org_policy_policy.default["compute.restrictSharedVpcSubnetworks"]
|
||||
: dry_run_spec: []
|
||||
name: projects/test-pf-prj-app-2/policies/compute.restrictSharedVpcSubnetworks
|
||||
parent: projects/test-pf-prj-app-2
|
||||
spec:
|
||||
- inherit_from_parent: null
|
||||
reset: null
|
||||
rules:
|
||||
- allow_all: null
|
||||
condition: []
|
||||
deny_all: null
|
||||
enforce: null
|
||||
values:
|
||||
- allowed_values:
|
||||
- projects/foo-host/regions/europe-west1/subnetworks/prod-default-ew1
|
||||
denied_values: null
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-2"].google_project.project[0]:
|
||||
auto_create_network: false
|
||||
billing_account: 123456-123456-123456
|
||||
effective_labels:
|
||||
app: app-2
|
||||
environment: test
|
||||
team: foo
|
||||
folder_id: '12345678'
|
||||
labels:
|
||||
app: app-2
|
||||
environment: test
|
||||
team: foo
|
||||
name: test-pf-prj-app-2
|
||||
org_id: null
|
||||
project_id: test-pf-prj-app-2
|
||||
skip_delete: false
|
||||
terraform_labels:
|
||||
app: app-2
|
||||
environment: test
|
||||
team: foo
|
||||
timeouts: null
|
||||
? module.project-factory.module.projects["prj-app-2"].google_project_iam_member.shared_vpc_host_robots["roles/container.hostServiceAgentUser:container-engine"]
|
||||
: condition: []
|
||||
project: foo-host
|
||||
role: roles/container.hostServiceAgentUser
|
||||
? module.project-factory.module.projects["prj-app-2"].google_project_iam_member.shared_vpc_host_robots["roles/vpcaccess.user:cloudrun"]
|
||||
: condition: []
|
||||
project: foo-host
|
||||
role: roles/vpcaccess.user
|
||||
module.project-factory.module.projects["prj-app-2"].google_project_service.project_services["compute.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-2
|
||||
service: compute.googleapis.com
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-2"].google_project_service.project_services["container.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-2
|
||||
service: container.googleapis.com
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-2"].google_project_service.project_services["run.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-2
|
||||
service: run.googleapis.com
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-2"].google_project_service.project_services["stackdriver.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-2
|
||||
service: stackdriver.googleapis.com
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-2"].google_project_service.project_services["storage.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-2
|
||||
service: storage.googleapis.com
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-3"].data.google_storage_project_service_account.gcs_sa[0]:
|
||||
project: test-pf-prj-app-3
|
||||
user_project: null
|
||||
module.project-factory.module.projects["prj-app-3"].google_essential_contacts_contact.contact["admin@example.com"]:
|
||||
email: admin@example.com
|
||||
language_tag: en
|
||||
notification_category_subscriptions:
|
||||
- ALL
|
||||
parent: projects/test-pf-prj-app-3
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-3"].google_project.project[0]:
|
||||
auto_create_network: false
|
||||
billing_account: 123456-123456-123456
|
||||
effective_labels:
|
||||
environment: test
|
||||
folder_id: '12345678'
|
||||
labels:
|
||||
environment: test
|
||||
name: test-pf-prj-app-3
|
||||
org_id: null
|
||||
project_id: test-pf-prj-app-3
|
||||
skip_delete: false
|
||||
terraform_labels:
|
||||
environment: test
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-3"].google_project_service.project_services["run.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-3
|
||||
service: run.googleapis.com
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-3"].google_project_service.project_services["stackdriver.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-3
|
||||
service: stackdriver.googleapis.com
|
||||
timeouts: null
|
||||
module.project-factory.module.projects["prj-app-3"].google_project_service.project_services["storage.googleapis.com"]:
|
||||
disable_dependent_services: false
|
||||
disable_on_destroy: false
|
||||
project: test-pf-prj-app-3
|
||||
service: storage.googleapis.com
|
||||
timeouts: null
|
||||
? module.project-factory.module.service-accounts["prj-app-1/app-1-be"].google_project_iam_member.project-roles["my-host-project-roles/compute.networkUser"]
|
||||
: condition: []
|
||||
project: my-host-project
|
||||
role: roles/compute.networkUser
|
||||
? module.project-factory.module.service-accounts["prj-app-1/app-1-be"].google_project_iam_member.project-roles["test-pf-prj-app-1-roles/logging.logWriter"]
|
||||
: condition: []
|
||||
project: test-pf-prj-app-1
|
||||
role: roles/logging.logWriter
|
||||
? module.project-factory.module.service-accounts["prj-app-1/app-1-be"].google_project_iam_member.project-roles["test-pf-prj-app-1-roles/monitoring.metricWriter"]
|
||||
: condition: []
|
||||
project: test-pf-prj-app-1
|
||||
role: roles/monitoring.metricWriter
|
||||
module.project-factory.module.service-accounts["prj-app-1/app-1-be"].google_service_account.service_account[0]:
|
||||
account_id: app-1-be
|
||||
create_ignore_already_exists: null
|
||||
description: null
|
||||
disabled: false
|
||||
display_name: Terraform-managed.
|
||||
project: test-pf-prj-app-1
|
||||
timeouts: null
|
||||
? module.project-factory.module.service-accounts["prj-app-1/app-1-fe"].google_project_iam_member.project-roles["my-host-project-roles/compute.networkUser"]
|
||||
: condition: []
|
||||
project: my-host-project
|
||||
role: roles/compute.networkUser
|
||||
module.project-factory.module.service-accounts["prj-app-1/app-1-fe"].google_service_account.service_account[0]:
|
||||
account_id: app-1-fe
|
||||
create_ignore_already_exists: null
|
||||
description: null
|
||||
disabled: false
|
||||
display_name: Test app 1 frontend.
|
||||
project: test-pf-prj-app-1
|
||||
timeouts: null
|
||||
module.project-factory.module.service-accounts["prj-app-2/app-2-be"].google_service_account.service_account[0]:
|
||||
account_id: app-2-be
|
||||
create_ignore_already_exists: null
|
||||
description: null
|
||||
disabled: false
|
||||
display_name: Terraform-managed.
|
||||
project: test-pf-prj-app-2
|
||||
timeouts: null
|
||||
|
||||
counts:
|
||||
google_billing_budget: 1
|
||||
google_compute_shared_vpc_service_project: 1
|
||||
google_compute_subnetwork_iam_member: 3
|
||||
google_essential_contacts_contact: 3
|
||||
google_essential_contacts_contact: 4
|
||||
google_folder: 4
|
||||
google_folder_iam_binding: 1
|
||||
google_kms_crypto_key_iam_member: 1
|
||||
google_monitoring_notification_channel: 1
|
||||
google_org_policy_policy: 1
|
||||
google_project: 3
|
||||
google_project: 4
|
||||
google_project_iam_member: 6
|
||||
google_project_service: 11
|
||||
google_project_service: 14
|
||||
google_service_account: 3
|
||||
google_storage_project_service_account: 3
|
||||
modules: 8
|
||||
resources: 37
|
||||
|
||||
outputs: {}
|
||||
google_storage_project_service_account: 4
|
||||
modules: 13
|
||||
resources: 48
|
||||
|
||||
Reference in New Issue
Block a user