-
Notifications
You must be signed in to change notification settings - Fork 66
/
schema_external_feed_create_release_trigger.go
48 lines (46 loc) · 1.89 KB
/
schema_external_feed_create_release_trigger.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package octopusdeploy
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
func getExternalFeedCreateReleaseTriggerSchema() map[string]*schema.Schema {
return map[string]*schema.Schema{
"name": getNameSchema(true),
"space_id": {
Optional: true,
Description: "The space ID associated with the project to attach the trigger.",
Type: schema.TypeString,
ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsNotWhiteSpace),
},
"project_id": {
Description: "The ID of the project to attach the trigger.",
Required: true,
Type: schema.TypeString,
ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsNotWhiteSpace),
},
"channel_id": {
Description: "The ID of the channel in which the release will be created if the action type is CreateRelease.",
Required: true,
Type: schema.TypeString,
ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsNotWhiteSpace),
},
"package": {
Description: "List of referenced packages that will cause the trigger to fire. New versions of any of the packages you select will trigger release creation.",
Optional: true,
Type: schema.TypeList,
Elem: &schema.Resource{Schema: getDeploymentActionSlugPackageSchema()},
},
"primary_package": {
Description: "List of deployment actions for which the primary packages will cause the trigger to fire. New versions of any of the packages you select will trigger release creation.",
Optional: true,
Type: schema.TypeList,
Elem: &schema.Resource{Schema: getDeploymentActionSlugPrimaryPackageSchema()},
},
"is_disabled": {
Description: "Disables the trigger from being run when set.",
Optional: true,
Default: false,
Type: schema.TypeBool,
},
}
}