Skip to content

Fix: env0_configuration_variable import docs #1045

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

lkanerv
Copy link

@lkanerv lkanerv commented May 6, 2025

Issue & Steps to Reproduce / Feature Request

Fix: adds clarity between provider usage and API behavior

Solution

  • For project-scope variable imports, makes clear that project_id must be defined in the env0_configuration_variable resource block (if it is not, then the variable will get replaced and recreated as a GLOBAL variable)

  • For GLOBAL variables, do not provide ScopeId. I initially made the mistake of passing the org ID as ScopeId, which results in the following: Error: Could not find variable. Ensures that the provider docs align with the API expectations.

resource "env0_configuration_variable" "project_var" {
name = "project_var_name"
value = "project_var_value"
project_id = "project_var_id"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this differs from the API arg described in the import config

Copy link
Contributor

@yaronya yaronya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lkanerv
Thank you for your contribution!

This markdown file is auto-generated, and therefore shouldn't be modified directly. Please add your required changes to the resource file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autogenerated by tfplugindocs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to run this, there's an automated github action that updates the docs

@lkanerv
Copy link
Author

lkanerv commented May 9, 2025

Ah, thanks for the heads up! Made my updates to the import example for the resource and regenerated the docs with tfplugindocs.

@lkanerv lkanerv requested a review from yaronya May 9, 2025 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants