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

Provider doesn't support data source: template_dir #18535

Closed
redscaresu opened this issue Jul 25, 2018 · 5 comments
Closed

Provider doesn't support data source: template_dir #18535

redscaresu opened this issue Jul 25, 2018 · 5 comments

Comments

@redscaresu
Copy link

redscaresu commented Jul 25, 2018

Terraform Version

Terraform v0.11.7

Terraform Configuration Files

data "template_dir" "opt_bin_foo" {
  source_dir = "${path.module}/../data/foo"
  destination_dir = "/opt/bin/foo"
}

### Crash Output
<!--
Error: module.app1_data_1.data.template_dir.opt_bin_foo: Provider doesn't support data source: template_dir
-->

### Expected Behavior
<!--
Allow me to create a data construct for template_dir
-->

### Actual Behavior
<!--
failed because the provider does not support the data source for template_dir
-->

### Steps to Reproduce
<!--
1. `terraform init`
2. `terraform apply`
-->

### Additional Context
<!--
Hi, if there a design reason why this functionality is not already included please free to
let me know.  It would be really useful to be able to use this functionality especially in
the context coreos ignition.  I have not included the debug output because it feels
like this is simply a case of missing functionality.
-->
@mildwonkey
Copy link
Contributor

mildwonkey commented Jul 25, 2018

Hi @redscaresu -

Are you looking for the resource "template_dir" described here, or trying to do something different?

@mildwonkey mildwonkey added question waiting-response An issue/pull request is waiting for a response from the community labels Jul 25, 2018
@redscaresu
Copy link
Author

redscaresu commented Jul 26, 2018

hi @mildwonkey thanks for picking this up.

Yes thats correct so below you can see an example of how i would like to use this, using template_file as an example.

I was hoping to do something similar to this, but instead of using a template_file using a template_dir.

data "template_file" "foo_conf" {
  template = "${file("../../data/foo.tpl")}"

  vars {
    splunk_master = "${var.foo}"
  }
}

but the problem is that template_dir does not support the data type.

@mildwonkey mildwonkey added enhancement provider/template and removed question waiting-response An issue/pull request is waiting for a response from the community labels Jul 26, 2018
@mildwonkey
Copy link
Contributor

Thanks for clarifying @redscaresu! I'll flag this ticket so it gets moved to the template provider repository.
Cheers!

@ghost
Copy link

ghost commented Jul 26, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-template#34 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-template#34.

@ghost
Copy link

ghost commented Apr 2, 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 2, 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