Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Update Azure Terraform dev container HashiCorp Extension settings #1608

Closed
jpogran opened this issue Aug 31, 2022 · 8 comments
Closed

Update Azure Terraform dev container HashiCorp Extension settings #1608

jpogran opened this issue Aug 31, 2022 · 8 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@jpogran
Copy link
Contributor

jpogran commented Aug 31, 2022

Currently the Azure Terraform devcontainer breaks the HashiCorp Extension by contributing incorrect default settings:

"settings": {
"terraform.languageServer": {
"enabled": true,
"args": []
},
"azureTerraform.terminal": "integrated"
},

The terraform.languageServer.args property should not be empty, it should contain at least serve.

In addition, the HashiCorp Extension changed it's setting structure for some settings in v2.24.0. Old settings are still honored for a period of time, but we should update this devcontainer with the correct names.

Taking this all into account, the revised section should be:

"settings": {
  "terraform.languageServer.enable": true,
  "terraform.languageServer.args": [
    "serve"
  ]
}

Alternately, we can omit including these as they are the default values, but it might be safer to keep including them.

I can put up a PR with the changes, but found these settings referenced in a few other files in this repo. Should these be changed manually, or is there a process for those updates?

@Chuxel
Copy link
Member

Chuxel commented Aug 31, 2022

@jpogran We are in the process of restructuring as described in #1589 has been part of the issue here.

FWIW - part of that restructuring enables companies to self-publish "Dev Container Features". Certainly, it could make sense for Hashicorp to take over the current Terraform Dev Container Feature if that makes sense. In the future you'd then be able to update this as you saw fit. Let us know if that makes sense.

Tactically though we could update the contents here since the definition / template part of this has not yet been set up to enable self-publishing.

@bamurtaugh @joshspicer @samruddhikhandale - Looks like this would affect the post-move https://github.com/devcontainers/features/blob/main/src/terraform/devcontainer-feature.json as well.

@Chuxel Chuxel added the bug Issue identified by VS Code Team member as probable bug label Aug 31, 2022
@bamurtaugh
Copy link
Member

@bamurtaugh @joshspicer @samruddhikhandale - Looks like this would affect the post-move https://github.com/devcontainers/features/blob/main/src/terraform/devcontainer-feature.json as well.

I just opened devcontainers/features#124.

@jpogran
Copy link
Contributor Author

jpogran commented Sep 2, 2022

Thank you @bamurtaugh and @Chuxel for the quick reply and modifications. While devcontainers/features#124 does technically fix the broken default setting, I wasn't clear enough in my post to indicate that the settings should be the following:

Taking this all into account, the revised section should be:

"settings": {
  "terraform.languageServer.enable": true,
  "terraform.languageServer.args": [
    "serve"
  ]
}

Apologize for not catching this in your PR earlier, its been a busy week. LMK if you want me to put the PR up.

@bamurtaugh
Copy link
Member

Hi @jpogran, please feel free to open a PR. Thanks!

@jpogran
Copy link
Contributor Author

jpogran commented Sep 2, 2022

Done! Apologies for the back and forth.

@samruddhikhandale
Copy link
Member

@jpogran Thanks for creating the PR, the Terraform Feature is published with your changes. 🚀
Could we close this issue if it looks good?

@jpogran
Copy link
Contributor Author

jpogran commented Sep 6, 2022

Yep! Thank you so much for your help in getting this through!

@samruddhikhandale
Copy link
Member

Closing as fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants