Skip to content

Commit

Permalink
Add matches_prefix and matches_suffix in bucket lifecycle_rules. (#1184)
Browse files Browse the repository at this point in the history
* Add matches_prefix and matches_suffix in bucket lifecycle_rules.

* generate docs
  • Loading branch information
haoyutianAtGoogle committed Sep 26, 2023
1 parent edacaa4 commit c613424
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/tfengine/schemas/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@
| storage_buckets.lifecycle_rules.condition | The Lifecycle Rule's condition configuration. | object | false | - | - |
| storage_buckets.lifecycle_rules.condition.age | Minimum age of an object in days. | integer | false | - | - |
| storage_buckets.lifecycle_rules.condition.created_before | Creation date of an object in RFC 3339 (e.g. 2017-06-13). | string | false | - | - |
| storage_buckets.lifecycle_rules.condition.matches_prefix | Match the object with prefix in the bucket. | array(string) | false | - | - |
| storage_buckets.lifecycle_rules.condition.matches_storage_class | Storage Class of objects. | string | false | - | - |
| storage_buckets.lifecycle_rules.condition.matches_suffix | Match the object with suffix in the bucket. | array(string) | false | - | - |
| storage_buckets.lifecycle_rules.condition.num_newer_versions | Relevant only for versioned objects. The number of newer versions of an object." | integer | false | - | - |
| storage_buckets.lifecycle_rules.condition.with_state | Match to live and/or archived objects. | string | false | - | - |
| storage_buckets.name | Name of storage bucket. | string | false | - | - |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ module "{{resourceName . "name"}}" {
{{hclField .condition "with_state" -}}
{{hclField .condition "matches_storage_class" -}}
{{hclField .condition "num_newer_versions" -}}
{{hclField .condition "matches_prefix" -}}
{{hclField .condition "matches_suffix" -}}
}
}
{{end -}}
Expand Down
14 changes: 14 additions & 0 deletions templates/tfengine/recipes/resources.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,20 @@ schema = {
EOF
type = "integer"
}
matches_prefix = {
description = "Match the object with prefix in the bucket."
type = "array"
items = {
type = "string"
}
}
matches_suffix = {
description = "Match the object with suffix in the bucket."
type = "array"
items = {
type = "string"
}
}
}
}
}
Expand Down

0 comments on commit c613424

Please sign in to comment.