Skip to content

Commit

Permalink
fix: version bucket conditional (#6131)
Browse files Browse the repository at this point in the history
* fix: version bucket conditional

* fix: remove unused versioned bucket and lifecycle policy
  • Loading branch information
elorzafe committed Dec 9, 2020
1 parent 89c9d8b commit 9c4281f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,6 @@
"Properties": {
"BucketName": {
"Ref": "DeploymentBucketName"
},
"VersioningConfiguration": {
"Status": "Enabled"
},
"LifecycleConfiguration": {
"Rules": [
{
"ExpirationInDays": 7,
"NoncurrentVersionExpirationInDays": 7,
"Prefix": "codepipeline-amplify/",
"Status": "Enabled"
}
]
}
}
},
Expand Down
15 changes: 15 additions & 0 deletions packages/amplify-provider-awscloudformation/src/push-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,21 @@ async function formNestedStack(
TemplateURL: NetworkStackS3Url,
},
};

nestedStack.Resources.DeploymentBucket.Properties['VersioningConfiguration'] = {
"Status": "Enabled"
};

nestedStack.Resources.DeploymentBucket.Properties['LifecycleConfiguration'] = {
"Rules": [
{
"ExpirationInDays": 7,
"NoncurrentVersionExpirationInDays": 7,
"Prefix": "codepipeline-amplify/",
"Status": "Enabled"
}
]
};
}

let categories = Object.keys(amplifyMeta);
Expand Down

0 comments on commit 9c4281f

Please sign in to comment.