Skip to content

Commit 4679633

Browse files
haresh-sureshraghavanandanravinadhruve10Raghav Anandancgeers
authored
feat(secure-onboarding) Adding api only secure onboarding support (#429)
* [SSPROD-29309] - Create a resource for GCP API-only onboarding (#407) * SSPROD-29308: Implement CloudAccount client v2 for Secure Change summary: ----------------- Adding a new CloudAccount client v2 for making Secure BE (cloudauth) APIs to support API-only onboarding support. * SSPROD-29308: Update the CloudAccountSecureV2 model object * SSPROD-29308: Use cloudauth proto objects and rename client file * SSPROD-29308: Add cloudauth pb.go files copy * SSPROD-29308: Remove not required protorepo module * Initial draft of resource * go fmt file * Use declared functions * Rename and add resource * Remove unused file * Reformat files * Add alias field * Rebase and add toResourceData function * Implement CRUD operations in resource * Add enabled field * Change type for provider type * Remove unused proto import * Remove setId to empty * Change account_id to id --------- Co-authored-by: Ravina Dhruve <ravina.dhruve@sysdig.com> Co-authored-by: Raghav Anandan <raghav.anandan@raghav.anandan> * SSPROD-29926: Support Provider_Type enum for Cloudauth Account Change summary: ---------------- 1. Fixed and added support for Provider_type enum in the Cloudaccount API. Using encoding/protojson for marshaling/unmarshaling in the cloudauth account client (instead of the common encoding/json based functions used by all clients). Updated the CloudauthAccountSecure model definition to support the same. 2. Made the 'id' field as computed and optional, instead of required. 3. Updated the 'cloud_provider_type' to be string instead of int. Testing done: -------------- - Validated create, read & delete CloudAccount operations via Terraform on staging. - Validated that incorrect provider_type is not allowed. * [SSPROD-29925] - Add features and components to schema (#410) * Add components to schema * Test component type * Add components to schema * fix(cloudauth): update native types * feat(cloudauth): features & components * fix(cloudauth): update resource data * fix(cloudauth): adjust required fields * Fix schema field names * Set features as optional * Convert schema set to map * Check for value before switch case * Populate features only if value is not nil * Setaccount features using function * Refactor fromResourceData function * Parse and populate Service Prinicipal Private Key in metadata --------- Co-authored-by: Raghav Anandan <raghav.anandan@raghav.anandan> Co-authored-by: Christopher Geers <christopher.geers@sysdig.com> Co-authored-by: Ravina Dhruve <ravina.dhruve@sysdig.com> * SSPROD-29302: Provider support for organization resource * SSPROD-29302: Add comment * SSPROD-29302: using proto def * SSPROD-29302: Local copy of pb code * SSPROD-29302: Temp disable Validation * SSPROD-29302: Changes in response to new Cloudauth account * SSPROD-29302: fmt * TF destroy fix (#414) * TF destroy logs * Return map * Fix destroy blockers for features and components * Add features to map dynamically * Refine logic * Define consts for schema keys * Move const to common.go --------- Co-authored-by: Raghav Anandan <raghav.anandan@raghav.anandan> * fix(secure-cloud-account): Support parsing JSON encoded string inputs for Component metadata (#417) * Resolving rebase conflicts * Rebase and use constants for schema field names * Populate all fields of component metadata in Cloudauth Account resource (#420) Change summary: ---------------- Populating all the fields to fill in the GCP service_principal_metadata proto struct (and not just the required fields), since we want to store enough metadata information for potential usecases allowing us to run any future workflows. * Add support for Organization onboarding tests (#421) * Add logs for debug * Add test code for organization resource * Remove logs * Change the provider type and documentation * Change Schema* * Whitespace * Whitespace * Rebase fixes * Add Cloudauth Account resource Tests (#419) * Add Cloudauth Account resource Tests Change summary: ---------------- 1. Added tests for new cloudauth based CloudAccount resource. 2. Minor refactoring of marshal/unmarshal methods of cloudauth client. 3. Added the tests for the marshal/unmarshal methods. * Remove redundant test * Add missing import * Fix test key input format * Comment out failing test until proper fix * Update Org onboarding test with account creation (#424) * Add logs for debug * Remove logs * Create account before organization * Add Cloudauth Account resource Documentation (#422) * Add Cloudauth Account resource Documentation * Minor updates to Cloudauth Account resource Documentation * Fix the resource example * Add reference note section * Removing the provider_type from org resource (#426) * Add logs for debug * Remove logs * Remove provider_type from org resource. * Remove provider_type from the org documentation (#427) * Add logs for debug * Remove logs * Remove provider_type from the doc * Uncomment and add TestAccSecureCloudAuthAccountFC (#425) * Uncomment and add TestAccSecureCloudAuthAccountFC Fixed and updated TestAccSecureCloudAuthAccountFC with feature and component payload in the resource request. * Use ignore_changes in resource snippet for the test * fixing unit tests json asserts * fixing whitespace in json * addressing linting + unit test issues * fixing org & single project gcp cloudauth tests * Fix the TF Read & delete for GCP Org cloudauth * Fix the 404 for cloud account & org --------- Co-authored-by: Raghav <35452664+raghavanandan@users.noreply.github.com> Co-authored-by: Ravina Dhruve <ravina.dhruve@sysdig.com> Co-authored-by: Raghav Anandan <raghav.anandan@raghav.anandan> Co-authored-by: Christopher Geers <christopher.geers@sysdig.com> Co-authored-by: Mandar Kulkarni <mandar.kulkarni@sysdig.com> Co-authored-by: Ravina Dhruve <136399755+ravinadhruve10@users.noreply.github.com> Co-authored-by: Mandar Kulkarni <131720522+mdkulkarni15@users.noreply.github.com>
1 parent 8120b3e commit 4679633

File tree

87 files changed

+5226
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+5226
-236
lines changed

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ require (
88
github.com/falcosecurity/kilt/runtimes/cloudformation v0.0.0-20230606123839-2e4c434d5d88
99
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
1010
github.com/hashicorp/go-retryablehttp v0.7.4
11+
github.com/hashicorp/terraform-plugin-log v0.8.0
1112
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1
1213
github.com/jmespath/go-jmespath v0.4.0
14+
github.com/pkg/errors v0.9.1
1315
github.com/rs/zerolog v1.29.1
1416
github.com/spf13/cast v1.5.1
1517
github.com/stretchr/testify v1.8.4
18+
google.golang.org/protobuf v1.28.1
1619
)
1720

1821
require (
@@ -44,7 +47,6 @@ require (
4447
github.com/hashicorp/terraform-exec v0.18.1 // indirect
4548
github.com/hashicorp/terraform-json v0.16.0 // indirect
4649
github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect
47-
github.com/hashicorp/terraform-plugin-log v0.8.0 // indirect
4850
github.com/hashicorp/terraform-registry-address v0.1.0 // indirect
4951
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
5052
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
@@ -60,7 +62,6 @@ require (
6062
github.com/oklog/run v1.0.0 // indirect
6163
github.com/opencontainers/go-digest v1.0.0 // indirect
6264
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
63-
github.com/pkg/errors v0.9.1 // indirect
6465
github.com/pmezard/go-difflib v1.0.0 // indirect
6566
github.com/sirupsen/logrus v1.9.0 // indirect
6667
github.com/vbatts/tar-split v0.11.2 // indirect
@@ -75,8 +76,7 @@ require (
7576
golang.org/x/sys v0.6.0 // indirect
7677
golang.org/x/text v0.8.0 // indirect
7778
google.golang.org/appengine v1.6.7 // indirect
78-
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
79+
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 // indirect
7980
google.golang.org/grpc v1.51.0 // indirect
80-
google.golang.org/protobuf v1.28.1 // indirect
8181
gopkg.in/yaml.v3 v3.0.1 // indirect
8282
)

go.sum

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
21
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
32
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
43
github.com/Jeffail/gabs/v2 v2.7.0 h1:Y2edYaTcE8ZpRsR2AtmPu5xQdFDIthFG0jYhu5PY8kg=
@@ -25,8 +24,6 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY
2524
github.com/aws/aws-sdk-go v1.44.280 h1:UYl/yxhDxP8naok6ftWyQ9/9ZzNwjC9dvEs/j8BkGhw=
2625
github.com/aws/aws-sdk-go v1.44.280/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
2726
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
28-
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
29-
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
3027
github.com/containerd/stargz-snapshotter/estargz v0.12.1 h1:+7nYmHJb0tEkcRaAW+MHqoKaJYZmkikupxCqVtmPuY0=
3128
github.com/containerd/stargz-snapshotter/estargz v0.12.1/go.mod h1:12VUuCq3qPq4y8yUW+l5w3+oXV3cx2Po3KSe/SmPGqw=
3229
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
@@ -45,8 +42,6 @@ github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryef
4542
github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0=
4643
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
4744
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
48-
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
49-
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
5045
github.com/falcosecurity/kilt/pkg v0.0.0-20230111165949-b36cdd622de1 h1:7JOAJwPA4FEtowSP133pgicOu+nOfo0wGuXapXKhafk=
5146
github.com/falcosecurity/kilt/pkg v0.0.0-20230111165949-b36cdd622de1/go.mod h1:5vLX/acsvZ4KmzUSewi2KVKt6MAm50NIaPB87ofs9j4=
5247
github.com/falcosecurity/kilt/runtimes/cloudformation v0.0.0-20230606123839-2e4c434d5d88 h1:vyeIOHLAt+3rBWVBx+eDYiKgiFwoC32dCAKE86HUQKw=
@@ -69,26 +64,15 @@ github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY
6964
github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc=
7065
github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68=
7166
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
72-
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
73-
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
7467
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
7568
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
7669
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
77-
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
7870
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
79-
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
80-
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
81-
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
82-
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
83-
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
84-
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
8571
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
8672
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
8773
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
88-
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
8974
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
9075
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
91-
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
9276
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
9377
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
9478
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
@@ -208,7 +192,6 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
208192
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
209193
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
210194
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
211-
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
212195
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
213196
github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
214197
github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc=
@@ -263,20 +246,13 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
263246
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
264247
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
265248
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
266-
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
267-
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
268-
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
269-
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
270249
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
271250
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
272251
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
273252
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
274253
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
275254
golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
276-
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
277255
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
278-
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
279-
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
280256
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
281257
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
282258
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -290,17 +266,14 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
290266
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
291267
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
292268
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
293-
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
294269
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
295270
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
296-
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
297271
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
298272
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
299273
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
300274
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
301275
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
302276
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
303-
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
304277
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
305278
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
306279
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -339,10 +312,6 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
339312
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
340313
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
341314
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
342-
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
343-
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
344-
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
345-
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
346315
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
347316
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
348317
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
@@ -353,24 +322,10 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
353322
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
354323
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
355324
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
356-
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
357-
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
358-
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
359-
google.golang.org/genproto v0.0.0-20200711021454-869866162049 h1:YFTFpQhgvrLrmxtiIncJxFXeCyq84ixuKWVCaCAi9Oc=
360-
google.golang.org/genproto v0.0.0-20200711021454-869866162049/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
361-
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
362-
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
363-
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
325+
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 h1:jmIfw8+gSvXcZSgaFAGyInDXeWzUhvYH57G/5GKMn70=
326+
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
364327
google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
365328
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
366-
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
367-
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
368-
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
369-
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
370-
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
371-
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
372-
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
373-
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
374329
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
375330
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
376331
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
@@ -393,5 +348,3 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C
393348
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
394349
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
395350
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
396-
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
397-
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

sysdig/common.go

Lines changed: 58 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,62 @@
11
package sysdig
22

33
const (
4-
SchemaIDKey = "id"
5-
SchemaTeamIDKey = "team_id"
6-
SchemaPoliciesKey = "policies"
7-
SchemaPolicyIDsKey = "policy_ids"
8-
SchemaNameKey = "name"
9-
SchemaTypeKey = "type"
10-
SchemaKindKey = "kind"
11-
SchemaDescriptionKey = "description"
12-
SchemaVersionKey = "version"
13-
SchemaLinkKey = "link"
14-
SchemaAuthorsKey = "authors"
15-
SchemaAuthorKey = "author"
16-
SchemaLastModifiedBy = "last_modified_by"
17-
SchemaLastUpdated = "last_updated"
18-
SchemaExpirationDateKey = "expiration_date"
19-
SchemaPublishedDateKey = "published_date"
20-
SchemaCreatedDateKey = "date_created"
21-
SchemaMinKubeVersionKey = "min_kube_version"
22-
SchemaMaxKubeVersionKey = "max_kube_version"
23-
SchemaIsCustomKey = "is_custom"
24-
SchemaIsActiveKey = "is_active"
25-
SchemaPlatformKey = "platform"
26-
SchemaZonesKey = "zones"
27-
SchemaZonesIDsKey = "zone_ids"
28-
SchemaAllZones = "all_zones"
29-
SchemaScopeKey = "scope"
30-
SchemaScopesKey = "scopes"
31-
SchemaTargetTypeKey = "target_type"
32-
SchemaRoleKey = "role"
33-
SchemaSystemRoleKey = "system_role"
34-
SchemaRulesKey = "rules"
35-
SchemaApiKeyKey = "api_key"
36-
SchemaPermissionsKey = "permissions"
37-
SchemaMonitorPermKey = "monitor_permissions"
38-
SchemaSecurePermKey = "secure_permissions"
39-
SchemaRequestedPermKey = "requested_permissions"
40-
SchemaEnrichedPermKey = "enriched_permissions"
4+
SchemaIDKey = "id"
5+
SchemaTeamIDKey = "team_id"
6+
SchemaPoliciesKey = "policies"
7+
SchemaPolicyIDsKey = "policy_ids"
8+
SchemaNameKey = "name"
9+
SchemaTypeKey = "type"
10+
SchemaKindKey = "kind"
11+
SchemaDescriptionKey = "description"
12+
SchemaVersionKey = "version"
13+
SchemaLinkKey = "link"
14+
SchemaAuthorsKey = "authors"
15+
SchemaAuthorKey = "author"
16+
SchemaLastModifiedBy = "last_modified_by"
17+
SchemaLastUpdated = "last_updated"
18+
SchemaExpirationDateKey = "expiration_date"
19+
SchemaPublishedDateKey = "published_date"
20+
SchemaCreatedDateKey = "date_created"
21+
SchemaMinKubeVersionKey = "min_kube_version"
22+
SchemaMaxKubeVersionKey = "max_kube_version"
23+
SchemaIsCustomKey = "is_custom"
24+
SchemaIsActiveKey = "is_active"
25+
SchemaPlatformKey = "platform"
26+
SchemaZonesKey = "zones"
27+
SchemaZonesIDsKey = "zone_ids"
28+
SchemaAllZones = "all_zones"
29+
SchemaScopeKey = "scope"
30+
SchemaScopesKey = "scopes"
31+
SchemaTargetTypeKey = "target_type"
32+
SchemaRoleKey = "role"
33+
SchemaSystemRoleKey = "system_role"
34+
SchemaRulesKey = "rules"
35+
SchemaApiKeyKey = "api_key"
36+
SchemaPermissionsKey = "permissions"
37+
SchemaMonitorPermKey = "monitor_permissions"
38+
SchemaSecurePermKey = "secure_permissions"
39+
SchemaRequestedPermKey = "requested_permissions"
40+
SchemaEnrichedPermKey = "enriched_permissions"
41+
SchemaSecureThreatDetection = "secure_threat_detection"
42+
SchemaSecureConfigPosture = "secure_config_posture"
43+
SchemaSecureIdentityEntitlement = "secure_identity_entitlement"
44+
SchemaSecureAgentlessScanning = "secure_agentless_scanning"
45+
SchemaMonitorCloudMetrics = "monitor_cloud_metrics"
46+
SchemaType = "type"
47+
SchemaInstance = "instance"
48+
SchemaCloudConnectorMetadata = "cloud_connector_metadata"
49+
SchemaTrustedRoleMetadata = "trusted_role_metadata"
50+
SchemaEventBridgeMetadata = "event_bridge_metadata"
51+
SchemaServicePrincipalMetadata = "service_principal_metadata"
52+
SchemaWebhookDatasourceMetadata = "webhook_datasource_metadata"
53+
SchemaCryptoKeyMetadata = "crypto_key_metadata"
54+
SchemaCloudLogsMetadata = "cloud_logs_metadata"
55+
SchemaEnabled = "enabled"
56+
SchemaComponents = "components"
57+
SchemaComponent = "component"
58+
SchemaCloudProviderId = "provider_id"
59+
SchemaCloudProviderType = "provider_type"
60+
SchemaFeature = "feature"
61+
SchemaManagementAccountId = "management_account_id"
4162
)

sysdig/common_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package sysdig_test
22

33
import (
4-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
54
"os"
65
"strings"
76
"testing"
7+
8+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
89
)
910

1011
const (

0 commit comments

Comments
 (0)