![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
github.com/shellwhale/terraform-target-autocompletion
Press tab after --target
and get autocomplete suggestions for your resources and modules.
terraform-target-autocompletion
is a Go program that rely on terraform-config-inspect for the heavy lifting.
So it should work with any Terraform version. You don't need anything else than the binary and the completion scripts provided. But currently you'll need Go 1.21.0 installed to build it yourself.
First you have to install the binary
go install github.com/shellwhale/terraform-target-autocompletion@latest
Then you need to setup add the following to your PowerShell $PROFILE
$__terraformTargetCompleterBlock = {
param($supposedToBeDashDashTarget, $commandAst, $cursorPosition);
$cmdElements = $commandAst.CommandElements;
$currentLength = $cmdElements[0].Value.Length + $cmdElements[1].Value.Length + $cmdElements[2].Value.Length + 2
$lengthAfterSearchString = $currentLength + $cmdElements[3].Value.Length + 2
$targetWordLocation = $cmdElements[2].Value;
if ($targetWordLocation -EQ '--target' -OR $targetWordLocation -EQ '-target' -AND $cursorPosition -GT $currentLength -AND $cursorPosition -LE $lengthAfterSearchString) {
$filter = $cmdElements[3].Value;
if ($filter -EQ "") {
$filter = "*";
}
else {
$filter += "*";
}
$completionResults = @();
terraform-target-autocompletion | Where-Object { $_ -like $filter } | Sort-Object | ForEach-Object {
$completionResults += [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
};
# If no completion items were found, return $null to prevent the trigger of the default filesystem completion.
if (-not $completionResults) {
$null;
} else {
$completionResults;
}
}
}
Register-ArgumentCompleter -Native -CommandName 'terraform' -ScriptBlock $__terraformTargetCompleterBlock;
First you have to install the binary
# This will install the binary in your $GOBIN
# Make sure it's in your $PATH
# You can set it with export PATH=$PATH:$(go env GOPATH)/bin
go install github.com/shellwhale/terraform-target-autocompletion@latest
Then you need to setup add the following to your bashrc
This will currently overwrite the terraform -install-autocomplete bash
command so only completion for --target will work. I'm working on a fix for this so you can use both.
#!/bin/bash
terraform_target_autocompletion() {
if [[ ${COMP_CWORD} -eq 2 || ${COMP_CWORD} -eq 3 ]]; then
if [[ ${COMP_WORDS[2]} == "--target" || ${COMP_WORDS[2]} == "-target" ]]; then
if [[ -z ${COMP_WORDS[3]} ]]; then
filter=".*"
else
filter="^${COMP_WORDS[3]}"
fi
COMPREPLY=($(terraform-target-autocompletion | grep "$filter" | sort))
fi
fi
}
complete -F terraform_target_autocompletion terraform
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.