@@ -45,6 +45,9 @@ const (
4545
4646 // PermissionPublicIpv4Pool is an additional set of permissions required when the installer uses public IPv4 pools.
4747 PermissionPublicIpv4Pool PermissionGroup = "public-ipv4-pool"
48+
49+ // PermissionDeleteIgnitionObjects is a permission set required when `preserveBootstrapIgnition` is not set.
50+ PermissionDeleteIgnitionObjects PermissionGroup = "delete-ignition-objects"
4851)
4952
5053var permissions = map [PermissionGroup ][]string {
@@ -156,7 +159,6 @@ var permissions = map[PermissionGroup][]string{
156159
157160 // S3 related perms
158161 "s3:CreateBucket" ,
159- "s3:DeleteBucket" ,
160162 "s3:GetAccelerateConfiguration" ,
161163 "s3:GetBucketAcl" ,
162164 "s3:GetBucketCors" ,
@@ -177,7 +179,6 @@ var permissions = map[PermissionGroup][]string{
177179 "s3:PutEncryptionConfiguration" ,
178180
179181 // More S3 (would be nice to limit 'Resource' to just the bucket we actually interact with...)
180- "s3:DeleteObject" ,
181182 "s3:GetObject" ,
182183 "s3:GetObjectAcl" ,
183184 "s3:GetObjectTagging" ,
@@ -201,6 +202,7 @@ var permissions = map[PermissionGroup][]string{
201202 "iam:ListInstanceProfiles" ,
202203 "iam:ListRolePolicies" ,
203204 "iam:ListUserPolicies" ,
205+ "s3:DeleteBucket" ,
204206 "s3:DeleteObject" ,
205207 "s3:ListBucketVersions" ,
206208 "tag:GetResources" ,
@@ -268,6 +270,12 @@ var permissions = map[PermissionGroup][]string{
268270 // Needed by terraform because of bootstrap EIP created
269271 "ec2:DisassociateAddress" ,
270272 },
273+ PermissionDeleteIgnitionObjects : {
274+ // Needed by terraform during the bootstrap destroy stage.
275+ "s3:DeleteBucket" ,
276+ // Needed by capa which always deletes the ignition objects once the VMs are up.
277+ "s3:DeleteObject" ,
278+ },
271279}
272280
273281// ValidateCreds will try to create an AWS session, and also verify that the current credentials
0 commit comments