/
actionsSecret.go
115 lines (102 loc) · 3.75 KB
/
actionsSecret.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package github
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
type ActionsSecret struct {
pulumi.CustomResourceState
// Date of actionsSecret creation.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Plaintext value of the secret to be encrypted
PlaintextValue pulumi.StringOutput `pulumi:"plaintextValue"`
// Name of the repository
Repository pulumi.StringOutput `pulumi:"repository"`
// Name of the secret
SecretName pulumi.StringOutput `pulumi:"secretName"`
// Date of actionsSecret update.
UpdatedAt pulumi.StringOutput `pulumi:"updatedAt"`
}
// NewActionsSecret registers a new resource with the given unique name, arguments, and options.
func NewActionsSecret(ctx *pulumi.Context,
name string, args *ActionsSecretArgs, opts ...pulumi.ResourceOption) (*ActionsSecret, error) {
if args == nil || args.PlaintextValue == nil {
return nil, errors.New("missing required argument 'PlaintextValue'")
}
if args == nil || args.Repository == nil {
return nil, errors.New("missing required argument 'Repository'")
}
if args == nil || args.SecretName == nil {
return nil, errors.New("missing required argument 'SecretName'")
}
if args == nil {
args = &ActionsSecretArgs{}
}
var resource ActionsSecret
err := ctx.RegisterResource("github:index/actionsSecret:ActionsSecret", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetActionsSecret gets an existing ActionsSecret resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetActionsSecret(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ActionsSecretState, opts ...pulumi.ResourceOption) (*ActionsSecret, error) {
var resource ActionsSecret
err := ctx.ReadResource("github:index/actionsSecret:ActionsSecret", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ActionsSecret resources.
type actionsSecretState struct {
// Date of actionsSecret creation.
CreatedAt *string `pulumi:"createdAt"`
// Plaintext value of the secret to be encrypted
PlaintextValue *string `pulumi:"plaintextValue"`
// Name of the repository
Repository *string `pulumi:"repository"`
// Name of the secret
SecretName *string `pulumi:"secretName"`
// Date of actionsSecret update.
UpdatedAt *string `pulumi:"updatedAt"`
}
type ActionsSecretState struct {
// Date of actionsSecret creation.
CreatedAt pulumi.StringPtrInput
// Plaintext value of the secret to be encrypted
PlaintextValue pulumi.StringPtrInput
// Name of the repository
Repository pulumi.StringPtrInput
// Name of the secret
SecretName pulumi.StringPtrInput
// Date of actionsSecret update.
UpdatedAt pulumi.StringPtrInput
}
func (ActionsSecretState) ElementType() reflect.Type {
return reflect.TypeOf((*actionsSecretState)(nil)).Elem()
}
type actionsSecretArgs struct {
// Plaintext value of the secret to be encrypted
PlaintextValue string `pulumi:"plaintextValue"`
// Name of the repository
Repository string `pulumi:"repository"`
// Name of the secret
SecretName string `pulumi:"secretName"`
}
// The set of arguments for constructing a ActionsSecret resource.
type ActionsSecretArgs struct {
// Plaintext value of the secret to be encrypted
PlaintextValue pulumi.StringInput
// Name of the repository
Repository pulumi.StringInput
// Name of the secret
SecretName pulumi.StringInput
}
func (ActionsSecretArgs) ElementType() reflect.Type {
return reflect.TypeOf((*actionsSecretArgs)(nil)).Elem()
}