Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROSA-STS Module 0.0.4 - Index null value issues #9

Open
JayavardhanTummidi opened this issue Apr 19, 2023 · 0 comments
Open

ROSA-STS Module 0.0.4 - Index null value issues #9

JayavardhanTummidi opened this issue Apr 19, 2023 · 0 comments

Comments

@JayavardhanTummidi
Copy link

Hi,

In the latest version, 0.0.4, you missed attaching the policies but referred to them as a value from variables, resulting in an attempt to index null value errors.

Here is the module file I used

module "rosa-sts" {
source = "terraform-redhat/rosa-sts/aws"
version = "0.0.4"

insert the 3 required variables here

create_account_roles = true
create_oidc_provider = false
create_operator_roles = false
account_role_prefix = "digital-rosa-cluster"
ocm_environment = "production"
}

Errors from terraform apply

│ Error: Attempt to index null value

│ on .terraform/modules/rosa-sts/account_roles_creation/main.tf line 36, in locals:
│ 36: policy_details = var.account_role_policies["sts_installer_permission_policy"]
│ ├────────────────
│ │ var.account_role_policies is null

│ This value is null, so it does not have any indices.


│ Error: Attempt to index null value

│ on .terraform/modules/rosa-sts/account_roles_creation/main.tf line 43, in locals:
│ 43: policy_details = var.account_role_policies["sts_support_permission_policy"]
│ ├────────────────
│ │ var.account_role_policies is null

│ This value is null, so it does not have any indices.


│ Error: Attempt to index null value

│ on .terraform/modules/rosa-sts/account_roles_creation/main.tf line 50, in locals:
│ 50: policy_details = var.account_role_policies["sts_instance_worker_permission_policy"]
│ ├────────────────
│ │ var.account_role_policies is null

│ This value is null, so it does not have any indices.


│ Error: Attempt to index null value

│ on .terraform/modules/rosa-sts/account_roles_creation/main.tf line 56, in locals:
│ 56: policy_details = var.account_role_policies["sts_instance_controlplane_permission_policy"]
│ ├────────────────
│ │ var.account_role_policies is null

│ This value is null, so it does not have any indices.


│ Error: Attempt to index null value

│ on .terraform/modules/rosa-sts/account_roles_creation/main.tf line 63, in locals:
│ 63: policy_details = var.operator_role_policies["openshift_cloud_network_config_controller_cloud_credentials_policy"]
│ ├────────────────
│ │ var.operator_role_policies is null

│ This value is null, so it does not have any indices.


│ Error: Attempt to index null value

│ on .terraform/modules/rosa-sts/account_roles_creation/main.tf line 70, in locals:
│ 70: policy_details = var.operator_role_policies["openshift_machine_api_aws_cloud_credentials_policy"]
│ ├────────────────
│ │ var.operator_role_policies is null

│ This value is null, so it does not have any indices.


│ Error: Attempt to index null value

│ on .terraform/modules/rosa-sts/account_roles_creation/main.tf line 77, in locals:
│ 77: policy_details = var.operator_role_policies["openshift_cloud_credential_operator_cloud_credential_operator_iam_ro_creds_policy"]
│ ├────────────────
│ │ var.operator_role_policies is null

│ This value is null, so it does not have any indices.


│ Error: Attempt to index null value

│ on .terraform/modules/rosa-sts/account_roles_creation/main.tf line 84, in locals:
│ 84: policy_details = var.operator_role_policies["openshift_image_registry_installer_cloud_credentials_policy"]
│ ├────────────────
│ │ var.operator_role_policies is null

│ This value is null, so it does not have any indices.


│ Error: Attempt to index null value

│ on .terraform/modules/rosa-sts/account_roles_creation/main.tf line 91, in locals:
│ 91: policy_details = var.operator_role_policies["openshift_ingress_operator_cloud_credentials_policy"]
│ ├────────────────
│ │ var.operator_role_policies is null

│ This value is null, so it does not have any indices.


│ Error: Attempt to index null value

│ on .terraform/modules/rosa-sts/account_roles_creation/main.tf line 98, in locals:
│ 98: policy_details = var.operator_role_policies["openshift_cluster_csi_drivers_ebs_cloud_credentials_policy"]
│ ├────────────────
│ │ var.operator_role_policies is null

│ This value is null, so it does not have any indices.

Thanks,
Jayavardhan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant