Skip to content

Commit 751683a

Browse files
committed
docs: add doc for sysdig_secure_vulnerability_accept_risk
1 parent a828d10 commit 751683a

File tree

6 files changed

+352
-3
lines changed

6 files changed

+352
-3
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,6 @@ dist/
5757

5858
# Nix result
5959
result
60+
61+
main.tf
62+
terraform-providers-schema/

GNUmakefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,30 @@ lint:
7171
errcheck:
7272
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"
7373

74+
# Leverages on nix compiling and configuring the provider using the package.nix and the devshell
75+
init-provider-to-test:
76+
echo 'terraform { ' > main.tf
77+
echo 'required_providers { sysdig = { ' >> main.tf
78+
echo 'source = "sysdiglabs/sysdig" ' >> main.tf
79+
echo 'version = "1.0.0-local" ' >> main.tf
80+
echo '} }' >> main.tf
81+
echo '}' >> main.tf
82+
terraform init
83+
84+
.PHONY: terraform-providers-schema
85+
terraform-providers-schema:
86+
rm -rf terraform-providers-schema
87+
mkdir -p terraform-providers-schema
88+
89+
doccheck: terraform-providers-schema init-provider-to-test
90+
terraform providers schema -json > terraform-providers-schema/schema.json
91+
tfproviderdocs check \
92+
-allowed-resource-subcategories-file website/allowed-subcategories.txt \
93+
-enable-contents-check \
94+
-provider-source registry.terraform.io/sysdiglabs/sysdig \
95+
-providers-schema-json terraform-providers-schema/schema.json \
96+
-require-resource-subcategory
97+
7498
test-compile:
7599
@if [ "$(TEST)" = "./..." ]; then \
76100
echo "ERROR: Set TEST to a specific package. For example,"; \

flake.lock

Lines changed: 18 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,39 @@
22
inputs = {
33
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
44
flake-utils.url = "github:numtide/flake-utils";
5+
tfproviderdocs-init.url = "github:nixos/nixpkgs/pull/366576/head"; # tfproviderdocs is not yet a package in nixpkgs, so this workaronuds it
56
};
67
outputs =
78
{
89
self,
910
nixpkgs,
1011
flake-utils,
12+
tfproviderdocs-init,
1113
}:
1214
let
1315
overlays.default = final: prev: {
1416
terraform-providers = prev.terraform-providers // {
1517
sysdig = prev.callPackage ./package.nix { };
1618
};
1719
};
20+
overlays.tfproviderdocs =
21+
final: prev:
22+
let
23+
pkgs = import tfproviderdocs-init { inherit (prev) system; };
24+
in
25+
{
26+
inherit (pkgs) tfproviderdocs;
27+
};
1828
flake = flake-utils.lib.eachDefaultSystem (
1929
system:
2030
let
2131
pkgs = import nixpkgs {
2232
inherit system;
2333
config.allowUnfree = true;
24-
overlays = [ self.overlays.default ];
34+
overlays = [
35+
self.overlays.default
36+
self.overlays.tfproviderdocs
37+
];
2538
};
2639
in
2740
{
@@ -45,6 +58,8 @@
4558
govulncheck
4659
golangci-lint
4760
golangci-lint-langserver
61+
(terraform.withPlugins (tf: [ tf.sysdig ]))
62+
tfproviderdocs
4863
];
4964
};
5065

package.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ terraform-providers.mkProvider {
1515
repo = "terraform-provider-sysdig";
1616
homepage = "https://registry.terraform.io/providers/sysdiglabs/sysdig";
1717
rev = "1.0.0-local"; # Keeping this version fixed with a `-local` version, so user can just bundle the concrete plugin version with terraform using nix.
18-
vendorHash = "sha256-9ru4RkH2fDWcgM0I3URlWd811PwySktd+gLsEr624WM=";
18+
vendorHash = "sha256-eZl/UKvLG1Yi59oRl70CvrAIyLoyPW0ILWmFMzdUdDQ=";
1919
hash = "";
2020
mkProviderFetcher = { ... }: ./.;
2121
}

0 commit comments

Comments
 (0)