/
flexibleAppVersion.go
819 lines (758 loc) · 40.8 KB
/
flexibleAppVersion.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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
// *** 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 appengine
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Flexible App Version resource to create a new version of flexible GAE Application. Based on Google Compute Engine,
// the App Engine flexible environment automatically scales your app up and down while also balancing the load.
// Learn about the differences between the standard environment and the flexible environment
// at https://cloud.google.com/appengine/docs/the-appengine-environments.
//
// > **Note:** The App Engine flexible environment service account uses the member ID `service-[YOUR_PROJECT_NUMBER]@gae-api-prod.google.com.iam.gserviceaccount.com`
// It should have the App Engine Flexible Environment Service Agent role, which will be applied when the `appengineflex.googleapis.com` service is enabled.
//
// To get more information about FlexibleAppVersion, see:
//
// * [API documentation](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)
// * How-to Guides
// * [Official Documentation](https://cloud.google.com/appengine/docs/flexible)
//
// ## Example Usage
// ### App Engine Flexible App Version
//
// ```go
// package main
//
// import (
// "fmt"
//
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/appengine"
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/organizations"
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/projects"
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// myProject, err := organizations.NewProject(ctx, "myProject", &organizations.ProjectArgs{
// ProjectId: pulumi.String("appeng-flex"),
// OrgId: pulumi.String("123456789"),
// BillingAccount: pulumi.String("000000-0000000-0000000-000000"),
// })
// if err != nil {
// return err
// }
// _, err = appengine.NewApplication(ctx, "app", &appengine.ApplicationArgs{
// Project: myProject.ProjectId,
// LocationId: pulumi.String("us-central"),
// })
// if err != nil {
// return err
// }
// service, err := projects.NewService(ctx, "service", &projects.ServiceArgs{
// Project: myProject.ProjectId,
// Service: pulumi.String("appengineflex.googleapis.com"),
// DisableDependentServices: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// gaeApi, err := projects.NewIAMMember(ctx, "gaeApi", &projects.IAMMemberArgs{
// Project: service.Project,
// Role: pulumi.String("roles/compute.networkUser"),
// Member: myProject.Number.ApplyT(func(number string) (string, error) {
// return fmt.Sprintf("%v%v%v", "serviceAccount:service-", number, "@gae-api-prod.google.com.iam.gserviceaccount.com"), nil
// }).(pulumi.StringOutput),
// })
// if err != nil {
// return err
// }
// bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
// Project: myProject.ProjectId,
// })
// if err != nil {
// return err
// }
// object, err := storage.NewBucketObject(ctx, "object", &storage.BucketObjectArgs{
// Bucket: bucket.Name,
// Source: pulumi.NewFileAsset("./test-fixtures/appengine/hello-world.zip"),
// })
// if err != nil {
// return err
// }
// _, err = appengine.NewFlexibleAppVersion(ctx, "myappV1", &appengine.FlexibleAppVersionArgs{
// VersionId: pulumi.String("v1"),
// Project: gaeApi.Project,
// Service: pulumi.String("default"),
// Runtime: pulumi.String("nodejs"),
// Entrypoint: &appengine.FlexibleAppVersionEntrypointArgs{
// Shell: pulumi.String("node ./app.js"),
// },
// Deployment: &appengine.FlexibleAppVersionDeploymentArgs{
// Zip: &appengine.FlexibleAppVersionDeploymentZipArgs{
// SourceUrl: pulumi.All(bucket.Name, object.Name).ApplyT(func(_args []interface{}) (string, error) {
// bucketName := _args[0].(string)
// objectName := _args[1].(string)
// return fmt.Sprintf("%v%v%v%v", "https://storage.googleapis.com/", bucketName, "/", objectName), nil
// }).(pulumi.StringOutput),
// },
// },
// LivenessCheck: &appengine.FlexibleAppVersionLivenessCheckArgs{
// Path: pulumi.String("/"),
// },
// ReadinessCheck: &appengine.FlexibleAppVersionReadinessCheckArgs{
// Path: pulumi.String("/"),
// },
// EnvVariables: pulumi.StringMap{
// "port": pulumi.String("8080"),
// },
// Handlers: appengine.FlexibleAppVersionHandlerArray{
// &appengine.FlexibleAppVersionHandlerArgs{
// UrlRegex: pulumi.String(".*\\/my-path\\/*"),
// SecurityLevel: pulumi.String("SECURE_ALWAYS"),
// Login: pulumi.String("LOGIN_REQUIRED"),
// AuthFailAction: pulumi.String("AUTH_FAIL_ACTION_REDIRECT"),
// StaticFiles: &appengine.FlexibleAppVersionHandlerStaticFilesArgs{
// Path: pulumi.String("my-other-path"),
// UploadPathRegex: pulumi.String(".*\\/my-path\\/*"),
// },
// },
// },
// AutomaticScaling: &appengine.FlexibleAppVersionAutomaticScalingArgs{
// CoolDownPeriod: pulumi.String("120s"),
// CpuUtilization: &appengine.FlexibleAppVersionAutomaticScalingCpuUtilizationArgs{
// TargetUtilization: pulumi.Float64(0.5),
// },
// },
// NoopOnDestroy: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// FlexibleAppVersion can be imported using any of these accepted formats
//
// ```sh
// $ pulumi import gcp:appengine/flexibleAppVersion:FlexibleAppVersion default apps/{{project}}/services/{{service}}/versions/{{version_id}}
// ```
//
// ```sh
// $ pulumi import gcp:appengine/flexibleAppVersion:FlexibleAppVersion default {{project}}/{{service}}/{{version_id}}
// ```
//
// ```sh
// $ pulumi import gcp:appengine/flexibleAppVersion:FlexibleAppVersion default {{service}}/{{version_id}}
// ```
type FlexibleAppVersion struct {
pulumi.CustomResourceState
// Serving configuration for Google Cloud Endpoints.
// Structure is documented below.
ApiConfig FlexibleAppVersionApiConfigPtrOutput `pulumi:"apiConfig"`
// Automatic scaling is based on request rate, response latencies, and other application metrics.
// Structure is documented below.
AutomaticScaling FlexibleAppVersionAutomaticScalingPtrOutput `pulumi:"automaticScaling"`
// Metadata settings that are supplied to this version to enable beta runtime features.
BetaSettings pulumi.StringMapOutput `pulumi:"betaSettings"`
// Duration that static files should be cached by web proxies and browsers.
// Only applicable if the corresponding StaticFilesHandler does not specify its own expiration time.
DefaultExpiration pulumi.StringPtrOutput `pulumi:"defaultExpiration"`
// If set to `true`, the service will be deleted if it is the last version.
DeleteServiceOnDestroy pulumi.BoolPtrOutput `pulumi:"deleteServiceOnDestroy"`
// Code and application artifacts that make up this version.
// Structure is documented below.
Deployment FlexibleAppVersionDeploymentPtrOutput `pulumi:"deployment"`
// Code and application artifacts that make up this version.
// Structure is documented below.
EndpointsApiService FlexibleAppVersionEndpointsApiServicePtrOutput `pulumi:"endpointsApiService"`
// The entrypoint for the application.
// Structure is documented below.
Entrypoint FlexibleAppVersionEntrypointPtrOutput `pulumi:"entrypoint"`
// Environment variables available to the application. As these are not returned in the API request, the provider will not detect any changes made outside of the config.
EnvVariables pulumi.StringMapOutput `pulumi:"envVariables"`
// An ordered list of URL-matching patterns that should be applied to incoming requests.
// The first matching URL handles the request and other request handlers are not attempted.
// Structure is documented below.
Handlers FlexibleAppVersionHandlerArrayOutput `pulumi:"handlers"`
// A list of the types of messages that this application is able to receive.
// Each value may be one of `INBOUND_SERVICE_MAIL`, `INBOUND_SERVICE_MAIL_BOUNCE`, `INBOUND_SERVICE_XMPP_ERROR`, `INBOUND_SERVICE_XMPP_MESSAGE`, `INBOUND_SERVICE_XMPP_SUBSCRIBE`, `INBOUND_SERVICE_XMPP_PRESENCE`, `INBOUND_SERVICE_CHANNEL_PRESENCE`, and `INBOUND_SERVICE_WARMUP`.
InboundServices pulumi.StringArrayOutput `pulumi:"inboundServices"`
// Instance class that is used to run this version. Valid values are
// AutomaticScaling: F1, F2, F4, F4_1G
// ManualScaling: B1, B2, B4, B8, B4_1G
// Defaults to F1 for AutomaticScaling and B1 for ManualScaling.
InstanceClass pulumi.StringPtrOutput `pulumi:"instanceClass"`
// Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.
// Structure is documented below.
LivenessCheck FlexibleAppVersionLivenessCheckOutput `pulumi:"livenessCheck"`
// A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.
// Structure is documented below.
ManualScaling FlexibleAppVersionManualScalingPtrOutput `pulumi:"manualScaling"`
// Full Serverless VPC Access Connector name e.g. /projects/my-project/locations/us-central1/connectors/c1.
Name pulumi.StringOutput `pulumi:"name"`
// Extra network settings
// Structure is documented below.
Network FlexibleAppVersionNetworkPtrOutput `pulumi:"network"`
// Files that match this pattern will not be built into this version. Only applicable for Go runtimes.
NobuildFilesRegex pulumi.StringPtrOutput `pulumi:"nobuildFilesRegex"`
// If set to `true`, the application version will not be deleted.
NoopOnDestroy pulumi.BoolPtrOutput `pulumi:"noopOnDestroy"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringOutput `pulumi:"project"`
// Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation.
// Structure is documented below.
ReadinessCheck FlexibleAppVersionReadinessCheckOutput `pulumi:"readinessCheck"`
// Machine resources for a version.
// Structure is documented below.
Resources FlexibleAppVersionResourcesPtrOutput `pulumi:"resources"`
// Desired runtime. Example python27.
Runtime pulumi.StringOutput `pulumi:"runtime"`
// The version of the API in the given runtime environment.
// Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard//config/appref
RuntimeApiVersion pulumi.StringOutput `pulumi:"runtimeApiVersion"`
// The channel of the runtime to use. Only available for some runtimes.
RuntimeChannel pulumi.StringPtrOutput `pulumi:"runtimeChannel"`
// The path or name of the app's main executable.
RuntimeMainExecutablePath pulumi.StringPtrOutput `pulumi:"runtimeMainExecutablePath"`
// AppEngine service resource. Can contain numbers, letters, and hyphens.
Service pulumi.StringOutput `pulumi:"service"`
// Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.
// Default value is `SERVING`.
// Possible values are `SERVING` and `STOPPED`.
ServingStatus pulumi.StringPtrOutput `pulumi:"servingStatus"`
// Relative name of the version within the service. For example, `v1`. Version names can contain only lowercase letters, numbers, or hyphens.
// Reserved names,"default", "latest", and any name with the prefix "ah-".
VersionId pulumi.StringPtrOutput `pulumi:"versionId"`
// Enables VPC connectivity for standard apps.
// Structure is documented below.
VpcAccessConnector FlexibleAppVersionVpcAccessConnectorPtrOutput `pulumi:"vpcAccessConnector"`
}
// NewFlexibleAppVersion registers a new resource with the given unique name, arguments, and options.
func NewFlexibleAppVersion(ctx *pulumi.Context,
name string, args *FlexibleAppVersionArgs, opts ...pulumi.ResourceOption) (*FlexibleAppVersion, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LivenessCheck == nil {
return nil, errors.New("invalid value for required argument 'LivenessCheck'")
}
if args.ReadinessCheck == nil {
return nil, errors.New("invalid value for required argument 'ReadinessCheck'")
}
if args.Runtime == nil {
return nil, errors.New("invalid value for required argument 'Runtime'")
}
if args.Service == nil {
return nil, errors.New("invalid value for required argument 'Service'")
}
var resource FlexibleAppVersion
err := ctx.RegisterResource("gcp:appengine/flexibleAppVersion:FlexibleAppVersion", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetFlexibleAppVersion gets an existing FlexibleAppVersion 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 GetFlexibleAppVersion(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *FlexibleAppVersionState, opts ...pulumi.ResourceOption) (*FlexibleAppVersion, error) {
var resource FlexibleAppVersion
err := ctx.ReadResource("gcp:appengine/flexibleAppVersion:FlexibleAppVersion", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering FlexibleAppVersion resources.
type flexibleAppVersionState struct {
// Serving configuration for Google Cloud Endpoints.
// Structure is documented below.
ApiConfig *FlexibleAppVersionApiConfig `pulumi:"apiConfig"`
// Automatic scaling is based on request rate, response latencies, and other application metrics.
// Structure is documented below.
AutomaticScaling *FlexibleAppVersionAutomaticScaling `pulumi:"automaticScaling"`
// Metadata settings that are supplied to this version to enable beta runtime features.
BetaSettings map[string]string `pulumi:"betaSettings"`
// Duration that static files should be cached by web proxies and browsers.
// Only applicable if the corresponding StaticFilesHandler does not specify its own expiration time.
DefaultExpiration *string `pulumi:"defaultExpiration"`
// If set to `true`, the service will be deleted if it is the last version.
DeleteServiceOnDestroy *bool `pulumi:"deleteServiceOnDestroy"`
// Code and application artifacts that make up this version.
// Structure is documented below.
Deployment *FlexibleAppVersionDeployment `pulumi:"deployment"`
// Code and application artifacts that make up this version.
// Structure is documented below.
EndpointsApiService *FlexibleAppVersionEndpointsApiService `pulumi:"endpointsApiService"`
// The entrypoint for the application.
// Structure is documented below.
Entrypoint *FlexibleAppVersionEntrypoint `pulumi:"entrypoint"`
// Environment variables available to the application. As these are not returned in the API request, the provider will not detect any changes made outside of the config.
EnvVariables map[string]string `pulumi:"envVariables"`
// An ordered list of URL-matching patterns that should be applied to incoming requests.
// The first matching URL handles the request and other request handlers are not attempted.
// Structure is documented below.
Handlers []FlexibleAppVersionHandler `pulumi:"handlers"`
// A list of the types of messages that this application is able to receive.
// Each value may be one of `INBOUND_SERVICE_MAIL`, `INBOUND_SERVICE_MAIL_BOUNCE`, `INBOUND_SERVICE_XMPP_ERROR`, `INBOUND_SERVICE_XMPP_MESSAGE`, `INBOUND_SERVICE_XMPP_SUBSCRIBE`, `INBOUND_SERVICE_XMPP_PRESENCE`, `INBOUND_SERVICE_CHANNEL_PRESENCE`, and `INBOUND_SERVICE_WARMUP`.
InboundServices []string `pulumi:"inboundServices"`
// Instance class that is used to run this version. Valid values are
// AutomaticScaling: F1, F2, F4, F4_1G
// ManualScaling: B1, B2, B4, B8, B4_1G
// Defaults to F1 for AutomaticScaling and B1 for ManualScaling.
InstanceClass *string `pulumi:"instanceClass"`
// Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.
// Structure is documented below.
LivenessCheck *FlexibleAppVersionLivenessCheck `pulumi:"livenessCheck"`
// A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.
// Structure is documented below.
ManualScaling *FlexibleAppVersionManualScaling `pulumi:"manualScaling"`
// Full Serverless VPC Access Connector name e.g. /projects/my-project/locations/us-central1/connectors/c1.
Name *string `pulumi:"name"`
// Extra network settings
// Structure is documented below.
Network *FlexibleAppVersionNetwork `pulumi:"network"`
// Files that match this pattern will not be built into this version. Only applicable for Go runtimes.
NobuildFilesRegex *string `pulumi:"nobuildFilesRegex"`
// If set to `true`, the application version will not be deleted.
NoopOnDestroy *bool `pulumi:"noopOnDestroy"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation.
// Structure is documented below.
ReadinessCheck *FlexibleAppVersionReadinessCheck `pulumi:"readinessCheck"`
// Machine resources for a version.
// Structure is documented below.
Resources *FlexibleAppVersionResources `pulumi:"resources"`
// Desired runtime. Example python27.
Runtime *string `pulumi:"runtime"`
// The version of the API in the given runtime environment.
// Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard//config/appref
RuntimeApiVersion *string `pulumi:"runtimeApiVersion"`
// The channel of the runtime to use. Only available for some runtimes.
RuntimeChannel *string `pulumi:"runtimeChannel"`
// The path or name of the app's main executable.
RuntimeMainExecutablePath *string `pulumi:"runtimeMainExecutablePath"`
// AppEngine service resource. Can contain numbers, letters, and hyphens.
Service *string `pulumi:"service"`
// Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.
// Default value is `SERVING`.
// Possible values are `SERVING` and `STOPPED`.
ServingStatus *string `pulumi:"servingStatus"`
// Relative name of the version within the service. For example, `v1`. Version names can contain only lowercase letters, numbers, or hyphens.
// Reserved names,"default", "latest", and any name with the prefix "ah-".
VersionId *string `pulumi:"versionId"`
// Enables VPC connectivity for standard apps.
// Structure is documented below.
VpcAccessConnector *FlexibleAppVersionVpcAccessConnector `pulumi:"vpcAccessConnector"`
}
type FlexibleAppVersionState struct {
// Serving configuration for Google Cloud Endpoints.
// Structure is documented below.
ApiConfig FlexibleAppVersionApiConfigPtrInput
// Automatic scaling is based on request rate, response latencies, and other application metrics.
// Structure is documented below.
AutomaticScaling FlexibleAppVersionAutomaticScalingPtrInput
// Metadata settings that are supplied to this version to enable beta runtime features.
BetaSettings pulumi.StringMapInput
// Duration that static files should be cached by web proxies and browsers.
// Only applicable if the corresponding StaticFilesHandler does not specify its own expiration time.
DefaultExpiration pulumi.StringPtrInput
// If set to `true`, the service will be deleted if it is the last version.
DeleteServiceOnDestroy pulumi.BoolPtrInput
// Code and application artifacts that make up this version.
// Structure is documented below.
Deployment FlexibleAppVersionDeploymentPtrInput
// Code and application artifacts that make up this version.
// Structure is documented below.
EndpointsApiService FlexibleAppVersionEndpointsApiServicePtrInput
// The entrypoint for the application.
// Structure is documented below.
Entrypoint FlexibleAppVersionEntrypointPtrInput
// Environment variables available to the application. As these are not returned in the API request, the provider will not detect any changes made outside of the config.
EnvVariables pulumi.StringMapInput
// An ordered list of URL-matching patterns that should be applied to incoming requests.
// The first matching URL handles the request and other request handlers are not attempted.
// Structure is documented below.
Handlers FlexibleAppVersionHandlerArrayInput
// A list of the types of messages that this application is able to receive.
// Each value may be one of `INBOUND_SERVICE_MAIL`, `INBOUND_SERVICE_MAIL_BOUNCE`, `INBOUND_SERVICE_XMPP_ERROR`, `INBOUND_SERVICE_XMPP_MESSAGE`, `INBOUND_SERVICE_XMPP_SUBSCRIBE`, `INBOUND_SERVICE_XMPP_PRESENCE`, `INBOUND_SERVICE_CHANNEL_PRESENCE`, and `INBOUND_SERVICE_WARMUP`.
InboundServices pulumi.StringArrayInput
// Instance class that is used to run this version. Valid values are
// AutomaticScaling: F1, F2, F4, F4_1G
// ManualScaling: B1, B2, B4, B8, B4_1G
// Defaults to F1 for AutomaticScaling and B1 for ManualScaling.
InstanceClass pulumi.StringPtrInput
// Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.
// Structure is documented below.
LivenessCheck FlexibleAppVersionLivenessCheckPtrInput
// A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.
// Structure is documented below.
ManualScaling FlexibleAppVersionManualScalingPtrInput
// Full Serverless VPC Access Connector name e.g. /projects/my-project/locations/us-central1/connectors/c1.
Name pulumi.StringPtrInput
// Extra network settings
// Structure is documented below.
Network FlexibleAppVersionNetworkPtrInput
// Files that match this pattern will not be built into this version. Only applicable for Go runtimes.
NobuildFilesRegex pulumi.StringPtrInput
// If set to `true`, the application version will not be deleted.
NoopOnDestroy pulumi.BoolPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation.
// Structure is documented below.
ReadinessCheck FlexibleAppVersionReadinessCheckPtrInput
// Machine resources for a version.
// Structure is documented below.
Resources FlexibleAppVersionResourcesPtrInput
// Desired runtime. Example python27.
Runtime pulumi.StringPtrInput
// The version of the API in the given runtime environment.
// Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard//config/appref
RuntimeApiVersion pulumi.StringPtrInput
// The channel of the runtime to use. Only available for some runtimes.
RuntimeChannel pulumi.StringPtrInput
// The path or name of the app's main executable.
RuntimeMainExecutablePath pulumi.StringPtrInput
// AppEngine service resource. Can contain numbers, letters, and hyphens.
Service pulumi.StringPtrInput
// Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.
// Default value is `SERVING`.
// Possible values are `SERVING` and `STOPPED`.
ServingStatus pulumi.StringPtrInput
// Relative name of the version within the service. For example, `v1`. Version names can contain only lowercase letters, numbers, or hyphens.
// Reserved names,"default", "latest", and any name with the prefix "ah-".
VersionId pulumi.StringPtrInput
// Enables VPC connectivity for standard apps.
// Structure is documented below.
VpcAccessConnector FlexibleAppVersionVpcAccessConnectorPtrInput
}
func (FlexibleAppVersionState) ElementType() reflect.Type {
return reflect.TypeOf((*flexibleAppVersionState)(nil)).Elem()
}
type flexibleAppVersionArgs struct {
// Serving configuration for Google Cloud Endpoints.
// Structure is documented below.
ApiConfig *FlexibleAppVersionApiConfig `pulumi:"apiConfig"`
// Automatic scaling is based on request rate, response latencies, and other application metrics.
// Structure is documented below.
AutomaticScaling *FlexibleAppVersionAutomaticScaling `pulumi:"automaticScaling"`
// Metadata settings that are supplied to this version to enable beta runtime features.
BetaSettings map[string]string `pulumi:"betaSettings"`
// Duration that static files should be cached by web proxies and browsers.
// Only applicable if the corresponding StaticFilesHandler does not specify its own expiration time.
DefaultExpiration *string `pulumi:"defaultExpiration"`
// If set to `true`, the service will be deleted if it is the last version.
DeleteServiceOnDestroy *bool `pulumi:"deleteServiceOnDestroy"`
// Code and application artifacts that make up this version.
// Structure is documented below.
Deployment *FlexibleAppVersionDeployment `pulumi:"deployment"`
// Code and application artifacts that make up this version.
// Structure is documented below.
EndpointsApiService *FlexibleAppVersionEndpointsApiService `pulumi:"endpointsApiService"`
// The entrypoint for the application.
// Structure is documented below.
Entrypoint *FlexibleAppVersionEntrypoint `pulumi:"entrypoint"`
// Environment variables available to the application. As these are not returned in the API request, the provider will not detect any changes made outside of the config.
EnvVariables map[string]string `pulumi:"envVariables"`
// An ordered list of URL-matching patterns that should be applied to incoming requests.
// The first matching URL handles the request and other request handlers are not attempted.
// Structure is documented below.
Handlers []FlexibleAppVersionHandler `pulumi:"handlers"`
// A list of the types of messages that this application is able to receive.
// Each value may be one of `INBOUND_SERVICE_MAIL`, `INBOUND_SERVICE_MAIL_BOUNCE`, `INBOUND_SERVICE_XMPP_ERROR`, `INBOUND_SERVICE_XMPP_MESSAGE`, `INBOUND_SERVICE_XMPP_SUBSCRIBE`, `INBOUND_SERVICE_XMPP_PRESENCE`, `INBOUND_SERVICE_CHANNEL_PRESENCE`, and `INBOUND_SERVICE_WARMUP`.
InboundServices []string `pulumi:"inboundServices"`
// Instance class that is used to run this version. Valid values are
// AutomaticScaling: F1, F2, F4, F4_1G
// ManualScaling: B1, B2, B4, B8, B4_1G
// Defaults to F1 for AutomaticScaling and B1 for ManualScaling.
InstanceClass *string `pulumi:"instanceClass"`
// Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.
// Structure is documented below.
LivenessCheck FlexibleAppVersionLivenessCheck `pulumi:"livenessCheck"`
// A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.
// Structure is documented below.
ManualScaling *FlexibleAppVersionManualScaling `pulumi:"manualScaling"`
// Extra network settings
// Structure is documented below.
Network *FlexibleAppVersionNetwork `pulumi:"network"`
// Files that match this pattern will not be built into this version. Only applicable for Go runtimes.
NobuildFilesRegex *string `pulumi:"nobuildFilesRegex"`
// If set to `true`, the application version will not be deleted.
NoopOnDestroy *bool `pulumi:"noopOnDestroy"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation.
// Structure is documented below.
ReadinessCheck FlexibleAppVersionReadinessCheck `pulumi:"readinessCheck"`
// Machine resources for a version.
// Structure is documented below.
Resources *FlexibleAppVersionResources `pulumi:"resources"`
// Desired runtime. Example python27.
Runtime string `pulumi:"runtime"`
// The version of the API in the given runtime environment.
// Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard//config/appref
RuntimeApiVersion *string `pulumi:"runtimeApiVersion"`
// The channel of the runtime to use. Only available for some runtimes.
RuntimeChannel *string `pulumi:"runtimeChannel"`
// The path or name of the app's main executable.
RuntimeMainExecutablePath *string `pulumi:"runtimeMainExecutablePath"`
// AppEngine service resource. Can contain numbers, letters, and hyphens.
Service string `pulumi:"service"`
// Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.
// Default value is `SERVING`.
// Possible values are `SERVING` and `STOPPED`.
ServingStatus *string `pulumi:"servingStatus"`
// Relative name of the version within the service. For example, `v1`. Version names can contain only lowercase letters, numbers, or hyphens.
// Reserved names,"default", "latest", and any name with the prefix "ah-".
VersionId *string `pulumi:"versionId"`
// Enables VPC connectivity for standard apps.
// Structure is documented below.
VpcAccessConnector *FlexibleAppVersionVpcAccessConnector `pulumi:"vpcAccessConnector"`
}
// The set of arguments for constructing a FlexibleAppVersion resource.
type FlexibleAppVersionArgs struct {
// Serving configuration for Google Cloud Endpoints.
// Structure is documented below.
ApiConfig FlexibleAppVersionApiConfigPtrInput
// Automatic scaling is based on request rate, response latencies, and other application metrics.
// Structure is documented below.
AutomaticScaling FlexibleAppVersionAutomaticScalingPtrInput
// Metadata settings that are supplied to this version to enable beta runtime features.
BetaSettings pulumi.StringMapInput
// Duration that static files should be cached by web proxies and browsers.
// Only applicable if the corresponding StaticFilesHandler does not specify its own expiration time.
DefaultExpiration pulumi.StringPtrInput
// If set to `true`, the service will be deleted if it is the last version.
DeleteServiceOnDestroy pulumi.BoolPtrInput
// Code and application artifacts that make up this version.
// Structure is documented below.
Deployment FlexibleAppVersionDeploymentPtrInput
// Code and application artifacts that make up this version.
// Structure is documented below.
EndpointsApiService FlexibleAppVersionEndpointsApiServicePtrInput
// The entrypoint for the application.
// Structure is documented below.
Entrypoint FlexibleAppVersionEntrypointPtrInput
// Environment variables available to the application. As these are not returned in the API request, the provider will not detect any changes made outside of the config.
EnvVariables pulumi.StringMapInput
// An ordered list of URL-matching patterns that should be applied to incoming requests.
// The first matching URL handles the request and other request handlers are not attempted.
// Structure is documented below.
Handlers FlexibleAppVersionHandlerArrayInput
// A list of the types of messages that this application is able to receive.
// Each value may be one of `INBOUND_SERVICE_MAIL`, `INBOUND_SERVICE_MAIL_BOUNCE`, `INBOUND_SERVICE_XMPP_ERROR`, `INBOUND_SERVICE_XMPP_MESSAGE`, `INBOUND_SERVICE_XMPP_SUBSCRIBE`, `INBOUND_SERVICE_XMPP_PRESENCE`, `INBOUND_SERVICE_CHANNEL_PRESENCE`, and `INBOUND_SERVICE_WARMUP`.
InboundServices pulumi.StringArrayInput
// Instance class that is used to run this version. Valid values are
// AutomaticScaling: F1, F2, F4, F4_1G
// ManualScaling: B1, B2, B4, B8, B4_1G
// Defaults to F1 for AutomaticScaling and B1 for ManualScaling.
InstanceClass pulumi.StringPtrInput
// Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.
// Structure is documented below.
LivenessCheck FlexibleAppVersionLivenessCheckInput
// A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.
// Structure is documented below.
ManualScaling FlexibleAppVersionManualScalingPtrInput
// Extra network settings
// Structure is documented below.
Network FlexibleAppVersionNetworkPtrInput
// Files that match this pattern will not be built into this version. Only applicable for Go runtimes.
NobuildFilesRegex pulumi.StringPtrInput
// If set to `true`, the application version will not be deleted.
NoopOnDestroy pulumi.BoolPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation.
// Structure is documented below.
ReadinessCheck FlexibleAppVersionReadinessCheckInput
// Machine resources for a version.
// Structure is documented below.
Resources FlexibleAppVersionResourcesPtrInput
// Desired runtime. Example python27.
Runtime pulumi.StringInput
// The version of the API in the given runtime environment.
// Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard//config/appref
RuntimeApiVersion pulumi.StringPtrInput
// The channel of the runtime to use. Only available for some runtimes.
RuntimeChannel pulumi.StringPtrInput
// The path or name of the app's main executable.
RuntimeMainExecutablePath pulumi.StringPtrInput
// AppEngine service resource. Can contain numbers, letters, and hyphens.
Service pulumi.StringInput
// Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.
// Default value is `SERVING`.
// Possible values are `SERVING` and `STOPPED`.
ServingStatus pulumi.StringPtrInput
// Relative name of the version within the service. For example, `v1`. Version names can contain only lowercase letters, numbers, or hyphens.
// Reserved names,"default", "latest", and any name with the prefix "ah-".
VersionId pulumi.StringPtrInput
// Enables VPC connectivity for standard apps.
// Structure is documented below.
VpcAccessConnector FlexibleAppVersionVpcAccessConnectorPtrInput
}
func (FlexibleAppVersionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*flexibleAppVersionArgs)(nil)).Elem()
}
type FlexibleAppVersionInput interface {
pulumi.Input
ToFlexibleAppVersionOutput() FlexibleAppVersionOutput
ToFlexibleAppVersionOutputWithContext(ctx context.Context) FlexibleAppVersionOutput
}
func (*FlexibleAppVersion) ElementType() reflect.Type {
return reflect.TypeOf((*FlexibleAppVersion)(nil))
}
func (i *FlexibleAppVersion) ToFlexibleAppVersionOutput() FlexibleAppVersionOutput {
return i.ToFlexibleAppVersionOutputWithContext(context.Background())
}
func (i *FlexibleAppVersion) ToFlexibleAppVersionOutputWithContext(ctx context.Context) FlexibleAppVersionOutput {
return pulumi.ToOutputWithContext(ctx, i).(FlexibleAppVersionOutput)
}
func (i *FlexibleAppVersion) ToFlexibleAppVersionPtrOutput() FlexibleAppVersionPtrOutput {
return i.ToFlexibleAppVersionPtrOutputWithContext(context.Background())
}
func (i *FlexibleAppVersion) ToFlexibleAppVersionPtrOutputWithContext(ctx context.Context) FlexibleAppVersionPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(FlexibleAppVersionPtrOutput)
}
type FlexibleAppVersionPtrInput interface {
pulumi.Input
ToFlexibleAppVersionPtrOutput() FlexibleAppVersionPtrOutput
ToFlexibleAppVersionPtrOutputWithContext(ctx context.Context) FlexibleAppVersionPtrOutput
}
type flexibleAppVersionPtrType FlexibleAppVersionArgs
func (*flexibleAppVersionPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**FlexibleAppVersion)(nil))
}
func (i *flexibleAppVersionPtrType) ToFlexibleAppVersionPtrOutput() FlexibleAppVersionPtrOutput {
return i.ToFlexibleAppVersionPtrOutputWithContext(context.Background())
}
func (i *flexibleAppVersionPtrType) ToFlexibleAppVersionPtrOutputWithContext(ctx context.Context) FlexibleAppVersionPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(FlexibleAppVersionPtrOutput)
}
// FlexibleAppVersionArrayInput is an input type that accepts FlexibleAppVersionArray and FlexibleAppVersionArrayOutput values.
// You can construct a concrete instance of `FlexibleAppVersionArrayInput` via:
//
// FlexibleAppVersionArray{ FlexibleAppVersionArgs{...} }
type FlexibleAppVersionArrayInput interface {
pulumi.Input
ToFlexibleAppVersionArrayOutput() FlexibleAppVersionArrayOutput
ToFlexibleAppVersionArrayOutputWithContext(context.Context) FlexibleAppVersionArrayOutput
}
type FlexibleAppVersionArray []FlexibleAppVersionInput
func (FlexibleAppVersionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FlexibleAppVersion)(nil)).Elem()
}
func (i FlexibleAppVersionArray) ToFlexibleAppVersionArrayOutput() FlexibleAppVersionArrayOutput {
return i.ToFlexibleAppVersionArrayOutputWithContext(context.Background())
}
func (i FlexibleAppVersionArray) ToFlexibleAppVersionArrayOutputWithContext(ctx context.Context) FlexibleAppVersionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(FlexibleAppVersionArrayOutput)
}
// FlexibleAppVersionMapInput is an input type that accepts FlexibleAppVersionMap and FlexibleAppVersionMapOutput values.
// You can construct a concrete instance of `FlexibleAppVersionMapInput` via:
//
// FlexibleAppVersionMap{ "key": FlexibleAppVersionArgs{...} }
type FlexibleAppVersionMapInput interface {
pulumi.Input
ToFlexibleAppVersionMapOutput() FlexibleAppVersionMapOutput
ToFlexibleAppVersionMapOutputWithContext(context.Context) FlexibleAppVersionMapOutput
}
type FlexibleAppVersionMap map[string]FlexibleAppVersionInput
func (FlexibleAppVersionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FlexibleAppVersion)(nil)).Elem()
}
func (i FlexibleAppVersionMap) ToFlexibleAppVersionMapOutput() FlexibleAppVersionMapOutput {
return i.ToFlexibleAppVersionMapOutputWithContext(context.Background())
}
func (i FlexibleAppVersionMap) ToFlexibleAppVersionMapOutputWithContext(ctx context.Context) FlexibleAppVersionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(FlexibleAppVersionMapOutput)
}
type FlexibleAppVersionOutput struct{ *pulumi.OutputState }
func (FlexibleAppVersionOutput) ElementType() reflect.Type {
return reflect.TypeOf((*FlexibleAppVersion)(nil))
}
func (o FlexibleAppVersionOutput) ToFlexibleAppVersionOutput() FlexibleAppVersionOutput {
return o
}
func (o FlexibleAppVersionOutput) ToFlexibleAppVersionOutputWithContext(ctx context.Context) FlexibleAppVersionOutput {
return o
}
func (o FlexibleAppVersionOutput) ToFlexibleAppVersionPtrOutput() FlexibleAppVersionPtrOutput {
return o.ToFlexibleAppVersionPtrOutputWithContext(context.Background())
}
func (o FlexibleAppVersionOutput) ToFlexibleAppVersionPtrOutputWithContext(ctx context.Context) FlexibleAppVersionPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v FlexibleAppVersion) *FlexibleAppVersion {
return &v
}).(FlexibleAppVersionPtrOutput)
}
type FlexibleAppVersionPtrOutput struct{ *pulumi.OutputState }
func (FlexibleAppVersionPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**FlexibleAppVersion)(nil))
}
func (o FlexibleAppVersionPtrOutput) ToFlexibleAppVersionPtrOutput() FlexibleAppVersionPtrOutput {
return o
}
func (o FlexibleAppVersionPtrOutput) ToFlexibleAppVersionPtrOutputWithContext(ctx context.Context) FlexibleAppVersionPtrOutput {
return o
}
func (o FlexibleAppVersionPtrOutput) Elem() FlexibleAppVersionOutput {
return o.ApplyT(func(v *FlexibleAppVersion) FlexibleAppVersion {
if v != nil {
return *v
}
var ret FlexibleAppVersion
return ret
}).(FlexibleAppVersionOutput)
}
type FlexibleAppVersionArrayOutput struct{ *pulumi.OutputState }
func (FlexibleAppVersionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]FlexibleAppVersion)(nil))
}
func (o FlexibleAppVersionArrayOutput) ToFlexibleAppVersionArrayOutput() FlexibleAppVersionArrayOutput {
return o
}
func (o FlexibleAppVersionArrayOutput) ToFlexibleAppVersionArrayOutputWithContext(ctx context.Context) FlexibleAppVersionArrayOutput {
return o
}
func (o FlexibleAppVersionArrayOutput) Index(i pulumi.IntInput) FlexibleAppVersionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) FlexibleAppVersion {
return vs[0].([]FlexibleAppVersion)[vs[1].(int)]
}).(FlexibleAppVersionOutput)
}
type FlexibleAppVersionMapOutput struct{ *pulumi.OutputState }
func (FlexibleAppVersionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]FlexibleAppVersion)(nil))
}
func (o FlexibleAppVersionMapOutput) ToFlexibleAppVersionMapOutput() FlexibleAppVersionMapOutput {
return o
}
func (o FlexibleAppVersionMapOutput) ToFlexibleAppVersionMapOutputWithContext(ctx context.Context) FlexibleAppVersionMapOutput {
return o
}
func (o FlexibleAppVersionMapOutput) MapIndex(k pulumi.StringInput) FlexibleAppVersionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) FlexibleAppVersion {
return vs[0].(map[string]FlexibleAppVersion)[vs[1].(string)]
}).(FlexibleAppVersionOutput)
}
func init() {
pulumi.RegisterOutputType(FlexibleAppVersionOutput{})
pulumi.RegisterOutputType(FlexibleAppVersionPtrOutput{})
pulumi.RegisterOutputType(FlexibleAppVersionArrayOutput{})
pulumi.RegisterOutputType(FlexibleAppVersionMapOutput{})
}