You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"
│ 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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: