diff --git a/main.tf b/main.tf index 287f550..af36758 100644 --- a/main.tf +++ b/main.tf @@ -9,7 +9,7 @@ terraform { module rosa_operator_roles { source = "./operator_roles" - count = var.create_operator_roles ? 6 : 0 + count = var.create_operator_roles ? (var.is_hosted_cp ? 10 : 6) : 0 cluster_id = var.cluster_id rh_oidc_provider_url = var.rh_oidc_provider_url diff --git a/variables.tf b/variables.tf index 55f0aaa..5622dc6 100644 --- a/variables.tf +++ b/variables.tf @@ -24,6 +24,12 @@ variable operator_roles_properties { } } +variable is_hosted_cp { + description = "Set to true if there is intention to use Red Hat Hosted CP to create appropriate opearator roles" + type = bool + default = false +} + variable create_operator_roles { description = "When using BYO OIDC and reusing the operator roles set to false so as not to create operator roles" type = bool