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

zia_user_management Data Source Error on plan/apply #205

Closed
jxg81 opened this issue Mar 9, 2023 · 1 comment · Fixed by #212
Closed

zia_user_management Data Source Error on plan/apply #205

jxg81 opened this issue Mar 9, 2023 · 1 comment · Fixed by #212
Assignees

Comments

@jxg81
Copy link

jxg81 commented Mar 9, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

v1.4.0

Affected Resource(s)

Data Source

  • zia_user_management

Terraform Configuration Files

variable "PASSWORD" {
type = string
description = "Password to ve used for all user creation"
}

data "zia_location_management" "home" {
name = "Home"
}
data "zia_department_management" "workloads" {
name = "workloads"

}
data "zia_group_management" "package_management" {
name = "package_management"
}

data "zia_group_management" "security_services" {
name = "security_services"
}

data "zia_user_management" "julian" {
name = "Julian Greensmith"
}
resource "zia_user_management" "erp_app" {
name = "erp_app"
email = "erp_app@zphyrs.com"
password = var.PASSWORD
groups {
id = [data.zia_group_management.package_management.id, data.zia_group_management.security_services.id]
}
department {
id = data.zia_department_management.workloads.id
}
}

resource "zia_user_management" "web_app" {
name = "web_app"
email = "web_app@zphyrs.com"
password = var.PASSWORD
groups {
id = [data.zia_group_management.package_management.id, data.zia_group_management.security_services.id]
}
department {
id = data.zia_department_management.workloads.id
}
}

resource "zia_user_management" "payroll_app" {
name = "payroll_app"
email = "payroll_app@zphyrs.com"
password = var.PASSWORD
groups {
id = [data.zia_group_management.package_management.id, data.zia_group_management.security_services.id]
}
department {
id = data.zia_department_management.workloads.id
}
}

Debug Output

{"@Level":"error","@message":"Error: Invalid address to set: []string{"groups", "0", "extensions"}","@module":"terraform.ui","@timestamp":"2023-03-09T04:41:30.954790Z","diagnostic":{"severity":"error","summary":"Invalid address to set: []string{"groups", "0", "extensions"}","detail":"","address":"data.zia_user_management.julian","range":{"filename":"users.tf","start":{"line":21,"column":37,"byte":443},"end":{"line":21,"column":38,"byte":444}},"snippet":{"context":"data "zia_user_management" "julian"","code":"data "zia_user_management" "julian" {","start_line":21,"highlight_start_offset":36,"highlight_end_offset":37,"values":[]}},"type":"diagnostic"}
Operation failed: failed running terraform plan (exit 1)�

Panic Output

Expected Behavior

Extract data for existing user

Actual Behavior

Error on terraform plan

Steps to Reproduce

Run plan/apply on following code:

data "zia_user_management" "username" {
name = "username"
}

Important Factoids

References

@willguibr willguibr self-assigned this Mar 10, 2023
@willguibr willguibr added the bug label Mar 23, 2023
@willguibr willguibr linked a pull request Mar 23, 2023 that will close this issue
@willguibr willguibr reopened this Mar 25, 2023
@willguibr
Copy link
Member

HI @jxg81 This is issue has been addressed and the fix will be deployed in the next release v2.5.0 early next week along with other fixes and enhancements.

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

Successfully merging a pull request may close this issue.

2 participants