Hi All,
While executing the terraform plan, I am getting following error.
Error: Unsupported attribute
│
│ on runners.tf line 18, in data “template_file” “init_runner”:
│ 18: dynatrace_oneagent_host_group = data.terraform_remote_state.resources_runners_project.outputs.resources_runners_project_id
│ ├────────────────
│ │ data.terraform_remote_state.resources_runners_project.outputs is object with no attributes
│
│ This object does not have an attribute named “resources_runners_project_id”.
╵
Whereas If I check the state for this attribute is gives below output with required details.
$ terraform state show data.terraform_remote_state.resources_runners_project
data.terraform_remote_state.resources_runners_project:
data “terraform_remote_state” “resources_runners_project” {
backend = “gcs”
config = {
bucket = “ren-xxxxxx-resource-tf-ope-xxxx”
prefix = “terraform/state/runners/resources/project”
}
outputs = {
default_identity_with_no_permissions = {
account_id = “sa-with-no-permissions”
description = “A Service Account with no permissions, attached to the GCE instances so they can login to Vault”
disabled = false
display_name = “sa-with-no-permissions”
email = “sa-with-no-permissions@irn-xxxxxx-xxxxx-xxxxx-230.iam.gserviceaccount.com”
id = “projects/irn-xxxxxx-xxxxxx-xxxxx-230/serviceAccounts/sa-with-no-permissions@irn-xxxxxx-xxxxx-xxxxxx-230.iam.gserviceaccount.com”
name = “projects/irn-xxxxxx-xxxxx-xxxxxx-230/serviceAccounts/sa-with-no-permissions@irn-xxxxxx-xxxxx-xxxxxx-230.iam.gserviceaccount.com”
project = “irn–xxxxxx-xxxxx-xxxxxx-230”
timeouts = null
unique_id = “1067xxxxxxxxxxx448”
}
resources_runners_project_id = “irn-xxxxxx-xxxxx-xxxxxx-230”
}
workspace = “xxxxxxxx”
}
Terraform backend is pointing to correct gcs bucket. Terraform state file shows version 1.2.6 and when I execute terraform state pull then it shows version 1.5.6.
Kindly advice