hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io
Other
42.77k stars 9.56k forks source link

Value Conversion Error (Unhandled Null Value) when optional nested object missing from tf configuration #31217

Closed independentid closed 2 years ago

independentid commented 2 years ago

Terraform Version

Terraform v1.2.2 on darwin_amd64

...

Terraform Configuration Files

This was a test configuration. If the "meta = {...}" lines are omitted the provider will throw unhandled null value error below.

data "hexa_policy" "test2" {
  type = "gcp_test"
  policies = [
    {
      id = "Test2Policy1"
      meta = {        // <- will cause error if this optional object not supplied as at least meta={}
        version = "0.1"
        description = "this is a test"
        layer = "application"
      }
      subject = {
        type = "op"
        providerid = "myGoogleIdp"
        role = "canarySelfService"
      }
      actions = [
        {
          name = "Profile Edit"
          actionuri = "ietf:https:PUT|PATCH:/Users/*"
        }
      ]
      object = {
        resourceid = "dummy"
      }
    }
  ]
}

Debug Output

=== RUN   TestAccHexaPolicy2DataSource
2022-06-09T12:24:08.453-0700 [DEBUG] sdk.helper_resource: Starting TestCase: test_name=TestAccHexaPolicy2DataSource
2022-06-09T12:24:08.453-0700 [DEBUG] sdk.helper_resource: Calling TestCase PreCheck: test_name=TestAccHexaPolicy2DataSource
2022-06-09T12:24:08.453-0700 [DEBUG] sdk.helper_resource: Called TestCase PreCheck: test_name=TestAccHexaPolicy2DataSource
2022-06-09T12:24:08.454-0700 [DEBUG] sdk.helper_resource: Found Terraform CLI: test_name=TestAccHexaPolicy2DataSource test_terraform_path=/usr/local/bin/terraform
2022-06-09T12:24:08.508-0700 [DEBUG] sdk.helper_resource: Creating tfprotov6 provider instance: test_name=TestAccHexaPolicy2DataSource test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.509-0700 [DEBUG] sdk.helper_resource: Created tfprotov6 provider instance: test_name=TestAccHexaPolicy2DataSource test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.509-0700 [DEBUG] sdk.helper_resource: Starting tfprotov6 provider instance server: test_name=TestAccHexaPolicy2DataSource test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.510-0700 [DEBUG] sdk.helper_resource: Started tfprotov6 provider instance server: test_name=TestAccHexaPolicy2DataSource test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.555-0700 [DEBUG] sdk.helper_resource: Stopping providers: test_name=TestAccHexaPolicy2DataSource test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751
2022-06-09T12:24:08.556-0700 [DEBUG] sdk.helper_resource: Starting TestSteps: test_name=TestAccHexaPolicy2DataSource test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751
2022-06-09T12:24:08.556-0700 [DEBUG] sdk.helper_resource: Starting TestStep: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751
2022-06-09T12:24:08.556-0700 [DEBUG] sdk.helper_resource: Creating tfprotov6 provider instance: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.556-0700 [DEBUG] sdk.helper_resource: Created tfprotov6 provider instance: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.556-0700 [DEBUG] sdk.helper_resource: Starting tfprotov6 provider instance server: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.557-0700 [DEBUG] sdk.helper_resource: Started tfprotov6 provider instance server: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Called provider defined Provider GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetResources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Called provider defined Provider GetResources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Calling provider defined ResourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema tf_resource_type=scaffolding_example
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Called provider defined ResourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema tf_resource_type=scaffolding_example
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetDataSources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Called provider defined Provider GetDataSources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema tf_data_source_type=scaffolding_example
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema tf_data_source_type=scaffolding_example
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema tf_data_source_type=hexa_policy
2022-06-09T12:24:08.600-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=7dc75bb4-67f0-3a2a-698a-af168b872720 tf_rpc=GetProviderSchema tf_data_source_type=hexa_policy
2022-06-09T12:24:08.605-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Called provider defined Provider GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetResources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Called provider defined Provider GetResources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Calling provider defined ResourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema tf_resource_type=scaffolding_example
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Called provider defined ResourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema tf_resource_type=scaffolding_example
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetDataSources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Called provider defined Provider GetDataSources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema tf_data_source_type=scaffolding_example
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema tf_data_source_type=scaffolding_example
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema tf_data_source_type=hexa_policy
2022-06-09T12:24:08.606-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=96c9cadd-77e6-fd35-83e7-1b0a4ef6f098 tf_rpc=GetProviderSchema tf_data_source_type=hexa_policy
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetDataSources: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined Provider GetDataSources: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType GetSchema: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType GetSchema: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType NewDataSource: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType NewDataSource: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"id\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"id\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"type\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"type\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"id\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"id\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"type\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"type\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"providerid\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"providerid\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"role\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"role\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"network\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"network\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"name\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"name\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"actionuri\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"actionuri\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.607-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"exclude\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.608-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"exclude\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.608-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"resourceid\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.608-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"resourceid\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.608-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"pathspec\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.608-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"pathspec\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.608-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"pathregex\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.608-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"pathregex\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=8e84dc3b-f411-fc3d-ceb9-22953d06d77f tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Called provider defined Provider GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetResources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Called provider defined Provider GetResources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Calling provider defined ResourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema tf_resource_type=scaffolding_example
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Called provider defined ResourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema tf_resource_type=scaffolding_example
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetDataSources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Called provider defined Provider GetDataSources: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema tf_data_source_type=scaffolding_example
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema tf_data_source_type=scaffolding_example
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema tf_data_source_type=hexa_policy
2022-06-09T12:24:08.613-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a06ef639-e25f-b194-23a1-aac5b4492828 tf_rpc=GetProviderSchema tf_data_source_type=hexa_policy
2022-06-09T12:24:08.614-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=b6449ca7-f65b-5809-4b03-5889900d071d tf_rpc=ValidateProviderConfig
2022-06-09T12:24:08.614-0700 [DEBUG] sdk.framework: Called provider defined Provider GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=b6449ca7-f65b-5809-4b03-5889900d071d tf_rpc=ValidateProviderConfig
2022-06-09T12:24:08.614-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"example\")" tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=b6449ca7-f65b-5809-4b03-5889900d071d tf_rpc=ValidateProviderConfig
2022-06-09T12:24:08.614-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"example\")" tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=b6449ca7-f65b-5809-4b03-5889900d071d tf_rpc=ValidateProviderConfig
2022-06-09T12:24:08.615-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=0bb2676e-a5c9-faa4-9201-1a0a0a41175f tf_rpc=ConfigureProvider
2022-06-09T12:24:08.615-0700 [DEBUG] sdk.framework: Called provider defined Provider GetSchema: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=0bb2676e-a5c9-faa4-9201-1a0a0a41175f tf_rpc=ConfigureProvider
2022-06-09T12:24:08.615-0700 [DEBUG] sdk.framework: Calling provider defined Provider Configure: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=0bb2676e-a5c9-faa4-9201-1a0a0a41175f tf_rpc=ConfigureProvider
2022-06-09T12:24:08.615-0700 [DEBUG] sdk.framework: Called provider defined Provider Configure: tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=0bb2676e-a5c9-faa4-9201-1a0a0a41175f tf_rpc=ConfigureProvider
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetDataSources: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Called provider defined Provider GetDataSources: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType GetSchema: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType GetSchema: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType NewDataSource: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType NewDataSource: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"role\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"role\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"network\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"network\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"type\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"type\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"providerid\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"subject\").AttributeName(\"providerid\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"name\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"name\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"actionuri\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"actionuri\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"exclude\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.616-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"actions\").ElementKeyInt(0).AttributeName(\"exclude\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"resourceid\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"resourceid\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"pathspec\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"pathspec\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"pathregex\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"object\").AttributeName(\"pathregex\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"id\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"policies\").ElementKeyInt(0).AttributeName(\"id\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"id\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"id\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Calling provider defined Type Validate: tf_attribute_path="AttributeName(\"type\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Called provider defined Type Validate: tf_attribute_path="AttributeName(\"type\")" tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=a080e6e2-bb26-c022-2c49-7eb0b070c6ef tf_rpc=ValidateDataResourceConfig
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Calling provider defined Provider GetDataSources: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=132e2f4b-0cf3-8711-7299-c966f7a59eb3 tf_rpc=ReadDataSource
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Called provider defined Provider GetDataSources: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=132e2f4b-0cf3-8711-7299-c966f7a59eb3 tf_rpc=ReadDataSource
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType GetSchema: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=132e2f4b-0cf3-8711-7299-c966f7a59eb3 tf_rpc=ReadDataSource
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType GetSchema: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=132e2f4b-0cf3-8711-7299-c966f7a59eb3 tf_rpc=ReadDataSource
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Calling provider defined DataSourceType NewDataSource: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=132e2f4b-0cf3-8711-7299-c966f7a59eb3 tf_rpc=ReadDataSource
2022-06-09T12:24:08.617-0700 [DEBUG] sdk.framework: Called provider defined DataSourceType NewDataSource: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=132e2f4b-0cf3-8711-7299-c966f7a59eb3 tf_rpc=ReadDataSource
2022-06-09T12:24:08.618-0700 [DEBUG] sdk.framework: Calling provider defined DataSource Read: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=132e2f4b-0cf3-8711-7299-c966f7a59eb3 tf_rpc=ReadDataSource
2022/06/09 12:24:08 HexaData got here
2022-06-09T12:24:08.618-0700 [DEBUG] sdk.framework: Called provider defined DataSource Read: tf_data_source_type=hexa_policy tf_provider_addr=registry.terraform.io/hashicorp/hexa tf_req_id=132e2f4b-0cf3-8711-7299-c966f7a59eb3 tf_rpc=ReadDataSource
2022-06-09T12:24:08.625-0700 [WARN]  sdk.helper_resource: Error running Terraform CLI command: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751
  error=
  | exit status 1
  | 2022-06-09T12:24:08.596-0700 [TRACE] unmanaged.provider.stdio: waiting for stdio data
  | 2022-06-09T12:24:08.605-0700 [TRACE] unmanaged.provider.stdio: waiting for stdio data
  | 2022-06-09T12:24:08.613-0700 [TRACE] unmanaged.provider.stdio: waiting for stdio data
  | 
  | Error: Value Conversion Error
  | 
  |   with data.hexa_policy.test2,
  |   on terraform_plugin_test.tf line 2, in data "hexa_policy" "test2":
  |    2: data "hexa_policy" "test2" {
  | 
  | An unexpected error was encountered trying to build a value. This is always
  | an error in the provider. Please report the following to the provider
  | developer:
  | 
  | unhandled null value

2022-06-09T12:24:08.625-0700 [DEBUG] sdk.helper_resource: Stopping providers: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751
2022-06-09T12:24:08.625-0700 [ERROR] sdk.helper_resource: Unexpected error: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751
  error=
  | Error running pre-apply refresh: exit status 1
  | 2022-06-09T12:24:08.596-0700 [TRACE] unmanaged.provider.stdio: waiting for stdio data
  | 2022-06-09T12:24:08.605-0700 [TRACE] unmanaged.provider.stdio: waiting for stdio data
  | 2022-06-09T12:24:08.613-0700 [TRACE] unmanaged.provider.stdio: waiting for stdio data
  | 
  | Error: Value Conversion Error
  | 
  |   with data.hexa_policy.test2,
  |   on terraform_plugin_test.tf line 2, in data "hexa_policy" "test2":
  |    2: data "hexa_policy" "test2" {
  | 
  | An unexpected error was encountered trying to build a value. This is always
  | an error in the provider. Please report the following to the provider
  | developer:
  | 
  | unhandled null value

    hexa_policy_data_source_test.go:27: Step 1/1 error: Error running pre-apply refresh: exit status 1
        2022-06-09T12:24:08.596-0700 [TRACE] unmanaged.provider.stdio: waiting for stdio data
        2022-06-09T12:24:08.605-0700 [TRACE] unmanaged.provider.stdio: waiting for stdio data
        2022-06-09T12:24:08.613-0700 [TRACE] unmanaged.provider.stdio: waiting for stdio data

        Error: Value Conversion Error

          with data.hexa_policy.test2,
          on terraform_plugin_test.tf line 2, in data "hexa_policy" "test2":
           2: data "hexa_policy" "test2" {

        An unexpected error was encountered trying to build a value. This is always
        an error in the provider. Please report the following to the provider
        developer:

        unhandled null value
2022-06-09T12:24:08.625-0700 [DEBUG] sdk.helper_resource: Creating tfprotov6 provider instance: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.625-0700 [DEBUG] sdk.helper_resource: Created tfprotov6 provider instance: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.625-0700 [DEBUG] sdk.helper_resource: Starting tfprotov6 provider instance server: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.626-0700 [DEBUG] sdk.helper_resource: Started tfprotov6 provider instance server: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751 tf_provider_addr=registry.terraform.io/hashicorp/hexa
2022-06-09T12:24:08.667-0700 [DEBUG] sdk.helper_resource: Stopping providers: test_name=TestAccHexaPolicy2DataSource test_step_number=1 test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/x1/89q6ls3w8xl4k0001s7lhf280000gp/T/plugintest2106341751
--- FAIL: TestAccHexaPolicy2DataSource (0.22s)

FAIL

Debugger finished with the exit code 0

Expected Behavior

The documentation indicates that if the parent object is optional then the whole thing may be omitted regardless of whether a child attribute is required. If the parent attribute is provided than optionality is enforced.

In this test, all attributes including the parent and child attributes are optional (Optional: true). Therefore missing optional objects should be accepted (e.g. no "meta={}".

Actual Behavior

Test fails when "meta ..." is omitted even though it is optional.

Steps to Reproduce

Create an attribute with type tfsdk.ListNestedAttributes and then a sub-attribute of type tfsdk.SingleNestedAttributes. Make both the parent and sub-attributes all Optional: true and the error will occur.

Additional Context

Just a simple test of the plugin framework template.

References

Have not found any so far.

independentid commented 2 years ago

Further clarification. The problem does not occur if the underlying object is referential.

This works:

type HexaPolicyType struct {
    Id        types.String   `tfsdk:"id"`
    Meta      MetaType       `tfsdk:"meta"`
    Subject   SubjectType    `tfsdk:"subject"`
    Actions   []ActionType   `tfsdk:"actions"`
    Object    *ObjectType    `tfsdk:"object"`
    Scopes    []ScopeType    `tfsdk:"scopes"`
    Condition *ConditionType `tfsdk:"condition"`
}

This will fail (when an attribute (e.g. "object") is optional:

type HexaPolicyType struct {
    Id        types.String   `tfsdk:"id"`
    Meta      MetaType       `tfsdk:"meta"`
    Subject   SubjectType    `tfsdk:"subject"`
    Actions   []ActionType   `tfsdk:"actions"`
    Object    ObjectType    `tfsdk:"object"`
    Scopes    []ScopeType    `tfsdk:"scopes"`
    Condition ConditionType `tfsdk:"condition"`
}

I suppose this makes sense, but would be nice to have a better error. :)

jbardin commented 2 years ago

Hello @independentid,

Thanks for filing the issue! This looks like an error from the terraform-plugin-framework, not the Terraform cli. This repo is only monitored by some of the core developers, so it would be helpful if you could file the issue in the terraform-plugin-framework repo here

Thanks!

github-actions[bot] commented 2 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.