You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add support for appset plugin generators (#624)
* feat: add support for appset plugin generators
This has one caveat, which likely cannot be fixed until #615 is merged;
we're limited to simple string maps for `parameters`, which is only a
subset of what the plugin generator supports. In reality pretty much
anything can go in as a parameter from the perspective of the plugin
generator, but `terraform-plugin-sdk` needs an explicit type.
With `terraform-plugin-framework` we can use any as a type, then we can
handle the marshaling/unmarshaling appropriately. I don't believe this
will be a breaking change in the future since we will be widening the
types `parameters` will accept at a later stage.
Fixes#620.
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
* chore: wait for crds to be fully installed
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
---------
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Description: "[Plugin generators](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Plugin/) generates parameters using a custom plugin.",
290
+
Optional: true,
291
+
Elem: &schema.Resource{
292
+
Schema: map[string]*schema.Schema{
293
+
"config_map_ref": {
294
+
Type: schema.TypeString,
295
+
Description: "ConfigMap with the plugin configuration needed to retrieve the data.",
296
+
Required: true,
297
+
},
298
+
"requeue_after_seconds": {
299
+
Type: schema.TypeString,
300
+
Description: "How often to check for changes (in seconds). Default: 3min.",
301
+
Optional: true,
302
+
},
303
+
"input": {
304
+
Type: schema.TypeList,
305
+
Description: "The input parameters used for calling the plugin.",
306
+
Optional: true,
307
+
MaxItems: 1,
308
+
Elem: &schema.Resource{
309
+
Schema: map[string]*schema.Schema{
310
+
"parameters": {
311
+
Type: schema.TypeMap,
312
+
Description: "Arbitrary key-value pairs which are passed directly as parameters to the plugin. A current limitation is that this cannot fully express the parameters that can be accepted by the plugin generator.",
313
+
Required: true,
314
+
Elem: &schema.Schema{Type: schema.TypeString},
315
+
},
316
+
},
317
+
},
318
+
},
319
+
"template": {
320
+
Type: schema.TypeList,
321
+
Description: "Generator template. Used to override the values of the spec-level template.",
322
+
Optional: true,
323
+
MaxItems: 1,
324
+
Elem: applicationSetTemplateResource(true),
325
+
},
326
+
"values": {
327
+
Type: schema.TypeMap,
328
+
Description: "Arbitrary string key-value pairs to pass to the template via the values field of the git generator.",
0 commit comments