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

null_data_source documentation examples are incorrect #17440

Closed
ThisGuyCodes opened this issue Feb 26, 2018 · 2 comments
Closed

null_data_source documentation examples are incorrect #17440

ThisGuyCodes opened this issue Feb 26, 2018 · 2 comments

Comments

@ThisGuyCodes
Copy link

ThisGuyCodes commented Feb 26, 2018

I'm not sure if this is where documentation issues should be reported, but here we go:

Terraform Version

Terraform v0.11.3
+ provider.null v1.0.0

Terraform Configuration Files

data "null_data_source" "values" {
  inputs = {
    something = "value"
  }
}

output "something" {
  value = "${data.null_data_source.values["something"]}"
}

Expected Behavior

plan succeeds with no changes

Actual Behavior

Error: Error loading REDACTED/this.tf: Error reading config for output something: data.null_data_source.values: data variables must be four parts: data.TYPE.NAME.ATTR in:

${data.null_data_source.values["something"]}

Steps to Reproduce

Run terraform init and terraform plan against the single provided file (above)

Additional Context

Example usage here:
https://www.terraform.io/docs/providers/null/data_source.html
uses this syntax:

data.null_data_source.<name>["<key>"]

(as is used in the sample code I provide above). When in fact the correct syntax (as can be figured out by reading the attribute reference and ignoring the examples) is:

data.null_data_source.<name>.outputs["<key>"]
@ghost
Copy link

ghost commented Feb 27, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-null#14 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-null#14.

@ghost
Copy link

ghost commented Apr 4, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants