/
regionSslCertificate.go
254 lines (215 loc) · 16.4 KB
/
regionSslCertificate.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package beta
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a SslCertificate resource in the specified project and region using the data included in the request
type RegionSslCertificate struct {
pulumi.CustomResourceState
// A value read into memory from a certificate file. The certificate file must be in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert.
Certificate pulumi.StringOutput `pulumi:"certificate"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp pulumi.StringOutput `pulumi:"creationTimestamp"`
// An optional description of this resource. Provide this property when you create the resource.
Description pulumi.StringOutput `pulumi:"description"`
// Expire time of the certificate. RFC3339
ExpireTime pulumi.StringOutput `pulumi:"expireTime"`
// Type of the resource. Always compute#sslCertificate for SSL certificates.
Kind pulumi.StringOutput `pulumi:"kind"`
// Configuration and status of a managed SSL certificate.
Managed SslCertificateManagedSslCertificateResponseOutput `pulumi:"managed"`
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name pulumi.StringOutput `pulumi:"name"`
// A value read into memory from a write-only private key file. The private key file must be in PEM format. For security, only insert requests include this field.
PrivateKey pulumi.StringOutput `pulumi:"privateKey"`
Project pulumi.StringOutput `pulumi:"project"`
Region pulumi.StringOutput `pulumi:"region"`
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId pulumi.StringPtrOutput `pulumi:"requestId"`
// [Output only] Server-defined URL for the resource.
SelfLink pulumi.StringOutput `pulumi:"selfLink"`
// Configuration and status of a self-managed SSL certificate.
SelfManaged SslCertificateSelfManagedSslCertificateResponseOutput `pulumi:"selfManaged"`
// Domains associated with the certificate via Subject Alternative Name.
SubjectAlternativeNames pulumi.StringArrayOutput `pulumi:"subjectAlternativeNames"`
// (Optional) Specifies the type of SSL certificate, either "SELF_MANAGED" or "MANAGED". If not specified, the certificate is self-managed and the fields certificate and private_key are used.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewRegionSslCertificate registers a new resource with the given unique name, arguments, and options.
func NewRegionSslCertificate(ctx *pulumi.Context,
name string, args *RegionSslCertificateArgs, opts ...pulumi.ResourceOption) (*RegionSslCertificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Region == nil {
return nil, errors.New("invalid value for required argument 'Region'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"project",
"region",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource RegionSslCertificate
err := ctx.RegisterResource("google-native:compute/beta:RegionSslCertificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRegionSslCertificate gets an existing RegionSslCertificate 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 GetRegionSslCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RegionSslCertificateState, opts ...pulumi.ResourceOption) (*RegionSslCertificate, error) {
var resource RegionSslCertificate
err := ctx.ReadResource("google-native:compute/beta:RegionSslCertificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RegionSslCertificate resources.
type regionSslCertificateState struct {
}
type RegionSslCertificateState struct {
}
func (RegionSslCertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*regionSslCertificateState)(nil)).Elem()
}
type regionSslCertificateArgs struct {
// A value read into memory from a certificate file. The certificate file must be in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert.
Certificate *string `pulumi:"certificate"`
// An optional description of this resource. Provide this property when you create the resource.
Description *string `pulumi:"description"`
// Configuration and status of a managed SSL certificate.
Managed *SslCertificateManagedSslCertificate `pulumi:"managed"`
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name *string `pulumi:"name"`
// A value read into memory from a write-only private key file. The private key file must be in PEM format. For security, only insert requests include this field.
PrivateKey *string `pulumi:"privateKey"`
Project *string `pulumi:"project"`
Region string `pulumi:"region"`
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId *string `pulumi:"requestId"`
// Configuration and status of a self-managed SSL certificate.
SelfManaged *SslCertificateSelfManagedSslCertificate `pulumi:"selfManaged"`
// (Optional) Specifies the type of SSL certificate, either "SELF_MANAGED" or "MANAGED". If not specified, the certificate is self-managed and the fields certificate and private_key are used.
Type *RegionSslCertificateType `pulumi:"type"`
}
// The set of arguments for constructing a RegionSslCertificate resource.
type RegionSslCertificateArgs struct {
// A value read into memory from a certificate file. The certificate file must be in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert.
Certificate pulumi.StringPtrInput
// An optional description of this resource. Provide this property when you create the resource.
Description pulumi.StringPtrInput
// Configuration and status of a managed SSL certificate.
Managed SslCertificateManagedSslCertificatePtrInput
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name pulumi.StringPtrInput
// A value read into memory from a write-only private key file. The private key file must be in PEM format. For security, only insert requests include this field.
PrivateKey pulumi.StringPtrInput
Project pulumi.StringPtrInput
Region pulumi.StringInput
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId pulumi.StringPtrInput
// Configuration and status of a self-managed SSL certificate.
SelfManaged SslCertificateSelfManagedSslCertificatePtrInput
// (Optional) Specifies the type of SSL certificate, either "SELF_MANAGED" or "MANAGED". If not specified, the certificate is self-managed and the fields certificate and private_key are used.
Type RegionSslCertificateTypePtrInput
}
func (RegionSslCertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*regionSslCertificateArgs)(nil)).Elem()
}
type RegionSslCertificateInput interface {
pulumi.Input
ToRegionSslCertificateOutput() RegionSslCertificateOutput
ToRegionSslCertificateOutputWithContext(ctx context.Context) RegionSslCertificateOutput
}
func (*RegionSslCertificate) ElementType() reflect.Type {
return reflect.TypeOf((**RegionSslCertificate)(nil)).Elem()
}
func (i *RegionSslCertificate) ToRegionSslCertificateOutput() RegionSslCertificateOutput {
return i.ToRegionSslCertificateOutputWithContext(context.Background())
}
func (i *RegionSslCertificate) ToRegionSslCertificateOutputWithContext(ctx context.Context) RegionSslCertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(RegionSslCertificateOutput)
}
type RegionSslCertificateOutput struct{ *pulumi.OutputState }
func (RegionSslCertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RegionSslCertificate)(nil)).Elem()
}
func (o RegionSslCertificateOutput) ToRegionSslCertificateOutput() RegionSslCertificateOutput {
return o
}
func (o RegionSslCertificateOutput) ToRegionSslCertificateOutputWithContext(ctx context.Context) RegionSslCertificateOutput {
return o
}
// A value read into memory from a certificate file. The certificate file must be in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert.
func (o RegionSslCertificateOutput) Certificate() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.Certificate }).(pulumi.StringOutput)
}
// Creation timestamp in RFC3339 text format.
func (o RegionSslCertificateOutput) CreationTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.CreationTimestamp }).(pulumi.StringOutput)
}
// An optional description of this resource. Provide this property when you create the resource.
func (o RegionSslCertificateOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// Expire time of the certificate. RFC3339
func (o RegionSslCertificateOutput) ExpireTime() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.ExpireTime }).(pulumi.StringOutput)
}
// Type of the resource. Always compute#sslCertificate for SSL certificates.
func (o RegionSslCertificateOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.Kind }).(pulumi.StringOutput)
}
// Configuration and status of a managed SSL certificate.
func (o RegionSslCertificateOutput) Managed() SslCertificateManagedSslCertificateResponseOutput {
return o.ApplyT(func(v *RegionSslCertificate) SslCertificateManagedSslCertificateResponseOutput { return v.Managed }).(SslCertificateManagedSslCertificateResponseOutput)
}
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
func (o RegionSslCertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A value read into memory from a write-only private key file. The private key file must be in PEM format. For security, only insert requests include this field.
func (o RegionSslCertificateOutput) PrivateKey() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.PrivateKey }).(pulumi.StringOutput)
}
func (o RegionSslCertificateOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
func (o RegionSslCertificateOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput)
}
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
func (o RegionSslCertificateOutput) RequestId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringPtrOutput { return v.RequestId }).(pulumi.StringPtrOutput)
}
// [Output only] Server-defined URL for the resource.
func (o RegionSslCertificateOutput) SelfLink() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)
}
// Configuration and status of a self-managed SSL certificate.
func (o RegionSslCertificateOutput) SelfManaged() SslCertificateSelfManagedSslCertificateResponseOutput {
return o.ApplyT(func(v *RegionSslCertificate) SslCertificateSelfManagedSslCertificateResponseOutput {
return v.SelfManaged
}).(SslCertificateSelfManagedSslCertificateResponseOutput)
}
// Domains associated with the certificate via Subject Alternative Name.
func (o RegionSslCertificateOutput) SubjectAlternativeNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringArrayOutput { return v.SubjectAlternativeNames }).(pulumi.StringArrayOutput)
}
// (Optional) Specifies the type of SSL certificate, either "SELF_MANAGED" or "MANAGED". If not specified, the certificate is self-managed and the fields certificate and private_key are used.
func (o RegionSslCertificateOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *RegionSslCertificate) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RegionSslCertificateInput)(nil)).Elem(), &RegionSslCertificate{})
pulumi.RegisterOutputType(RegionSslCertificateOutput{})
}