github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/codebuild/project.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package codebuild 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a CodeBuild Project resource. See also the `codebuild.Webhook` resource, which manages the webhook to the source (e.g., the "rebuild every time a code change is pushed" option in the CodeBuild web console). 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "fmt" 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild" 28 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 30 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 31 // 32 // ) 33 // func main() { 34 // pulumi.Run(func(ctx *pulumi.Context) error { 35 // exampleBucketV2, err := s3.NewBucketV2(ctx, "example", &s3.BucketV2Args{ 36 // Bucket: pulumi.String("example"), 37 // }) 38 // if err != nil { 39 // return err 40 // } 41 // _, err = s3.NewBucketAclV2(ctx, "example", &s3.BucketAclV2Args{ 42 // Bucket: exampleBucketV2.ID(), 43 // Acl: pulumi.String("private"), 44 // }) 45 // if err != nil { 46 // return err 47 // } 48 // assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 49 // Statements: []iam.GetPolicyDocumentStatement{ 50 // { 51 // Effect: pulumi.StringRef("Allow"), 52 // Principals: []iam.GetPolicyDocumentStatementPrincipal{ 53 // { 54 // Type: "Service", 55 // Identifiers: []string{ 56 // "codebuild.amazonaws.com", 57 // }, 58 // }, 59 // }, 60 // Actions: []string{ 61 // "sts:AssumeRole", 62 // }, 63 // }, 64 // }, 65 // }, nil); 66 // if err != nil { 67 // return err 68 // } 69 // exampleRole, err := iam.NewRole(ctx, "example", &iam.RoleArgs{ 70 // Name: pulumi.String("example"), 71 // AssumeRolePolicy: pulumi.String(assumeRole.Json), 72 // }) 73 // if err != nil { 74 // return err 75 // } 76 // example := pulumi.All(exampleBucketV2.Arn,exampleBucketV2.Arn).ApplyT(func(_args []interface{}) (iam.GetPolicyDocumentResult, error) { 77 // exampleBucketV2Arn := _args[0].(string) 78 // exampleBucketV2Arn1 := _args[1].(string) 79 // return iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{ 80 // Statements: []iam.GetPolicyDocumentStatement{ 81 // { 82 // Effect: "Allow", 83 // Actions: []string{ 84 // "logs:CreateLogGroup", 85 // "logs:CreateLogStream", 86 // "logs:PutLogEvents", 87 // }, 88 // Resources: []string{ 89 // "*", 90 // }, 91 // }, 92 // { 93 // Effect: "Allow", 94 // Actions: []string{ 95 // "ec2:CreateNetworkInterface", 96 // "ec2:DescribeDhcpOptions", 97 // "ec2:DescribeNetworkInterfaces", 98 // "ec2:DeleteNetworkInterface", 99 // "ec2:DescribeSubnets", 100 // "ec2:DescribeSecurityGroups", 101 // "ec2:DescribeVpcs", 102 // }, 103 // Resources: []string{ 104 // "*", 105 // }, 106 // }, 107 // { 108 // Effect: "Allow", 109 // Actions: []string{ 110 // "ec2:CreateNetworkInterfacePermission", 111 // }, 112 // Resources: []string{ 113 // "arn:aws:ec2:us-east-1:123456789012:network-interface/*", 114 // }, 115 // Conditions: []iam.GetPolicyDocumentStatementCondition{ 116 // { 117 // Test: "StringEquals", 118 // Variable: "ec2:Subnet", 119 // Values: interface{}{ 120 // example1.Arn, 121 // example2.Arn, 122 // }, 123 // }, 124 // { 125 // Test: "StringEquals", 126 // Variable: "ec2:AuthorizedService", 127 // Values: []string{ 128 // "codebuild.amazonaws.com", 129 // }, 130 // }, 131 // }, 132 // }, 133 // { 134 // Effect: "Allow", 135 // Actions: []string{ 136 // "s3:*", 137 // }, 138 // Resources: []string{ 139 // exampleBucketV2Arn, 140 // fmt.Sprintf("%v/*", exampleBucketV2Arn1), 141 // }, 142 // }, 143 // }, 144 // }, nil), nil 145 // }).(iam.GetPolicyDocumentResultOutput) 146 // _, err = iam.NewRolePolicy(ctx, "example", &iam.RolePolicyArgs{ 147 // Role: exampleRole.Name, 148 // Policy: example.ApplyT(func(example iam.GetPolicyDocumentResult) (*string, error) { 149 // return &example.Json, nil 150 // }).(pulumi.StringPtrOutput), 151 // }) 152 // if err != nil { 153 // return err 154 // } 155 // _, err = codebuild.NewProject(ctx, "example", &codebuild.ProjectArgs{ 156 // Name: pulumi.String("test-project"), 157 // Description: pulumi.String("test_codebuild_project"), 158 // BuildTimeout: pulumi.Int(5), 159 // ServiceRole: exampleRole.Arn, 160 // Artifacts: &codebuild.ProjectArtifactsArgs{ 161 // Type: pulumi.String("NO_ARTIFACTS"), 162 // }, 163 // Cache: &codebuild.ProjectCacheArgs{ 164 // Type: pulumi.String("S3"), 165 // Location: exampleBucketV2.Bucket, 166 // }, 167 // Environment: &codebuild.ProjectEnvironmentArgs{ 168 // ComputeType: pulumi.String("BUILD_GENERAL1_SMALL"), 169 // Image: pulumi.String("aws/codebuild/amazonlinux2-x86_64-standard:4.0"), 170 // Type: pulumi.String("LINUX_CONTAINER"), 171 // ImagePullCredentialsType: pulumi.String("CODEBUILD"), 172 // EnvironmentVariables: codebuild.ProjectEnvironmentEnvironmentVariableArray{ 173 // &codebuild.ProjectEnvironmentEnvironmentVariableArgs{ 174 // Name: pulumi.String("SOME_KEY1"), 175 // Value: pulumi.String("SOME_VALUE1"), 176 // }, 177 // &codebuild.ProjectEnvironmentEnvironmentVariableArgs{ 178 // Name: pulumi.String("SOME_KEY2"), 179 // Value: pulumi.String("SOME_VALUE2"), 180 // Type: pulumi.String("PARAMETER_STORE"), 181 // }, 182 // }, 183 // }, 184 // LogsConfig: &codebuild.ProjectLogsConfigArgs{ 185 // CloudwatchLogs: &codebuild.ProjectLogsConfigCloudwatchLogsArgs{ 186 // GroupName: pulumi.String("log-group"), 187 // StreamName: pulumi.String("log-stream"), 188 // }, 189 // S3Logs: &codebuild.ProjectLogsConfigS3LogsArgs{ 190 // Status: pulumi.String("ENABLED"), 191 // Location: exampleBucketV2.ID().ApplyT(func(id string) (string, error) { 192 // return fmt.Sprintf("%v/build-log", id), nil 193 // }).(pulumi.StringOutput), 194 // }, 195 // }, 196 // Source: &codebuild.ProjectSourceArgs{ 197 // Type: pulumi.String("GITHUB"), 198 // Location: pulumi.String("https://github.com/mitchellh/packer.git"), 199 // GitCloneDepth: pulumi.Int(1), 200 // GitSubmodulesConfig: &codebuild.ProjectSourceGitSubmodulesConfigArgs{ 201 // FetchSubmodules: pulumi.Bool(true), 202 // }, 203 // }, 204 // SourceVersion: pulumi.String("master"), 205 // VpcConfig: &codebuild.ProjectVpcConfigArgs{ 206 // VpcId: pulumi.Any(exampleAwsVpc.Id), 207 // Subnets: pulumi.StringArray{ 208 // example1.Id, 209 // example2.Id, 210 // }, 211 // SecurityGroupIds: pulumi.StringArray{ 212 // example1AwsSecurityGroup.Id, 213 // example2AwsSecurityGroup.Id, 214 // }, 215 // }, 216 // Tags: pulumi.StringMap{ 217 // "Environment": pulumi.String("Test"), 218 // }, 219 // }) 220 // if err != nil { 221 // return err 222 // } 223 // _, err = codebuild.NewProject(ctx, "project-with-cache", &codebuild.ProjectArgs{ 224 // Name: pulumi.String("test-project-cache"), 225 // Description: pulumi.String("test_codebuild_project_cache"), 226 // BuildTimeout: pulumi.Int(5), 227 // QueuedTimeout: pulumi.Int(5), 228 // ServiceRole: exampleRole.Arn, 229 // Artifacts: &codebuild.ProjectArtifactsArgs{ 230 // Type: pulumi.String("NO_ARTIFACTS"), 231 // }, 232 // Cache: &codebuild.ProjectCacheArgs{ 233 // Type: pulumi.String("LOCAL"), 234 // Modes: pulumi.StringArray{ 235 // pulumi.String("LOCAL_DOCKER_LAYER_CACHE"), 236 // pulumi.String("LOCAL_SOURCE_CACHE"), 237 // }, 238 // }, 239 // Environment: &codebuild.ProjectEnvironmentArgs{ 240 // ComputeType: pulumi.String("BUILD_GENERAL1_SMALL"), 241 // Image: pulumi.String("aws/codebuild/amazonlinux2-x86_64-standard:4.0"), 242 // Type: pulumi.String("LINUX_CONTAINER"), 243 // ImagePullCredentialsType: pulumi.String("CODEBUILD"), 244 // EnvironmentVariables: codebuild.ProjectEnvironmentEnvironmentVariableArray{ 245 // &codebuild.ProjectEnvironmentEnvironmentVariableArgs{ 246 // Name: pulumi.String("SOME_KEY1"), 247 // Value: pulumi.String("SOME_VALUE1"), 248 // }, 249 // }, 250 // }, 251 // Source: &codebuild.ProjectSourceArgs{ 252 // Type: pulumi.String("GITHUB"), 253 // Location: pulumi.String("https://github.com/mitchellh/packer.git"), 254 // GitCloneDepth: pulumi.Int(1), 255 // }, 256 // Tags: pulumi.StringMap{ 257 // "Environment": pulumi.String("Test"), 258 // }, 259 // }) 260 // if err != nil { 261 // return err 262 // } 263 // return nil 264 // }) 265 // } 266 // ``` 267 // <!--End PulumiCodeChooser --> 268 // 269 // ## Import 270 // 271 // Using `pulumi import`, import CodeBuild Project using the `name`. For example: 272 // 273 // ```sh 274 // $ pulumi import aws:codebuild/project:Project name project-name 275 // ``` 276 type Project struct { 277 pulumi.CustomResourceState 278 279 // ARN of the CodeBuild project. 280 Arn pulumi.StringOutput `pulumi:"arn"` 281 // Configuration block. Detailed below. 282 Artifacts ProjectArtifactsOutput `pulumi:"artifacts"` 283 // Generates a publicly-accessible URL for the projects build badge. Available as `badgeUrl` attribute when enabled. 284 BadgeEnabled pulumi.BoolPtrOutput `pulumi:"badgeEnabled"` 285 // URL of the build badge when `badgeEnabled` is enabled. 286 BadgeUrl pulumi.StringOutput `pulumi:"badgeUrl"` 287 // Defines the batch build options for the project. 288 BuildBatchConfig ProjectBuildBatchConfigPtrOutput `pulumi:"buildBatchConfig"` 289 // Number of minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed. The default is 60 minutes. The `buildTimeout` property is not available on the `Lambda` compute type. 290 BuildTimeout pulumi.IntPtrOutput `pulumi:"buildTimeout"` 291 // Configuration block. Detailed below. 292 Cache ProjectCachePtrOutput `pulumi:"cache"` 293 // Specify a maximum number of concurrent builds for the project. The value specified must be greater than 0 and less than the account concurrent running builds limit. 294 ConcurrentBuildLimit pulumi.IntPtrOutput `pulumi:"concurrentBuildLimit"` 295 // Short description of the project. 296 Description pulumi.StringOutput `pulumi:"description"` 297 // AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build project's build output artifacts. 298 EncryptionKey pulumi.StringOutput `pulumi:"encryptionKey"` 299 // Configuration block. Detailed below. 300 Environment ProjectEnvironmentOutput `pulumi:"environment"` 301 // A set of file system locations to mount inside the build. File system locations are documented below. 302 FileSystemLocations ProjectFileSystemLocationArrayOutput `pulumi:"fileSystemLocations"` 303 // Configuration block. Detailed below. 304 LogsConfig ProjectLogsConfigPtrOutput `pulumi:"logsConfig"` 305 // Project's name. 306 Name pulumi.StringOutput `pulumi:"name"` 307 // Specifies the visibility of the project's builds. Possible values are: `PUBLIC_READ` and `PRIVATE`. Default value is `PRIVATE`. 308 ProjectVisibility pulumi.StringPtrOutput `pulumi:"projectVisibility"` 309 // The project identifier used with the public build APIs. 310 PublicProjectAlias pulumi.StringOutput `pulumi:"publicProjectAlias"` 311 // Number of minutes, from 5 to 480 (8 hours), a build is allowed to be queued before it times out. The default is 8 hours. The `queuedTimeout` property is not available on the `Lambda` compute type. 312 QueuedTimeout pulumi.IntPtrOutput `pulumi:"queuedTimeout"` 313 // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds in order to display them publicly. Only applicable if `projectVisibility` is `PUBLIC_READ`. 314 ResourceAccessRole pulumi.StringPtrOutput `pulumi:"resourceAccessRole"` 315 // Configuration block. Detailed below. 316 SecondaryArtifacts ProjectSecondaryArtifactArrayOutput `pulumi:"secondaryArtifacts"` 317 // Configuration block. Detailed below. 318 SecondarySourceVersions ProjectSecondarySourceVersionArrayOutput `pulumi:"secondarySourceVersions"` 319 // Configuration block. Detailed below. 320 SecondarySources ProjectSecondarySourceArrayOutput `pulumi:"secondarySources"` 321 // Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. 322 ServiceRole pulumi.StringOutput `pulumi:"serviceRole"` 323 // Configuration block. Detailed below. 324 // 325 // The following arguments are optional: 326 Source ProjectSourceOutput `pulumi:"source"` 327 // Version of the build input to be built for this project. If not specified, the latest version is used. 328 SourceVersion pulumi.StringPtrOutput `pulumi:"sourceVersion"` 329 // 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. 330 Tags pulumi.StringMapOutput `pulumi:"tags"` 331 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 332 // 333 // Deprecated: Please use `tags` instead. 334 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 335 // Configuration block. Detailed below. 336 VpcConfig ProjectVpcConfigPtrOutput `pulumi:"vpcConfig"` 337 } 338 339 // NewProject registers a new resource with the given unique name, arguments, and options. 340 func NewProject(ctx *pulumi.Context, 341 name string, args *ProjectArgs, opts ...pulumi.ResourceOption) (*Project, error) { 342 if args == nil { 343 return nil, errors.New("missing one or more required arguments") 344 } 345 346 if args.Artifacts == nil { 347 return nil, errors.New("invalid value for required argument 'Artifacts'") 348 } 349 if args.Environment == nil { 350 return nil, errors.New("invalid value for required argument 'Environment'") 351 } 352 if args.ServiceRole == nil { 353 return nil, errors.New("invalid value for required argument 'ServiceRole'") 354 } 355 if args.Source == nil { 356 return nil, errors.New("invalid value for required argument 'Source'") 357 } 358 opts = internal.PkgResourceDefaultOpts(opts) 359 var resource Project 360 err := ctx.RegisterResource("aws:codebuild/project:Project", name, args, &resource, opts...) 361 if err != nil { 362 return nil, err 363 } 364 return &resource, nil 365 } 366 367 // GetProject gets an existing Project resource's state with the given name, ID, and optional 368 // state properties that are used to uniquely qualify the lookup (nil if not required). 369 func GetProject(ctx *pulumi.Context, 370 name string, id pulumi.IDInput, state *ProjectState, opts ...pulumi.ResourceOption) (*Project, error) { 371 var resource Project 372 err := ctx.ReadResource("aws:codebuild/project:Project", name, id, state, &resource, opts...) 373 if err != nil { 374 return nil, err 375 } 376 return &resource, nil 377 } 378 379 // Input properties used for looking up and filtering Project resources. 380 type projectState struct { 381 // ARN of the CodeBuild project. 382 Arn *string `pulumi:"arn"` 383 // Configuration block. Detailed below. 384 Artifacts *ProjectArtifacts `pulumi:"artifacts"` 385 // Generates a publicly-accessible URL for the projects build badge. Available as `badgeUrl` attribute when enabled. 386 BadgeEnabled *bool `pulumi:"badgeEnabled"` 387 // URL of the build badge when `badgeEnabled` is enabled. 388 BadgeUrl *string `pulumi:"badgeUrl"` 389 // Defines the batch build options for the project. 390 BuildBatchConfig *ProjectBuildBatchConfig `pulumi:"buildBatchConfig"` 391 // Number of minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed. The default is 60 minutes. The `buildTimeout` property is not available on the `Lambda` compute type. 392 BuildTimeout *int `pulumi:"buildTimeout"` 393 // Configuration block. Detailed below. 394 Cache *ProjectCache `pulumi:"cache"` 395 // Specify a maximum number of concurrent builds for the project. The value specified must be greater than 0 and less than the account concurrent running builds limit. 396 ConcurrentBuildLimit *int `pulumi:"concurrentBuildLimit"` 397 // Short description of the project. 398 Description *string `pulumi:"description"` 399 // AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build project's build output artifacts. 400 EncryptionKey *string `pulumi:"encryptionKey"` 401 // Configuration block. Detailed below. 402 Environment *ProjectEnvironment `pulumi:"environment"` 403 // A set of file system locations to mount inside the build. File system locations are documented below. 404 FileSystemLocations []ProjectFileSystemLocation `pulumi:"fileSystemLocations"` 405 // Configuration block. Detailed below. 406 LogsConfig *ProjectLogsConfig `pulumi:"logsConfig"` 407 // Project's name. 408 Name *string `pulumi:"name"` 409 // Specifies the visibility of the project's builds. Possible values are: `PUBLIC_READ` and `PRIVATE`. Default value is `PRIVATE`. 410 ProjectVisibility *string `pulumi:"projectVisibility"` 411 // The project identifier used with the public build APIs. 412 PublicProjectAlias *string `pulumi:"publicProjectAlias"` 413 // Number of minutes, from 5 to 480 (8 hours), a build is allowed to be queued before it times out. The default is 8 hours. The `queuedTimeout` property is not available on the `Lambda` compute type. 414 QueuedTimeout *int `pulumi:"queuedTimeout"` 415 // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds in order to display them publicly. Only applicable if `projectVisibility` is `PUBLIC_READ`. 416 ResourceAccessRole *string `pulumi:"resourceAccessRole"` 417 // Configuration block. Detailed below. 418 SecondaryArtifacts []ProjectSecondaryArtifact `pulumi:"secondaryArtifacts"` 419 // Configuration block. Detailed below. 420 SecondarySourceVersions []ProjectSecondarySourceVersion `pulumi:"secondarySourceVersions"` 421 // Configuration block. Detailed below. 422 SecondarySources []ProjectSecondarySource `pulumi:"secondarySources"` 423 // Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. 424 ServiceRole *string `pulumi:"serviceRole"` 425 // Configuration block. Detailed below. 426 // 427 // The following arguments are optional: 428 Source *ProjectSource `pulumi:"source"` 429 // Version of the build input to be built for this project. If not specified, the latest version is used. 430 SourceVersion *string `pulumi:"sourceVersion"` 431 // 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. 432 Tags map[string]string `pulumi:"tags"` 433 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 434 // 435 // Deprecated: Please use `tags` instead. 436 TagsAll map[string]string `pulumi:"tagsAll"` 437 // Configuration block. Detailed below. 438 VpcConfig *ProjectVpcConfig `pulumi:"vpcConfig"` 439 } 440 441 type ProjectState struct { 442 // ARN of the CodeBuild project. 443 Arn pulumi.StringPtrInput 444 // Configuration block. Detailed below. 445 Artifacts ProjectArtifactsPtrInput 446 // Generates a publicly-accessible URL for the projects build badge. Available as `badgeUrl` attribute when enabled. 447 BadgeEnabled pulumi.BoolPtrInput 448 // URL of the build badge when `badgeEnabled` is enabled. 449 BadgeUrl pulumi.StringPtrInput 450 // Defines the batch build options for the project. 451 BuildBatchConfig ProjectBuildBatchConfigPtrInput 452 // Number of minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed. The default is 60 minutes. The `buildTimeout` property is not available on the `Lambda` compute type. 453 BuildTimeout pulumi.IntPtrInput 454 // Configuration block. Detailed below. 455 Cache ProjectCachePtrInput 456 // Specify a maximum number of concurrent builds for the project. The value specified must be greater than 0 and less than the account concurrent running builds limit. 457 ConcurrentBuildLimit pulumi.IntPtrInput 458 // Short description of the project. 459 Description pulumi.StringPtrInput 460 // AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build project's build output artifacts. 461 EncryptionKey pulumi.StringPtrInput 462 // Configuration block. Detailed below. 463 Environment ProjectEnvironmentPtrInput 464 // A set of file system locations to mount inside the build. File system locations are documented below. 465 FileSystemLocations ProjectFileSystemLocationArrayInput 466 // Configuration block. Detailed below. 467 LogsConfig ProjectLogsConfigPtrInput 468 // Project's name. 469 Name pulumi.StringPtrInput 470 // Specifies the visibility of the project's builds. Possible values are: `PUBLIC_READ` and `PRIVATE`. Default value is `PRIVATE`. 471 ProjectVisibility pulumi.StringPtrInput 472 // The project identifier used with the public build APIs. 473 PublicProjectAlias pulumi.StringPtrInput 474 // Number of minutes, from 5 to 480 (8 hours), a build is allowed to be queued before it times out. The default is 8 hours. The `queuedTimeout` property is not available on the `Lambda` compute type. 475 QueuedTimeout pulumi.IntPtrInput 476 // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds in order to display them publicly. Only applicable if `projectVisibility` is `PUBLIC_READ`. 477 ResourceAccessRole pulumi.StringPtrInput 478 // Configuration block. Detailed below. 479 SecondaryArtifacts ProjectSecondaryArtifactArrayInput 480 // Configuration block. Detailed below. 481 SecondarySourceVersions ProjectSecondarySourceVersionArrayInput 482 // Configuration block. Detailed below. 483 SecondarySources ProjectSecondarySourceArrayInput 484 // Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. 485 ServiceRole pulumi.StringPtrInput 486 // Configuration block. Detailed below. 487 // 488 // The following arguments are optional: 489 Source ProjectSourcePtrInput 490 // Version of the build input to be built for this project. If not specified, the latest version is used. 491 SourceVersion pulumi.StringPtrInput 492 // 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. 493 Tags pulumi.StringMapInput 494 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 495 // 496 // Deprecated: Please use `tags` instead. 497 TagsAll pulumi.StringMapInput 498 // Configuration block. Detailed below. 499 VpcConfig ProjectVpcConfigPtrInput 500 } 501 502 func (ProjectState) ElementType() reflect.Type { 503 return reflect.TypeOf((*projectState)(nil)).Elem() 504 } 505 506 type projectArgs struct { 507 // Configuration block. Detailed below. 508 Artifacts ProjectArtifacts `pulumi:"artifacts"` 509 // Generates a publicly-accessible URL for the projects build badge. Available as `badgeUrl` attribute when enabled. 510 BadgeEnabled *bool `pulumi:"badgeEnabled"` 511 // Defines the batch build options for the project. 512 BuildBatchConfig *ProjectBuildBatchConfig `pulumi:"buildBatchConfig"` 513 // Number of minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed. The default is 60 minutes. The `buildTimeout` property is not available on the `Lambda` compute type. 514 BuildTimeout *int `pulumi:"buildTimeout"` 515 // Configuration block. Detailed below. 516 Cache *ProjectCache `pulumi:"cache"` 517 // Specify a maximum number of concurrent builds for the project. The value specified must be greater than 0 and less than the account concurrent running builds limit. 518 ConcurrentBuildLimit *int `pulumi:"concurrentBuildLimit"` 519 // Short description of the project. 520 Description *string `pulumi:"description"` 521 // AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build project's build output artifacts. 522 EncryptionKey *string `pulumi:"encryptionKey"` 523 // Configuration block. Detailed below. 524 Environment ProjectEnvironment `pulumi:"environment"` 525 // A set of file system locations to mount inside the build. File system locations are documented below. 526 FileSystemLocations []ProjectFileSystemLocation `pulumi:"fileSystemLocations"` 527 // Configuration block. Detailed below. 528 LogsConfig *ProjectLogsConfig `pulumi:"logsConfig"` 529 // Project's name. 530 Name *string `pulumi:"name"` 531 // Specifies the visibility of the project's builds. Possible values are: `PUBLIC_READ` and `PRIVATE`. Default value is `PRIVATE`. 532 ProjectVisibility *string `pulumi:"projectVisibility"` 533 // Number of minutes, from 5 to 480 (8 hours), a build is allowed to be queued before it times out. The default is 8 hours. The `queuedTimeout` property is not available on the `Lambda` compute type. 534 QueuedTimeout *int `pulumi:"queuedTimeout"` 535 // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds in order to display them publicly. Only applicable if `projectVisibility` is `PUBLIC_READ`. 536 ResourceAccessRole *string `pulumi:"resourceAccessRole"` 537 // Configuration block. Detailed below. 538 SecondaryArtifacts []ProjectSecondaryArtifact `pulumi:"secondaryArtifacts"` 539 // Configuration block. Detailed below. 540 SecondarySourceVersions []ProjectSecondarySourceVersion `pulumi:"secondarySourceVersions"` 541 // Configuration block. Detailed below. 542 SecondarySources []ProjectSecondarySource `pulumi:"secondarySources"` 543 // Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. 544 ServiceRole string `pulumi:"serviceRole"` 545 // Configuration block. Detailed below. 546 // 547 // The following arguments are optional: 548 Source ProjectSource `pulumi:"source"` 549 // Version of the build input to be built for this project. If not specified, the latest version is used. 550 SourceVersion *string `pulumi:"sourceVersion"` 551 // 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. 552 Tags map[string]string `pulumi:"tags"` 553 // Configuration block. Detailed below. 554 VpcConfig *ProjectVpcConfig `pulumi:"vpcConfig"` 555 } 556 557 // The set of arguments for constructing a Project resource. 558 type ProjectArgs struct { 559 // Configuration block. Detailed below. 560 Artifacts ProjectArtifactsInput 561 // Generates a publicly-accessible URL for the projects build badge. Available as `badgeUrl` attribute when enabled. 562 BadgeEnabled pulumi.BoolPtrInput 563 // Defines the batch build options for the project. 564 BuildBatchConfig ProjectBuildBatchConfigPtrInput 565 // Number of minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed. The default is 60 minutes. The `buildTimeout` property is not available on the `Lambda` compute type. 566 BuildTimeout pulumi.IntPtrInput 567 // Configuration block. Detailed below. 568 Cache ProjectCachePtrInput 569 // Specify a maximum number of concurrent builds for the project. The value specified must be greater than 0 and less than the account concurrent running builds limit. 570 ConcurrentBuildLimit pulumi.IntPtrInput 571 // Short description of the project. 572 Description pulumi.StringPtrInput 573 // AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build project's build output artifacts. 574 EncryptionKey pulumi.StringPtrInput 575 // Configuration block. Detailed below. 576 Environment ProjectEnvironmentInput 577 // A set of file system locations to mount inside the build. File system locations are documented below. 578 FileSystemLocations ProjectFileSystemLocationArrayInput 579 // Configuration block. Detailed below. 580 LogsConfig ProjectLogsConfigPtrInput 581 // Project's name. 582 Name pulumi.StringPtrInput 583 // Specifies the visibility of the project's builds. Possible values are: `PUBLIC_READ` and `PRIVATE`. Default value is `PRIVATE`. 584 ProjectVisibility pulumi.StringPtrInput 585 // Number of minutes, from 5 to 480 (8 hours), a build is allowed to be queued before it times out. The default is 8 hours. The `queuedTimeout` property is not available on the `Lambda` compute type. 586 QueuedTimeout pulumi.IntPtrInput 587 // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds in order to display them publicly. Only applicable if `projectVisibility` is `PUBLIC_READ`. 588 ResourceAccessRole pulumi.StringPtrInput 589 // Configuration block. Detailed below. 590 SecondaryArtifacts ProjectSecondaryArtifactArrayInput 591 // Configuration block. Detailed below. 592 SecondarySourceVersions ProjectSecondarySourceVersionArrayInput 593 // Configuration block. Detailed below. 594 SecondarySources ProjectSecondarySourceArrayInput 595 // Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. 596 ServiceRole pulumi.StringInput 597 // Configuration block. Detailed below. 598 // 599 // The following arguments are optional: 600 Source ProjectSourceInput 601 // Version of the build input to be built for this project. If not specified, the latest version is used. 602 SourceVersion pulumi.StringPtrInput 603 // 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. 604 Tags pulumi.StringMapInput 605 // Configuration block. Detailed below. 606 VpcConfig ProjectVpcConfigPtrInput 607 } 608 609 func (ProjectArgs) ElementType() reflect.Type { 610 return reflect.TypeOf((*projectArgs)(nil)).Elem() 611 } 612 613 type ProjectInput interface { 614 pulumi.Input 615 616 ToProjectOutput() ProjectOutput 617 ToProjectOutputWithContext(ctx context.Context) ProjectOutput 618 } 619 620 func (*Project) ElementType() reflect.Type { 621 return reflect.TypeOf((**Project)(nil)).Elem() 622 } 623 624 func (i *Project) ToProjectOutput() ProjectOutput { 625 return i.ToProjectOutputWithContext(context.Background()) 626 } 627 628 func (i *Project) ToProjectOutputWithContext(ctx context.Context) ProjectOutput { 629 return pulumi.ToOutputWithContext(ctx, i).(ProjectOutput) 630 } 631 632 // ProjectArrayInput is an input type that accepts ProjectArray and ProjectArrayOutput values. 633 // You can construct a concrete instance of `ProjectArrayInput` via: 634 // 635 // ProjectArray{ ProjectArgs{...} } 636 type ProjectArrayInput interface { 637 pulumi.Input 638 639 ToProjectArrayOutput() ProjectArrayOutput 640 ToProjectArrayOutputWithContext(context.Context) ProjectArrayOutput 641 } 642 643 type ProjectArray []ProjectInput 644 645 func (ProjectArray) ElementType() reflect.Type { 646 return reflect.TypeOf((*[]*Project)(nil)).Elem() 647 } 648 649 func (i ProjectArray) ToProjectArrayOutput() ProjectArrayOutput { 650 return i.ToProjectArrayOutputWithContext(context.Background()) 651 } 652 653 func (i ProjectArray) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput { 654 return pulumi.ToOutputWithContext(ctx, i).(ProjectArrayOutput) 655 } 656 657 // ProjectMapInput is an input type that accepts ProjectMap and ProjectMapOutput values. 658 // You can construct a concrete instance of `ProjectMapInput` via: 659 // 660 // ProjectMap{ "key": ProjectArgs{...} } 661 type ProjectMapInput interface { 662 pulumi.Input 663 664 ToProjectMapOutput() ProjectMapOutput 665 ToProjectMapOutputWithContext(context.Context) ProjectMapOutput 666 } 667 668 type ProjectMap map[string]ProjectInput 669 670 func (ProjectMap) ElementType() reflect.Type { 671 return reflect.TypeOf((*map[string]*Project)(nil)).Elem() 672 } 673 674 func (i ProjectMap) ToProjectMapOutput() ProjectMapOutput { 675 return i.ToProjectMapOutputWithContext(context.Background()) 676 } 677 678 func (i ProjectMap) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput { 679 return pulumi.ToOutputWithContext(ctx, i).(ProjectMapOutput) 680 } 681 682 type ProjectOutput struct{ *pulumi.OutputState } 683 684 func (ProjectOutput) ElementType() reflect.Type { 685 return reflect.TypeOf((**Project)(nil)).Elem() 686 } 687 688 func (o ProjectOutput) ToProjectOutput() ProjectOutput { 689 return o 690 } 691 692 func (o ProjectOutput) ToProjectOutputWithContext(ctx context.Context) ProjectOutput { 693 return o 694 } 695 696 // ARN of the CodeBuild project. 697 func (o ProjectOutput) Arn() pulumi.StringOutput { 698 return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 699 } 700 701 // Configuration block. Detailed below. 702 func (o ProjectOutput) Artifacts() ProjectArtifactsOutput { 703 return o.ApplyT(func(v *Project) ProjectArtifactsOutput { return v.Artifacts }).(ProjectArtifactsOutput) 704 } 705 706 // Generates a publicly-accessible URL for the projects build badge. Available as `badgeUrl` attribute when enabled. 707 func (o ProjectOutput) BadgeEnabled() pulumi.BoolPtrOutput { 708 return o.ApplyT(func(v *Project) pulumi.BoolPtrOutput { return v.BadgeEnabled }).(pulumi.BoolPtrOutput) 709 } 710 711 // URL of the build badge when `badgeEnabled` is enabled. 712 func (o ProjectOutput) BadgeUrl() pulumi.StringOutput { 713 return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.BadgeUrl }).(pulumi.StringOutput) 714 } 715 716 // Defines the batch build options for the project. 717 func (o ProjectOutput) BuildBatchConfig() ProjectBuildBatchConfigPtrOutput { 718 return o.ApplyT(func(v *Project) ProjectBuildBatchConfigPtrOutput { return v.BuildBatchConfig }).(ProjectBuildBatchConfigPtrOutput) 719 } 720 721 // Number of minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed. The default is 60 minutes. The `buildTimeout` property is not available on the `Lambda` compute type. 722 func (o ProjectOutput) BuildTimeout() pulumi.IntPtrOutput { 723 return o.ApplyT(func(v *Project) pulumi.IntPtrOutput { return v.BuildTimeout }).(pulumi.IntPtrOutput) 724 } 725 726 // Configuration block. Detailed below. 727 func (o ProjectOutput) Cache() ProjectCachePtrOutput { 728 return o.ApplyT(func(v *Project) ProjectCachePtrOutput { return v.Cache }).(ProjectCachePtrOutput) 729 } 730 731 // Specify a maximum number of concurrent builds for the project. The value specified must be greater than 0 and less than the account concurrent running builds limit. 732 func (o ProjectOutput) ConcurrentBuildLimit() pulumi.IntPtrOutput { 733 return o.ApplyT(func(v *Project) pulumi.IntPtrOutput { return v.ConcurrentBuildLimit }).(pulumi.IntPtrOutput) 734 } 735 736 // Short description of the project. 737 func (o ProjectOutput) Description() pulumi.StringOutput { 738 return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) 739 } 740 741 // AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build project's build output artifacts. 742 func (o ProjectOutput) EncryptionKey() pulumi.StringOutput { 743 return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.EncryptionKey }).(pulumi.StringOutput) 744 } 745 746 // Configuration block. Detailed below. 747 func (o ProjectOutput) Environment() ProjectEnvironmentOutput { 748 return o.ApplyT(func(v *Project) ProjectEnvironmentOutput { return v.Environment }).(ProjectEnvironmentOutput) 749 } 750 751 // A set of file system locations to mount inside the build. File system locations are documented below. 752 func (o ProjectOutput) FileSystemLocations() ProjectFileSystemLocationArrayOutput { 753 return o.ApplyT(func(v *Project) ProjectFileSystemLocationArrayOutput { return v.FileSystemLocations }).(ProjectFileSystemLocationArrayOutput) 754 } 755 756 // Configuration block. Detailed below. 757 func (o ProjectOutput) LogsConfig() ProjectLogsConfigPtrOutput { 758 return o.ApplyT(func(v *Project) ProjectLogsConfigPtrOutput { return v.LogsConfig }).(ProjectLogsConfigPtrOutput) 759 } 760 761 // Project's name. 762 func (o ProjectOutput) Name() pulumi.StringOutput { 763 return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 764 } 765 766 // Specifies the visibility of the project's builds. Possible values are: `PUBLIC_READ` and `PRIVATE`. Default value is `PRIVATE`. 767 func (o ProjectOutput) ProjectVisibility() pulumi.StringPtrOutput { 768 return o.ApplyT(func(v *Project) pulumi.StringPtrOutput { return v.ProjectVisibility }).(pulumi.StringPtrOutput) 769 } 770 771 // The project identifier used with the public build APIs. 772 func (o ProjectOutput) PublicProjectAlias() pulumi.StringOutput { 773 return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.PublicProjectAlias }).(pulumi.StringOutput) 774 } 775 776 // Number of minutes, from 5 to 480 (8 hours), a build is allowed to be queued before it times out. The default is 8 hours. The `queuedTimeout` property is not available on the `Lambda` compute type. 777 func (o ProjectOutput) QueuedTimeout() pulumi.IntPtrOutput { 778 return o.ApplyT(func(v *Project) pulumi.IntPtrOutput { return v.QueuedTimeout }).(pulumi.IntPtrOutput) 779 } 780 781 // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds in order to display them publicly. Only applicable if `projectVisibility` is `PUBLIC_READ`. 782 func (o ProjectOutput) ResourceAccessRole() pulumi.StringPtrOutput { 783 return o.ApplyT(func(v *Project) pulumi.StringPtrOutput { return v.ResourceAccessRole }).(pulumi.StringPtrOutput) 784 } 785 786 // Configuration block. Detailed below. 787 func (o ProjectOutput) SecondaryArtifacts() ProjectSecondaryArtifactArrayOutput { 788 return o.ApplyT(func(v *Project) ProjectSecondaryArtifactArrayOutput { return v.SecondaryArtifacts }).(ProjectSecondaryArtifactArrayOutput) 789 } 790 791 // Configuration block. Detailed below. 792 func (o ProjectOutput) SecondarySourceVersions() ProjectSecondarySourceVersionArrayOutput { 793 return o.ApplyT(func(v *Project) ProjectSecondarySourceVersionArrayOutput { return v.SecondarySourceVersions }).(ProjectSecondarySourceVersionArrayOutput) 794 } 795 796 // Configuration block. Detailed below. 797 func (o ProjectOutput) SecondarySources() ProjectSecondarySourceArrayOutput { 798 return o.ApplyT(func(v *Project) ProjectSecondarySourceArrayOutput { return v.SecondarySources }).(ProjectSecondarySourceArrayOutput) 799 } 800 801 // Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. 802 func (o ProjectOutput) ServiceRole() pulumi.StringOutput { 803 return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.ServiceRole }).(pulumi.StringOutput) 804 } 805 806 // Configuration block. Detailed below. 807 // 808 // The following arguments are optional: 809 func (o ProjectOutput) Source() ProjectSourceOutput { 810 return o.ApplyT(func(v *Project) ProjectSourceOutput { return v.Source }).(ProjectSourceOutput) 811 } 812 813 // Version of the build input to be built for this project. If not specified, the latest version is used. 814 func (o ProjectOutput) SourceVersion() pulumi.StringPtrOutput { 815 return o.ApplyT(func(v *Project) pulumi.StringPtrOutput { return v.SourceVersion }).(pulumi.StringPtrOutput) 816 } 817 818 // 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. 819 func (o ProjectOutput) Tags() pulumi.StringMapOutput { 820 return o.ApplyT(func(v *Project) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 821 } 822 823 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 824 // 825 // Deprecated: Please use `tags` instead. 826 func (o ProjectOutput) TagsAll() pulumi.StringMapOutput { 827 return o.ApplyT(func(v *Project) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 828 } 829 830 // Configuration block. Detailed below. 831 func (o ProjectOutput) VpcConfig() ProjectVpcConfigPtrOutput { 832 return o.ApplyT(func(v *Project) ProjectVpcConfigPtrOutput { return v.VpcConfig }).(ProjectVpcConfigPtrOutput) 833 } 834 835 type ProjectArrayOutput struct{ *pulumi.OutputState } 836 837 func (ProjectArrayOutput) ElementType() reflect.Type { 838 return reflect.TypeOf((*[]*Project)(nil)).Elem() 839 } 840 841 func (o ProjectArrayOutput) ToProjectArrayOutput() ProjectArrayOutput { 842 return o 843 } 844 845 func (o ProjectArrayOutput) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput { 846 return o 847 } 848 849 func (o ProjectArrayOutput) Index(i pulumi.IntInput) ProjectOutput { 850 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Project { 851 return vs[0].([]*Project)[vs[1].(int)] 852 }).(ProjectOutput) 853 } 854 855 type ProjectMapOutput struct{ *pulumi.OutputState } 856 857 func (ProjectMapOutput) ElementType() reflect.Type { 858 return reflect.TypeOf((*map[string]*Project)(nil)).Elem() 859 } 860 861 func (o ProjectMapOutput) ToProjectMapOutput() ProjectMapOutput { 862 return o 863 } 864 865 func (o ProjectMapOutput) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput { 866 return o 867 } 868 869 func (o ProjectMapOutput) MapIndex(k pulumi.StringInput) ProjectOutput { 870 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Project { 871 return vs[0].(map[string]*Project)[vs[1].(string)] 872 }).(ProjectOutput) 873 } 874 875 func init() { 876 pulumi.RegisterInputType(reflect.TypeOf((*ProjectInput)(nil)).Elem(), &Project{}) 877 pulumi.RegisterInputType(reflect.TypeOf((*ProjectArrayInput)(nil)).Elem(), ProjectArray{}) 878 pulumi.RegisterInputType(reflect.TypeOf((*ProjectMapInput)(nil)).Elem(), ProjectMap{}) 879 pulumi.RegisterOutputType(ProjectOutput{}) 880 pulumi.RegisterOutputType(ProjectArrayOutput{}) 881 pulumi.RegisterOutputType(ProjectMapOutput{}) 882 }