diff --git a/examples/gcs/README.md b/examples/gcs/README.md index e0ca30a..6d6699e 100644 --- a/examples/gcs/README.md +++ b/examples/gcs/README.md @@ -39,8 +39,8 @@ The workload service account will automatically be assigned the necessary GCP Se | gcs\_basic | ../../humanitec-resource-defs/gcs/basic | n/a | | gcs\_basic\_admin | ../../humanitec-resource-defs/gcs/passthrough | n/a | | gcs\_basic\_read\_only | ../../humanitec-resource-defs/gcs/passthrough | n/a | -| iam\_role\_binding\_gcs\_admin | ../../humanitec-resource-defs/iam-role-binding/gcs | n/a | -| iam\_role\_binding\_gcs\_read\_only | ../../humanitec-resource-defs/iam-role-binding/gcs | n/a | +| iam\_role\_binding\_gcs\_admin | ../../humanitec-resource-defs/gcp-iam-policy-binding/gcs | n/a | +| iam\_role\_binding\_gcs\_read\_only | ../../humanitec-resource-defs/gcp-iam-policy-binding/gcs | n/a | | k8s\_service\_account | ../../humanitec-resource-defs/k8s/service-account | n/a | | workload | ../../humanitec-resource-defs/workload/service-account | n/a | diff --git a/examples/gcs/main.tf b/examples/gcs/main.tf index 1531a2f..305adf2 100644 --- a/examples/gcs/main.tf +++ b/examples/gcs/main.tf @@ -44,7 +44,7 @@ resource "humanitec_resource_definition_criteria" "gcs_basic" { ## Policy module "iam_role_binding_gcs_admin" { - source = "../../humanitec-resource-defs/iam-role-binding/gcs" + source = "../../humanitec-resource-defs/gcp-iam-policy-binding/gcs" prefix = var.prefix @@ -80,7 +80,7 @@ resource "humanitec_resource_definition_criteria" "gcs_basic_admin" { ## Policy module "iam_role_binding_gcs_read_only" { - source = "../../humanitec-resource-defs/iam-role-binding/gcs" + source = "../../humanitec-resource-defs/gcp-iam-policy-binding/gcs" prefix = var.prefix diff --git a/humanitec-resource-defs/iam-role-binding/gcs/README.md b/humanitec-resource-defs/gcp-iam-policy-binding/gcs/README.md similarity index 100% rename from humanitec-resource-defs/iam-role-binding/gcs/README.md rename to humanitec-resource-defs/gcp-iam-policy-binding/gcs/README.md diff --git a/humanitec-resource-defs/iam-role-binding/gcs/main.tf b/humanitec-resource-defs/gcp-iam-policy-binding/gcs/main.tf similarity index 66% rename from humanitec-resource-defs/iam-role-binding/gcs/main.tf rename to humanitec-resource-defs/gcp-iam-policy-binding/gcs/main.tf index aa5f3ab..47eab44 100644 --- a/humanitec-resource-defs/iam-role-binding/gcs/main.tf +++ b/humanitec-resource-defs/gcp-iam-policy-binding/gcs/main.tf @@ -1,10 +1,9 @@ resource "humanitec_resource_definition" "main" { driver_type = "humanitec/template" - id = "${var.prefix}iam-role-biding-gcs-${var.name}" - name = "${var.prefix}iam-role-biding-gcs-${var.name}" + id = "${var.prefix}gcp-iam-policy-binding-gcs-${var.name}" + name = "${var.prefix}gcp-iam-policy-binding-gcs-${var.name}" - # TODO Switch the GCP type once available - type = "aws-policy" + type = "gcp-iam-policy-binding" driver_inputs = { values_string = jsonencode({ diff --git a/humanitec-resource-defs/iam-role-binding/gcs/outputs.tf b/humanitec-resource-defs/gcp-iam-policy-binding/gcs/outputs.tf similarity index 100% rename from humanitec-resource-defs/iam-role-binding/gcs/outputs.tf rename to humanitec-resource-defs/gcp-iam-policy-binding/gcs/outputs.tf diff --git a/humanitec-resource-defs/iam-role-binding/gcs/providers.tf b/humanitec-resource-defs/gcp-iam-policy-binding/gcs/providers.tf similarity index 100% rename from humanitec-resource-defs/iam-role-binding/gcs/providers.tf rename to humanitec-resource-defs/gcp-iam-policy-binding/gcs/providers.tf diff --git a/humanitec-resource-defs/iam-role-binding/gcs/terraform.tfvars.example b/humanitec-resource-defs/gcp-iam-policy-binding/gcs/terraform.tfvars.example similarity index 100% rename from humanitec-resource-defs/iam-role-binding/gcs/terraform.tfvars.example rename to humanitec-resource-defs/gcp-iam-policy-binding/gcs/terraform.tfvars.example diff --git a/humanitec-resource-defs/iam-role-binding/gcs/variables.tf b/humanitec-resource-defs/gcp-iam-policy-binding/gcs/variables.tf similarity index 100% rename from humanitec-resource-defs/iam-role-binding/gcs/variables.tf rename to humanitec-resource-defs/gcp-iam-policy-binding/gcs/variables.tf diff --git a/humanitec-resource-defs/gcp-service-account/workload/main.tf b/humanitec-resource-defs/gcp-service-account/workload/main.tf index bd4bd14..44289af 100644 --- a/humanitec-resource-defs/gcp-service-account/workload/main.tf +++ b/humanitec-resource-defs/gcp-service-account/workload/main.tf @@ -26,7 +26,7 @@ resource "humanitec_resource_definition" "main" { namespace = "$${resources.k8s-namespace#k8s-namespace.outputs.namespace}" - bindings = "$${resources.workload>aws-policy.outputs.binding}" + bindings = "$${resources.workload>gcp-iam-policy-binding.outputs.binding}" res_id = "$${context.res.id}" app_id = "$${context.app.id}" diff --git a/humanitec-resource-defs/gcs/passthrough/main.tf b/humanitec-resource-defs/gcs/passthrough/main.tf index 0872aa2..6c74010 100644 --- a/humanitec-resource-defs/gcs/passthrough/main.tf +++ b/humanitec-resource-defs/gcs/passthrough/main.tf @@ -15,7 +15,7 @@ EOL } provision = { - "aws-policy.${var.policy_resource_class}" = { + "gcp-iam-policy-binding.${var.policy_resource_class}" = { match_dependents = true is_dependent = false }