Skip to content

Commit

Permalink
chore: iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach committed Feb 23, 2024
1 parent cbcffec commit f216fc0
Show file tree
Hide file tree
Showing 18 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions examples/gcp-pubsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ The workload service account will automatically be assigned the necessary GCP Se
| gcp\_service\_account\_workload | ../../humanitec-resource-defs/gcp-service-account/workload | n/a |
| gps\_basic\_subscriber | ../../humanitec-resource-defs/gcp-pubsub-subscription/passthrough | n/a |
| gpt\_basic\_publisher | ../../humanitec-resource-defs/gcp-pubsub-topic/passthrough | n/a |
| iam\_role\_binding\_gcp\_pubsub\_subscription\_subscriber | ../../humanitec-resource-defs/iam-role-binding/gcp-pubsub-subscription | n/a |
| iam\_role\_binding\_gcp\_pubsub\_topic\_publisher | ../../humanitec-resource-defs/iam-role-binding/gcp-pubsub-topic | n/a |
| iam\_role\_binding\_gcp\_pubsub\_subscription\_subscriber | ../../humanitec-resource-defs/gcp-iam-policy-binding/gcp-pubsub-subscription | n/a |
| iam\_role\_binding\_gcp\_pubsub\_topic\_publisher | ../../humanitec-resource-defs/gcp-iam-policy-binding/gcp-pubsub-topic | n/a |
| k8s\_service\_account | ../../humanitec-resource-defs/k8s/service-account | n/a |
| pubsub\_subscription\_basic | ../../humanitec-resource-defs/gcp-pubsub-subscription/basic | n/a |
| pubsub\_topic\_basic | ../../humanitec-resource-defs/gcp-pubsub-topic/basic | n/a |
Expand Down
2 changes: 2 additions & 0 deletions examples/gcp-pubsub/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ module "gcp_service_account_workload" {
project = var.project
credentials = var.credentials
prefix = var.prefix

name = "hrp-ps-$${context.res.id}"
}

resource "humanitec_resource_definition_criteria" "gcp_service_account_workload" {
Expand Down
2 changes: 1 addition & 1 deletion examples/gcp-pubsub/pubsub_subscription.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "humanitec_resource_definition_criteria" "pubsub_subscription_basic" {
# policy

module "iam_role_binding_gcp_pubsub_subscription_subscriber" {
source = "../../humanitec-resource-defs/iam-role-binding/gcp-pubsub-subscription"
source = "../../humanitec-resource-defs/gcp-iam-policy-binding/gcp-pubsub-subscription"

prefix = var.prefix

Expand Down
2 changes: 1 addition & 1 deletion examples/gcp-pubsub/pubsub_topic.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "humanitec_resource_definition_criteria" "pubsub_topic_basic" {
# policy

module "iam_role_binding_gcp_pubsub_topic_publisher" {
source = "../../humanitec-resource-defs/iam-role-binding/gcp-pubsub-topic"
source = "../../humanitec-resource-defs/gcp-iam-policy-binding/gcp-pubsub-topic"

prefix = var.prefix

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
resource "humanitec_resource_definition" "main" {
driver_type = "humanitec/template"
id = "${var.prefix}iam-role-biding-gcp-pubsub-subscription-${var.name}"
name = "${var.prefix}iam-role-biding-gcp-pubsub-subscription-${var.name}"
id = "${var.prefix}gcp-iam-policy-binding-gcp-pubsub-subscription-${var.name}"
name = "${var.prefix}gcp-iam-policy-binding-gcp-pubsub-subscription-${var.name}"

# TODO Switch the GCP type once available
type = "aws-policy"
type = "gcp-iam-policy-binding"

driver_inputs = {
values_string = jsonencode({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
resource "humanitec_resource_definition" "main" {
driver_type = "humanitec/template"
id = "${var.prefix}iam-role-biding-gcp-pubsub-topic-${var.name}"
name = "${var.prefix}iam-role-biding-gcp-pubsub-topic-${var.name}"
id = "${var.prefix}gcp-iam-policy-binding-gcp-pubsub-topic-${var.name}"
name = "${var.prefix}gcp-iam-policy-binding-gcp-pubsub-topic-${var.name}"

# TODO Switch the GCP type once available
type = "aws-policy"
type = "gcp-iam-policy-binding"

driver_inputs = {
values_string = jsonencode({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f216fc0

Please sign in to comment.