@@ -86,6 +86,8 @@ Metadata:
86
86
- SecretsBucketRegion
87
87
- SecretsBucketEncryption
88
88
- ArtifactsBucket
89
+ - ArtifactsBucketRegion
90
+ - ArtifactsS3ACL
89
91
- AuthorizedUsersUrl
90
92
- BootstrapScriptUrl
91
93
- AgentEnvFileUrl
@@ -409,6 +411,24 @@ Parameters:
409
411
Type : String
410
412
Default : " "
411
413
414
+ ArtifactsBucketRegion :
415
+ Description : Optional - Region for the ArtifactsBucket. If blank the bucket's region is dynamically discovered.
416
+ Type : String
417
+ Default : " "
418
+
419
+ ArtifactsS3ACL :
420
+ Description : Optional - ACL to use for S3 artifact uploads
421
+ Type : String
422
+ AllowedValues :
423
+ - " private"
424
+ - " public-read"
425
+ - " public-read-write"
426
+ - " authenticated-read"
427
+ - " aws-exec-read"
428
+ - " bucket-owner-read"
429
+ - " bucket-owner-full-control"
430
+ Default : " private"
431
+
412
432
BootstrapScriptUrl :
413
433
Description : Optional - HTTPS or S3 URL for a script to run on each instance during boot
414
434
Type : String
@@ -866,6 +886,8 @@ Conditions:
866
886
867
887
UseArtifactsBucket :
868
888
!Not [ !Equals [ !Ref ArtifactsBucket, "" ] ]
889
+ IsArtifactsBucketRegionEmpty :
890
+ !Equals [ !Ref ArtifactsBucketRegion, "" ]
869
891
870
892
HasImageId :
871
893
!Not [ !Equals [ !Ref ImageId, "" ] ]
@@ -895,13 +917,13 @@ Conditions:
895
917
896
918
UseInstanceType7 :
897
919
!Not [ !Equals [ !Select [ "6", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
898
-
920
+
899
921
UseInstanceType8 :
900
922
!Not [ !Equals [ !Select [ "7", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
901
-
923
+
902
924
UseInstanceType9 :
903
925
!Not [ !Equals [ !Select [ "8", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
904
-
926
+
905
927
UseInstanceType10 :
906
928
!Not [ !Equals [ !Select [ "9", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
907
929
@@ -910,13 +932,13 @@ Conditions:
910
932
911
933
UseInstanceType12 :
912
934
!Not [ !Equals [ !Select [ "11", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
913
-
935
+
914
936
UseInstanceType13 :
915
937
!Not [ !Equals [ !Select [ "12", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
916
938
917
939
UseInstanceType14 :
918
940
!Not [ !Equals [ !Select [ "13", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
919
-
941
+
920
942
UseInstanceType15 :
921
943
!Not [ !Equals [ !Select [ "14", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
922
944
@@ -925,13 +947,13 @@ Conditions:
925
947
926
948
UseInstanceType17 :
927
949
!Not [ !Equals [ !Select [ "16", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
928
-
950
+
929
951
UseInstanceType18 :
930
952
!Not [ !Equals [ !Select [ "17", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
931
-
953
+
932
954
UseInstanceType19 :
933
955
!Not [ !Equals [ !Select [ "18", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
934
-
956
+
935
957
UseInstanceType20 :
936
958
!Not [ !Equals [ !Select [ "19", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
937
959
@@ -943,7 +965,7 @@ Conditions:
943
965
944
966
UseInstanceType23 :
945
967
!Not [ !Equals [ !Select [ "22", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
946
-
968
+
947
969
UseInstanceType24 :
948
970
!Not [ !Equals [ !Select [ "23", !Split [ ",", !Join [ ",", [ !Ref InstanceTypes, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] ] ] ], ""] ]
949
971
@@ -1572,6 +1594,9 @@ Resources:
1572
1594
$Env:BUILDKITE_SCALE_IN_IDLE_PERIOD="${ScaleInIdlePeriod}"
1573
1595
$Env:BUILDKITE_SECRETS_BUCKET="${LocalSecretsBucket}"
1574
1596
$Env:BUILDKITE_SECRETS_BUCKET_REGION="${LocalSecretsBucketRegion}"
1597
+ $Env:BUILDKITE_ARTIFACTS_BUCKET="${ArtifactsBucket}"
1598
+ $Env:BUILDKITE_S3_DEFAULT_REGION="${LocalArtifactsBucketRegion}"
1599
+ $Env:BUILDKITE_S3_ACL="${ArtifactsS3ACL}"
1575
1600
$Env:BUILDKITE_AGENT_TOKEN_PATH="${AgentTokenPath}"
1576
1601
$Env:BUILDKITE_AGENTS_PER_INSTANCE="${AgentsPerInstance}"
1577
1602
$Env:BUILDKITE_AGENT_ENDPOINT="${AgentEndpoint}"
@@ -1607,6 +1632,13 @@ Resources:
1607
1632
- CreateSecretsBucket
1608
1633
- !Ref " AWS::Region"
1609
1634
- !Ref SecretsBucketRegion
1635
+ LocalArtifactsBucketRegion : !If
1636
+ - UseArtifactsBucket
1637
+ - !If
1638
+ - IsArtifactsBucketRegionEmpty
1639
+ - !Ref " AWS::Region"
1640
+ - !Ref ArtifactsBucketRegion
1641
+ - !Ref " AWS::Region"
1610
1642
AgentTokenPath : !If
1611
1643
- UseCustomerManagedParameterPath
1612
1644
- !Ref BuildkiteAgentTokenParameterStorePath
@@ -1649,6 +1681,9 @@ Resources:
1649
1681
BUILDKITE_SCALE_IN_IDLE_PERIOD="${ScaleInIdlePeriod}" \
1650
1682
BUILDKITE_SECRETS_BUCKET="${LocalSecretsBucket}" \
1651
1683
BUILDKITE_SECRETS_BUCKET_REGION="${LocalSecretsBucketRegion}" \
1684
+ BUILDKITE_ARTIFACTS_BUCKET="${ArtifactsBucket}" \
1685
+ BUILDKITE_S3_DEFAULT_REGION="${LocalArtifactsBucketRegion}" \
1686
+ BUILDKITE_S3_ACL="${ArtifactsS3ACL}" \
1652
1687
BUILDKITE_AGENT_TOKEN_PATH="${AgentTokenPath}" \
1653
1688
BUILDKITE_AGENTS_PER_INSTANCE="${AgentsPerInstance}" \
1654
1689
BUILDKITE_AGENT_ENDPOINT="${AgentEndpoint}" \
@@ -1696,6 +1731,13 @@ Resources:
1696
1731
- CreateSecretsBucket
1697
1732
- !Ref " AWS::Region"
1698
1733
- !Ref SecretsBucketRegion
1734
+ LocalArtifactsBucketRegion : !If
1735
+ - UseArtifactsBucket
1736
+ - !If
1737
+ - IsArtifactsBucketRegionEmpty
1738
+ - !Ref " AWS::Region"
1739
+ - !Ref ArtifactsBucketRegion
1740
+ - !Ref " AWS::Region"
1699
1741
AgentTokenPath : !If
1700
1742
- UseCustomerManagedParameterPath
1701
1743
- !Ref BuildkiteAgentTokenParameterStorePath
0 commit comments