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

Documentation on 'environments' contradicts IDEA plugin hint #73

Open
zsolt-p opened this issue Oct 15, 2021 · 3 comments
Open

Documentation on 'environments' contradicts IDEA plugin hint #73

zsolt-p opened this issue Oct 15, 2021 · 3 comments

Comments

@zsolt-p
Copy link

zsolt-p commented Oct 15, 2021

Hello,

Just learning about LD and setting up our first config repos in TF.

As I was reading the documentation on launchdarkly_environment at https://registry.terraform.io/providers/launchdarkly/launchdarkly/latest/docs/resources/environment
I came across this line: https://github.com/launchdarkly/terraform-provider-launchdarkly/blame/master/website/docs/r/environment.html.markdown#L14

So I wanted to make my changes accordingly in my local test config. While playing with the below resource configuration in Intellij IDEA (which uses hints from the TF plugin) I see a seemingly contradictory deprecation notice on the environment attribute.

resource "launchdarkly_project" "asd" {
  key  = var.project_key
  name = var.project_name
  tags = [
    "terraform"
  ]

  environments {
    color = ""
    key = ""
    name = ""
  }
}

see here for a screenshot of the deprecation notice tooltip

I don't know where these tooltips are from, but it seems similar to this line: https://github.com/launchdarkly/terraform-provider-launchdarkly/blame/master/CHANGELOG.md#L342

I've had a look at when each commit is dated, the line in the documentation is 13 months ago, the deprecation notice is from 2 years ago, so I'd assume that I am supposed to add environment blocks inside launchrarkly_project blocks instead of separate launchdarkly_environment definitions.

I'd appreciate it if you could please confirm if I'm right about all this. TIA!

@ldhenry
Copy link
Collaborator

ldhenry commented Oct 18, 2021

Hey @zsolt-p,

Thanks for bringing this to our attention. In versions 2+ of the Terraform provider we do encourage the use of nested environments blocks inside the launchdarkly_project.

I'm not personally familiar with the IDEA plugin, but it seems like the provider version it is using to grab descriptions is outdated. There may be a way to update the the plugin's provider versions, but I will have to do some research to find out.

In the mean time, can you paste the output of terraform -v to help us debug this issue?

Thanks,
Henry

@zsolt-p
Copy link
Author

zsolt-p commented Oct 19, 2021

$ terraform --version
Terraform v1.0.0
on linux_amd64

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

@ldhenry
Copy link
Collaborator

ldhenry commented Oct 19, 2021

Thanks. Can you also confirm you are using v2.X of the LaunchDarkly Terraform provider by sharing the output of terraform providers?

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

No branches or pull requests

2 participants