/
pipeline.go
611 lines (554 loc) · 24.9 KB
/
pipeline.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
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package codepipeline
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a CodePipeline.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "fmt"
//
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codepipeline"
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codestarconnections"
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := codestarconnections.NewConnection(ctx, "example", &codestarconnections.ConnectionArgs{
// Name: pulumi.String("example-connection"),
// ProviderType: pulumi.String("GitHub"),
// })
// if err != nil {
// return err
// }
// codepipelineBucket, err := s3.NewBucketV2(ctx, "codepipeline_bucket", &s3.BucketV2Args{
// Bucket: pulumi.String("test-bucket"),
// })
// if err != nil {
// return err
// }
// assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
// Statements: []iam.GetPolicyDocumentStatement{
// {
// Effect: pulumi.StringRef("Allow"),
// Principals: []iam.GetPolicyDocumentStatementPrincipal{
// {
// Type: "Service",
// Identifiers: []string{
// "codepipeline.amazonaws.com",
// },
// },
// },
// Actions: []string{
// "sts:AssumeRole",
// },
// },
// },
// }, nil)
// if err != nil {
// return err
// }
// codepipelineRole, err := iam.NewRole(ctx, "codepipeline_role", &iam.RoleArgs{
// Name: pulumi.String("test-role"),
// AssumeRolePolicy: pulumi.String(assumeRole.Json),
// })
// if err != nil {
// return err
// }
// s3kmskey, err := kms.LookupAlias(ctx, &kms.LookupAliasArgs{
// Name: "alias/myKmsKey",
// }, nil)
// if err != nil {
// return err
// }
// _, err = codepipeline.NewPipeline(ctx, "codepipeline", &codepipeline.PipelineArgs{
// Name: pulumi.String("tf-test-pipeline"),
// RoleArn: codepipelineRole.Arn,
// ArtifactStores: codepipeline.PipelineArtifactStoreArray{
// &codepipeline.PipelineArtifactStoreArgs{
// Location: codepipelineBucket.Bucket,
// Type: pulumi.String("S3"),
// EncryptionKey: &codepipeline.PipelineArtifactStoreEncryptionKeyArgs{
// Id: pulumi.String(s3kmskey.Arn),
// Type: pulumi.String("KMS"),
// },
// },
// },
// Stages: codepipeline.PipelineStageArray{
// &codepipeline.PipelineStageArgs{
// Name: pulumi.String("Source"),
// Actions: codepipeline.PipelineStageActionArray{
// &codepipeline.PipelineStageActionArgs{
// Name: pulumi.String("Source"),
// Category: pulumi.String("Source"),
// Owner: pulumi.String("AWS"),
// Provider: pulumi.String("CodeStarSourceConnection"),
// Version: pulumi.String("1"),
// OutputArtifacts: pulumi.StringArray{
// pulumi.String("source_output"),
// },
// Configuration: pulumi.StringMap{
// "ConnectionArn": example.Arn,
// "FullRepositoryId": pulumi.String("my-organization/example"),
// "BranchName": pulumi.String("main"),
// },
// },
// },
// },
// &codepipeline.PipelineStageArgs{
// Name: pulumi.String("Build"),
// Actions: codepipeline.PipelineStageActionArray{
// &codepipeline.PipelineStageActionArgs{
// Name: pulumi.String("Build"),
// Category: pulumi.String("Build"),
// Owner: pulumi.String("AWS"),
// Provider: pulumi.String("CodeBuild"),
// InputArtifacts: pulumi.StringArray{
// pulumi.String("source_output"),
// },
// OutputArtifacts: pulumi.StringArray{
// pulumi.String("build_output"),
// },
// Version: pulumi.String("1"),
// Configuration: pulumi.StringMap{
// "ProjectName": pulumi.String("test"),
// },
// },
// },
// },
// &codepipeline.PipelineStageArgs{
// Name: pulumi.String("Deploy"),
// Actions: codepipeline.PipelineStageActionArray{
// &codepipeline.PipelineStageActionArgs{
// Name: pulumi.String("Deploy"),
// Category: pulumi.String("Deploy"),
// Owner: pulumi.String("AWS"),
// Provider: pulumi.String("CloudFormation"),
// InputArtifacts: pulumi.StringArray{
// pulumi.String("build_output"),
// },
// Version: pulumi.String("1"),
// Configuration: pulumi.StringMap{
// "ActionMode": pulumi.String("REPLACE_ON_FAILURE"),
// "Capabilities": pulumi.String("CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM"),
// "OutputFileName": pulumi.String("CreateStackOutput.json"),
// "StackName": pulumi.String("MyStack"),
// "TemplatePath": pulumi.String("build_output::sam-templated.yaml"),
// },
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = s3.NewBucketPublicAccessBlock(ctx, "codepipeline_bucket_pab", &s3.BucketPublicAccessBlockArgs{
// Bucket: codepipelineBucket.ID(),
// BlockPublicAcls: pulumi.Bool(true),
// BlockPublicPolicy: pulumi.Bool(true),
// IgnorePublicAcls: pulumi.Bool(true),
// RestrictPublicBuckets: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// codepipelinePolicy := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{
// Statements: iam.GetPolicyDocumentStatementArray{
// &iam.GetPolicyDocumentStatementArgs{
// Effect: pulumi.String("Allow"),
// Actions: pulumi.StringArray{
// pulumi.String("s3:GetObject"),
// pulumi.String("s3:GetObjectVersion"),
// pulumi.String("s3:GetBucketVersioning"),
// pulumi.String("s3:PutObjectAcl"),
// pulumi.String("s3:PutObject"),
// },
// Resources: pulumi.StringArray{
// codepipelineBucket.Arn,
// codepipelineBucket.Arn.ApplyT(func(arn string) (string, error) {
// return fmt.Sprintf("%v/*", arn), nil
// }).(pulumi.StringOutput),
// },
// },
// &iam.GetPolicyDocumentStatementArgs{
// Effect: pulumi.String("Allow"),
// Actions: pulumi.StringArray{
// pulumi.String("codestar-connections:UseConnection"),
// },
// Resources: pulumi.StringArray{
// example.Arn,
// },
// },
// &iam.GetPolicyDocumentStatementArgs{
// Effect: pulumi.String("Allow"),
// Actions: pulumi.StringArray{
// pulumi.String("codebuild:BatchGetBuilds"),
// pulumi.String("codebuild:StartBuild"),
// },
// Resources: pulumi.StringArray{
// pulumi.String("*"),
// },
// },
// },
// }, nil)
// _, err = iam.NewRolePolicy(ctx, "codepipeline_policy", &iam.RolePolicyArgs{
// Name: pulumi.String("codepipeline_policy"),
// Role: codepipelineRole.ID(),
// Policy: codepipelinePolicy.ApplyT(func(codepipelinePolicy iam.GetPolicyDocumentResult) (*string, error) {
// return &codepipelinePolicy.Json, nil
// }).(pulumi.StringPtrOutput),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Import
//
// Using `pulumi import`, import CodePipelines using the name. For example:
//
// ```sh
// $ pulumi import aws:codepipeline/pipeline:Pipeline foo example
// ```
type Pipeline struct {
pulumi.CustomResourceState
// The codepipeline ARN.
Arn pulumi.StringOutput `pulumi:"arn"`
// One or more artifactStore blocks. Artifact stores are documented below.
ArtifactStores PipelineArtifactStoreArrayOutput `pulumi:"artifactStores"`
// The method that the pipeline will use to handle multiple executions. The default mode is `SUPERSEDED`. For value values, refer to the [AWS documentation](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PipelineDeclaration.html#CodePipeline-Type-PipelineDeclaration-executionMode).
//
// **Note:** `QUEUED` or `PARALLEL` mode can only be used with V2 pipelines.
ExecutionMode pulumi.StringPtrOutput `pulumi:"executionMode"`
// The name of the pipeline.
Name pulumi.StringOutput `pulumi:"name"`
// Type of the pipeline. Possible values are: `V1` and `V2`. Default value is `V1`.
PipelineType pulumi.StringPtrOutput `pulumi:"pipelineType"`
// A service role Amazon Resource Name (ARN) that grants AWS CodePipeline permission to make calls to AWS services on your behalf.
RoleArn pulumi.StringOutput `pulumi:"roleArn"`
// A stage block. Stages are documented below.
Stages PipelineStageArrayOutput `pulumi:"stages"`
// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
//
// Deprecated: Please use `tags` instead.
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
// A trigger block. Valid only when `pipelineType` is `V2`. Triggers are documented below.
Triggers PipelineTriggerArrayOutput `pulumi:"triggers"`
// A pipeline-level variable block. Valid only when `pipelineType` is `V2`. Variable are documented below.
Variables PipelineVariableArrayOutput `pulumi:"variables"`
}
// NewPipeline registers a new resource with the given unique name, arguments, and options.
func NewPipeline(ctx *pulumi.Context,
name string, args *PipelineArgs, opts ...pulumi.ResourceOption) (*Pipeline, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ArtifactStores == nil {
return nil, errors.New("invalid value for required argument 'ArtifactStores'")
}
if args.RoleArn == nil {
return nil, errors.New("invalid value for required argument 'RoleArn'")
}
if args.Stages == nil {
return nil, errors.New("invalid value for required argument 'Stages'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Pipeline
err := ctx.RegisterResource("aws:codepipeline/pipeline:Pipeline", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPipeline gets an existing Pipeline 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 GetPipeline(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PipelineState, opts ...pulumi.ResourceOption) (*Pipeline, error) {
var resource Pipeline
err := ctx.ReadResource("aws:codepipeline/pipeline:Pipeline", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Pipeline resources.
type pipelineState struct {
// The codepipeline ARN.
Arn *string `pulumi:"arn"`
// One or more artifactStore blocks. Artifact stores are documented below.
ArtifactStores []PipelineArtifactStore `pulumi:"artifactStores"`
// The method that the pipeline will use to handle multiple executions. The default mode is `SUPERSEDED`. For value values, refer to the [AWS documentation](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PipelineDeclaration.html#CodePipeline-Type-PipelineDeclaration-executionMode).
//
// **Note:** `QUEUED` or `PARALLEL` mode can only be used with V2 pipelines.
ExecutionMode *string `pulumi:"executionMode"`
// The name of the pipeline.
Name *string `pulumi:"name"`
// Type of the pipeline. Possible values are: `V1` and `V2`. Default value is `V1`.
PipelineType *string `pulumi:"pipelineType"`
// A service role Amazon Resource Name (ARN) that grants AWS CodePipeline permission to make calls to AWS services on your behalf.
RoleArn *string `pulumi:"roleArn"`
// A stage block. Stages are documented below.
Stages []PipelineStage `pulumi:"stages"`
// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
//
// Deprecated: Please use `tags` instead.
TagsAll map[string]string `pulumi:"tagsAll"`
// A trigger block. Valid only when `pipelineType` is `V2`. Triggers are documented below.
Triggers []PipelineTrigger `pulumi:"triggers"`
// A pipeline-level variable block. Valid only when `pipelineType` is `V2`. Variable are documented below.
Variables []PipelineVariable `pulumi:"variables"`
}
type PipelineState struct {
// The codepipeline ARN.
Arn pulumi.StringPtrInput
// One or more artifactStore blocks. Artifact stores are documented below.
ArtifactStores PipelineArtifactStoreArrayInput
// The method that the pipeline will use to handle multiple executions. The default mode is `SUPERSEDED`. For value values, refer to the [AWS documentation](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PipelineDeclaration.html#CodePipeline-Type-PipelineDeclaration-executionMode).
//
// **Note:** `QUEUED` or `PARALLEL` mode can only be used with V2 pipelines.
ExecutionMode pulumi.StringPtrInput
// The name of the pipeline.
Name pulumi.StringPtrInput
// Type of the pipeline. Possible values are: `V1` and `V2`. Default value is `V1`.
PipelineType pulumi.StringPtrInput
// A service role Amazon Resource Name (ARN) that grants AWS CodePipeline permission to make calls to AWS services on your behalf.
RoleArn pulumi.StringPtrInput
// A stage block. Stages are documented below.
Stages PipelineStageArrayInput
// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
//
// Deprecated: Please use `tags` instead.
TagsAll pulumi.StringMapInput
// A trigger block. Valid only when `pipelineType` is `V2`. Triggers are documented below.
Triggers PipelineTriggerArrayInput
// A pipeline-level variable block. Valid only when `pipelineType` is `V2`. Variable are documented below.
Variables PipelineVariableArrayInput
}
func (PipelineState) ElementType() reflect.Type {
return reflect.TypeOf((*pipelineState)(nil)).Elem()
}
type pipelineArgs struct {
// One or more artifactStore blocks. Artifact stores are documented below.
ArtifactStores []PipelineArtifactStore `pulumi:"artifactStores"`
// The method that the pipeline will use to handle multiple executions. The default mode is `SUPERSEDED`. For value values, refer to the [AWS documentation](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PipelineDeclaration.html#CodePipeline-Type-PipelineDeclaration-executionMode).
//
// **Note:** `QUEUED` or `PARALLEL` mode can only be used with V2 pipelines.
ExecutionMode *string `pulumi:"executionMode"`
// The name of the pipeline.
Name *string `pulumi:"name"`
// Type of the pipeline. Possible values are: `V1` and `V2`. Default value is `V1`.
PipelineType *string `pulumi:"pipelineType"`
// A service role Amazon Resource Name (ARN) that grants AWS CodePipeline permission to make calls to AWS services on your behalf.
RoleArn string `pulumi:"roleArn"`
// A stage block. Stages are documented below.
Stages []PipelineStage `pulumi:"stages"`
// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A trigger block. Valid only when `pipelineType` is `V2`. Triggers are documented below.
Triggers []PipelineTrigger `pulumi:"triggers"`
// A pipeline-level variable block. Valid only when `pipelineType` is `V2`. Variable are documented below.
Variables []PipelineVariable `pulumi:"variables"`
}
// The set of arguments for constructing a Pipeline resource.
type PipelineArgs struct {
// One or more artifactStore blocks. Artifact stores are documented below.
ArtifactStores PipelineArtifactStoreArrayInput
// The method that the pipeline will use to handle multiple executions. The default mode is `SUPERSEDED`. For value values, refer to the [AWS documentation](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PipelineDeclaration.html#CodePipeline-Type-PipelineDeclaration-executionMode).
//
// **Note:** `QUEUED` or `PARALLEL` mode can only be used with V2 pipelines.
ExecutionMode pulumi.StringPtrInput
// The name of the pipeline.
Name pulumi.StringPtrInput
// Type of the pipeline. Possible values are: `V1` and `V2`. Default value is `V1`.
PipelineType pulumi.StringPtrInput
// A service role Amazon Resource Name (ARN) that grants AWS CodePipeline permission to make calls to AWS services on your behalf.
RoleArn pulumi.StringInput
// A stage block. Stages are documented below.
Stages PipelineStageArrayInput
// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A trigger block. Valid only when `pipelineType` is `V2`. Triggers are documented below.
Triggers PipelineTriggerArrayInput
// A pipeline-level variable block. Valid only when `pipelineType` is `V2`. Variable are documented below.
Variables PipelineVariableArrayInput
}
func (PipelineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*pipelineArgs)(nil)).Elem()
}
type PipelineInput interface {
pulumi.Input
ToPipelineOutput() PipelineOutput
ToPipelineOutputWithContext(ctx context.Context) PipelineOutput
}
func (*Pipeline) ElementType() reflect.Type {
return reflect.TypeOf((**Pipeline)(nil)).Elem()
}
func (i *Pipeline) ToPipelineOutput() PipelineOutput {
return i.ToPipelineOutputWithContext(context.Background())
}
func (i *Pipeline) ToPipelineOutputWithContext(ctx context.Context) PipelineOutput {
return pulumi.ToOutputWithContext(ctx, i).(PipelineOutput)
}
// PipelineArrayInput is an input type that accepts PipelineArray and PipelineArrayOutput values.
// You can construct a concrete instance of `PipelineArrayInput` via:
//
// PipelineArray{ PipelineArgs{...} }
type PipelineArrayInput interface {
pulumi.Input
ToPipelineArrayOutput() PipelineArrayOutput
ToPipelineArrayOutputWithContext(context.Context) PipelineArrayOutput
}
type PipelineArray []PipelineInput
func (PipelineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Pipeline)(nil)).Elem()
}
func (i PipelineArray) ToPipelineArrayOutput() PipelineArrayOutput {
return i.ToPipelineArrayOutputWithContext(context.Background())
}
func (i PipelineArray) ToPipelineArrayOutputWithContext(ctx context.Context) PipelineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PipelineArrayOutput)
}
// PipelineMapInput is an input type that accepts PipelineMap and PipelineMapOutput values.
// You can construct a concrete instance of `PipelineMapInput` via:
//
// PipelineMap{ "key": PipelineArgs{...} }
type PipelineMapInput interface {
pulumi.Input
ToPipelineMapOutput() PipelineMapOutput
ToPipelineMapOutputWithContext(context.Context) PipelineMapOutput
}
type PipelineMap map[string]PipelineInput
func (PipelineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Pipeline)(nil)).Elem()
}
func (i PipelineMap) ToPipelineMapOutput() PipelineMapOutput {
return i.ToPipelineMapOutputWithContext(context.Background())
}
func (i PipelineMap) ToPipelineMapOutputWithContext(ctx context.Context) PipelineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PipelineMapOutput)
}
type PipelineOutput struct{ *pulumi.OutputState }
func (PipelineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Pipeline)(nil)).Elem()
}
func (o PipelineOutput) ToPipelineOutput() PipelineOutput {
return o
}
func (o PipelineOutput) ToPipelineOutputWithContext(ctx context.Context) PipelineOutput {
return o
}
// The codepipeline ARN.
func (o PipelineOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *Pipeline) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// One or more artifactStore blocks. Artifact stores are documented below.
func (o PipelineOutput) ArtifactStores() PipelineArtifactStoreArrayOutput {
return o.ApplyT(func(v *Pipeline) PipelineArtifactStoreArrayOutput { return v.ArtifactStores }).(PipelineArtifactStoreArrayOutput)
}
// The method that the pipeline will use to handle multiple executions. The default mode is `SUPERSEDED`. For value values, refer to the [AWS documentation](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PipelineDeclaration.html#CodePipeline-Type-PipelineDeclaration-executionMode).
//
// **Note:** `QUEUED` or `PARALLEL` mode can only be used with V2 pipelines.
func (o PipelineOutput) ExecutionMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Pipeline) pulumi.StringPtrOutput { return v.ExecutionMode }).(pulumi.StringPtrOutput)
}
// The name of the pipeline.
func (o PipelineOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Pipeline) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Type of the pipeline. Possible values are: `V1` and `V2`. Default value is `V1`.
func (o PipelineOutput) PipelineType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Pipeline) pulumi.StringPtrOutput { return v.PipelineType }).(pulumi.StringPtrOutput)
}
// A service role Amazon Resource Name (ARN) that grants AWS CodePipeline permission to make calls to AWS services on your behalf.
func (o PipelineOutput) RoleArn() pulumi.StringOutput {
return o.ApplyT(func(v *Pipeline) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput)
}
// A stage block. Stages are documented below.
func (o PipelineOutput) Stages() PipelineStageArrayOutput {
return o.ApplyT(func(v *Pipeline) PipelineStageArrayOutput { return v.Stages }).(PipelineStageArrayOutput)
}
// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
func (o PipelineOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Pipeline) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
//
// Deprecated: Please use `tags` instead.
func (o PipelineOutput) TagsAll() pulumi.StringMapOutput {
return o.ApplyT(func(v *Pipeline) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
}
// A trigger block. Valid only when `pipelineType` is `V2`. Triggers are documented below.
func (o PipelineOutput) Triggers() PipelineTriggerArrayOutput {
return o.ApplyT(func(v *Pipeline) PipelineTriggerArrayOutput { return v.Triggers }).(PipelineTriggerArrayOutput)
}
// A pipeline-level variable block. Valid only when `pipelineType` is `V2`. Variable are documented below.
func (o PipelineOutput) Variables() PipelineVariableArrayOutput {
return o.ApplyT(func(v *Pipeline) PipelineVariableArrayOutput { return v.Variables }).(PipelineVariableArrayOutput)
}
type PipelineArrayOutput struct{ *pulumi.OutputState }
func (PipelineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Pipeline)(nil)).Elem()
}
func (o PipelineArrayOutput) ToPipelineArrayOutput() PipelineArrayOutput {
return o
}
func (o PipelineArrayOutput) ToPipelineArrayOutputWithContext(ctx context.Context) PipelineArrayOutput {
return o
}
func (o PipelineArrayOutput) Index(i pulumi.IntInput) PipelineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Pipeline {
return vs[0].([]*Pipeline)[vs[1].(int)]
}).(PipelineOutput)
}
type PipelineMapOutput struct{ *pulumi.OutputState }
func (PipelineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Pipeline)(nil)).Elem()
}
func (o PipelineMapOutput) ToPipelineMapOutput() PipelineMapOutput {
return o
}
func (o PipelineMapOutput) ToPipelineMapOutputWithContext(ctx context.Context) PipelineMapOutput {
return o
}
func (o PipelineMapOutput) MapIndex(k pulumi.StringInput) PipelineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Pipeline {
return vs[0].(map[string]*Pipeline)[vs[1].(string)]
}).(PipelineOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PipelineInput)(nil)).Elem(), &Pipeline{})
pulumi.RegisterInputType(reflect.TypeOf((*PipelineArrayInput)(nil)).Elem(), PipelineArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PipelineMapInput)(nil)).Elem(), PipelineMap{})
pulumi.RegisterOutputType(PipelineOutput{})
pulumi.RegisterOutputType(PipelineArrayOutput{})
pulumi.RegisterOutputType(PipelineMapOutput{})
}