Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dsb-norge/terraform-tflint-wrappers
Repo for DSBs TFLint wrapper scripts, ref. https://github.com/terraform-linters/tflint
https://github.com/dsb-norge/terraform-tflint-wrappers
Last synced: about 1 month ago
JSON representation
Repo for DSBs TFLint wrapper scripts, ref. https://github.com/terraform-linters/tflint
- Host: GitHub
- URL: https://github.com/dsb-norge/terraform-tflint-wrappers
- Owner: dsb-norge
- License: mit
- Created: 2022-03-22T12:53:41.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-21T10:30:34.000Z (5 months ago)
- Last Synced: 2024-08-21T12:01:16.715Z (5 months ago)
- Language: HCL
- Homepage: https://www.dsb.no
- Size: 71.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-tflint-wrappers
Repo for DSBs TFLint wrapper scripts, ref.
The intention of the scripts in this repo is to provide a compatible and safe way of installing and running TFLint without having to duplicate code in DSBs terraform project repos.
## Call wrapper from remote repo
### Bash from remote repo
This is how to call the linux wrapper script from bash without having to store a copy locally:
```bash
# Without arguments
curl -s https://raw.githubusercontent.com/dsb-norge/terraform-tflint-wrappers/main/tflint_linux.sh |
bash -s --# With arguments
curl -s https://raw.githubusercontent.com/dsb-norge/terraform-tflint-wrappers/main/tflint_linux.sh |
bash -s -- --uninstall
```### Powershell from remote repo
This is how to call the powershell wrapper script without having to store a copy locally:
```powershell
# Without arguments
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/dsb-norge/terraform-tflint-wrappers/main/tflint_windows.ps1'))# With arguments
Invoke-Command `
-ScriptBlock ([scriptblock]::Create(((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/dsb-norge/terraform-tflint-wrappers/main/tflint_windows.ps1')) -join "`n")) `
-ArgumentList $false,$true,$false # Force = false, Remove = true, ExitWithCode = false
```## Development
### Bash
To simulate calling the script from a remote repo during development use:
```bash
# Without arguments
bash -s -- < tflint_linux.sh# With arguments
bash -s -- --uninstall < tflint_linux.sh
```## Powershell
To simulate calling the script from a remote repo during development use:
```powershell
# Without arguments
Invoke-Expression ([String]::Join("`n",(Get-Content '.\tflint_windows.ps1')))# With arguments
Invoke-Command `
-ScriptBlock ([scriptblock]::Create((Get-Content '.\tflint_windows.ps1') -join "`n")) `
-ArgumentList $true,$false,$false # Force = true, Remove = true, ExitWithCode = false
```