Commit d540591c authored by Adam Robinson's avatar Adam Robinson
Browse files

add in billing subaccount resources

parent d6403791
......@@ -172,31 +172,31 @@ resource "null_resource" "customer_database" {
// Need to make a customer Git repo
# resource "google_billing_subaccount" "customer_subaccount" {
# display_name = "${local.short_mcomm}"
# master_billing_account = local.master_billing_account_id[var.environment]
# rename_on_destroy = true
# }
# resource "google_billing_account_iam_policy" "customer_billing_account_policy" {
# billing_account_id = google_billing_subaccount.customer_subaccount.billing_account_id
# policy_data = data.google_iam_policy.customer_billing_account_policy.policy_data
# }
# data "google_iam_policy" "customer_billing_account_policy" {
# binding {
# role = "roles/billing.user"
# members = [
# "user:${google_service_account.customer_service_account.name}",
# ]
# }
# binding {
# role = "organizations/715302536254/roles/UM_billingUser"
# members = [
# "group:${var.mcomm_group_email}",
# ]
# }
# }
resource "google_billing_subaccount" "customer_subaccount" {
display_name = "${local.short_mcomm}"
master_billing_account = local.master_billing_account_id[var.environment]
deletion_policy = "RENAME_ON_DESTROY"
}
resource "google_billing_account_iam_policy" "customer_billing_account_policy" {
billing_account_id = google_billing_subaccount.customer_subaccount.billing_account_id
policy_data = data.google_iam_policy.customer_billing_account_policy.policy_data
}
data "google_iam_policy" "customer_billing_account_policy" {
binding {
role = "roles/billing.user"
members = [
"user:${google_service_account.customer_service_account.name}",
]
}
binding {
role = "organizations/715302536254/roles/UM_billingUser"
members = [
"group:${var.mcomm_group_email}",
]
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment