diff --git a/mlflow/plural/docs/bucket-versioning.md b/mlflow/plural/docs/bucket-versioning.md new file mode 100644 index 000000000..56f632f48 --- /dev/null +++ b/mlflow/plural/docs/bucket-versioning.md @@ -0,0 +1,13 @@ +## Enable Bucket Versioning + +In case you want to enable s3 object versioning, this is supported via a small terraform configuration. Go to `mlflow/terraform/main.tf` and within the manual section of the `aws` module, add: + +```tf +module "aws" { + ## BEGIN MANUAL SECTION <- be sure to put it w/in these + enable_versioning = true + ## END MANUAL SECTION +} +``` + +Then run a quick `plural deploy --commit "enable mlflow s3 versioning"` and you'll be set. \ No newline at end of file diff --git a/mlflow/terraform/aws/deps.yaml b/mlflow/terraform/aws/deps.yaml index d89802c91..f73c8e966 100644 --- a/mlflow/terraform/aws/deps.yaml +++ b/mlflow/terraform/aws/deps.yaml @@ -2,9 +2,8 @@ apiVersion: plural.sh/v1alpha1 kind: Dependencies metadata: description: mlflow aws setup - version: 0.1.4 + version: 0.1.5 spec: - breaking: true dependencies: - name: aws-bootstrap repo: bootstrap diff --git a/mlflow/terraform/aws/main.tf b/mlflow/terraform/aws/main.tf index 8c0743b7a..3951233ef 100644 --- a/mlflow/terraform/aws/main.tf +++ b/mlflow/terraform/aws/main.tf @@ -14,11 +14,12 @@ data "aws_eks_cluster" "cluster" { } module "s3_buckets" { - source = "github.com/pluralsh/module-library//terraform/s3-buckets?ref=bucket-protection" - bucket_names = [var.mlflow_bucket] - policy_prefix = var.role_name - force_destroy = var.force_destroy_bucket - bucket_tags = var.bucket_tags + source = "github.com/pluralsh/module-library//terraform/s3-buckets?ref=bucket-protection" + bucket_names = [var.mlflow_bucket] + policy_prefix = var.role_name + force_destroy = var.force_destroy_bucket + bucket_tags = var.bucket_tags + enable_versioning = var.enable_versioning } module "assumable_role_mlflow" { diff --git a/mlflow/terraform/aws/variables.tf b/mlflow/terraform/aws/variables.tf index 8ef836679..58bf9b4d0 100644 --- a/mlflow/terraform/aws/variables.tf +++ b/mlflow/terraform/aws/variables.tf @@ -33,3 +33,9 @@ variable "bucket_tags" { description = "tags to apply to the buckets" default = {} } + +variable "enable_versioning" { + type = bool + description = "enable s3 object versioning" + default = false +} \ No newline at end of file