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 is depricated in Terraform #1874

Open
jessebrennan opened this issue Jan 21, 2022 · 2 comments · May be fixed by #2068
Open

null_data_source is depricated in Terraform #1874

jessebrennan opened this issue Jan 21, 2022 · 2 comments · May be fixed by #2068

Comments

@jessebrennan
Copy link

chalice --version
chalice 1.26.4, python 3.8.3, linux 5.11.0-41-generic
terraform --version
Terraform v1.0.11
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v3.72.0
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0

Your version of Terraform is out of date! The latest version
is 1.1.4. You can update by downloading from https://www.terraform.io/downloads.html

If I run terraform validate on the TF output from Chalice I get:

terraform validate
╷
│ Warning: Deprecated Resource
│ 
│   with module.chalice.data.null_data_source.chalice,
│   on chalice/chalice.tf.json line 99, in data.null_data_source.chalice:
│   99:             }
│ 
│ The null_data_source was historically used to construct intermediate values to re-use elsewhere in configuration, the same can now be achieved using locals
╵
Success! The configuration is valid, but there were some validation warnings as shown above.

@jessebrennan
Copy link
Author

I noticed that chalice 1.26.5 addresses Terraform related issues. I just tested with that version of Chalice, but Terraform still emits the warning.

@jamesls
Copy link
Member

jamesls commented Jan 24, 2022

Yeah the issue is that that null data source provides values that existing Chalice apps might be using in their existing tf templates so removing that provider would break their deployments. I think our best option until a v2.0 is to add a config option that tells chalice to generate the tf template without the null data source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants