Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cloudavenue_s3_bucket_lifecycle_configuration #602

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .changelog/579.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```release-note:dependency
deps: bumps github.com/FrangipaneTeam/terraform-plugin-framework-supertypes from 0.1.0 to 0.2.0
```

```release-note:dependency
deps: bumps github.com/FrangipaneTeam/terraform-plugin-framework-superschema from 1.5.5 to 1.6.0
```

```release-note:dependency
deps: bumps github.com/orange-cloudavenue/cloudavenue-sdk-go from 0.3.0 to 0.3.1
```

```release-note:new-resource
`resource/cloudavenue_s3_lifecycle_configuration` is a new resource type that allows to manage S3 lifecycle configuration.
```

```release-note:new-data-source
`datasource/cloudavenue_s3_lifecycle_configuration` is a new data source type that allows to retrieve S3 lifecycle configuration.
```
118 changes: 118 additions & 0 deletions docs/data-sources/s3_bucket_lifecycle_configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
page_title: "cloudavenue_s3_bucket_lifecycle_configuration Data Source - cloudavenue"
subcategory: "S3 (Object Storage)"
description: |-
The cloudavenue_s3_bucket_lifecycle_configuration data source allows you to retrieve information about an S3 bucket's lifecycle configuration.
---

# cloudavenue_s3_bucket_lifecycle_configuration (Data Source)

The `cloudavenue_s3_bucket_lifecycle_configuration` data source allows you to retrieve information about an S3 bucket's lifecycle configuration.

## Example Usage

```terraform
data "cloudavenue_s3_bucket_lifecycle_configuration" "example" {
bucket = cloudavenue_s3_bucket.example.name
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `bucket` (String) The name of the bucket.

### Optional

- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))

### Read-Only

- `id` (String) The ID is a bucket name.
- `rules` (Attributes List) Rules that define lifecycle configuration. (see [below for nested schema](#nestedatt--rules))

<a id="nestedatt--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).


<a id="nestedatt--rules"></a>
### Nested Schema for `rules`

Read-Only:

- `abort_incomplete_multipart_upload` (Attributes) Configuration block that specifies the days since the initiation of an incomplete multipart upload that S3 will wait before permanently removing all parts of the upload. (see [below for nested schema](#nestedatt--rules--abort_incomplete_multipart_upload))
- `expiration` (Attributes) Configuration block that specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker. (see [below for nested schema](#nestedatt--rules--expiration))
- `filter` (Attributes) Configuration block used to identify objects that a Lifecycle Rule applies to. (see [below for nested schema](#nestedatt--rules--filter))
- `id` (String) Unique identifier for the rule.
- `noncurrent_version_expiration` (Attributes) Configuration block that specifies when noncurrent object versions expire. (see [below for nested schema](#nestedatt--rules--noncurrent_version_expiration))
- `status` (String) Whether the rule is currently being applied.

<a id="nestedatt--rules--abort_incomplete_multipart_upload"></a>
### Nested Schema for `rules.abort_incomplete_multipart_upload`

Optional:

- `days_after_initiation` (Number) Number of days after which S3 aborts an incomplete multipart upload.


<a id="nestedatt--rules--expiration"></a>
### Nested Schema for `rules.expiration`

Read-Only:

- `date` (String) Date the object is to be moved or deleted. The date value must be in [RFC3339 full-date format](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) e.g. `2023-10-10T00:00:00Z`.
- `days` (Number) Lifetime, in days, of the objects that are subject to the rule. The value must be a non-zero positive integer.
- `expired_object_delete_marker` (Boolean) Indicates whether S3 will remove a delete marker with no noncurrent versions. If set to `true`, the delete marker will be expired, if set to `false` the policy takes no action.


<a id="nestedatt--rules--filter"></a>
### Nested Schema for `rules.filter`

Read-Only:

- `and` (Attributes) Configuration block used to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all the predicates configured inside the and block. (see [below for nested schema](#nestedatt--rules--filter--and))
- `prefix` (String) Match objects with this prefix.
- `tag` (Attributes) Specifies object tag key and value. (see [below for nested schema](#nestedatt--rules--filter--tag))

<a id="nestedatt--rules--filter--and"></a>
### Nested Schema for `rules.filter.and`

Read-Only:

- `prefix` (String) Match objects with this prefix.
- `tags` (Attributes List) Specifies object tag key and value. (see [below for nested schema](#nestedatt--rules--filter--and--tags))

<a id="nestedatt--rules--filter--and--tags"></a>
### Nested Schema for `rules.filter.and.tags`

Read-Only:

- `key` (String) Object tag key.
- `value` (String) Object tag value.



<a id="nestedatt--rules--filter--tag"></a>
### Nested Schema for `rules.filter.tag`

Read-Only:

- `key` (String) Object tag key.
- `value` (String) Object tag value.



<a id="nestedatt--rules--noncurrent_version_expiration"></a>
### Nested Schema for `rules.noncurrent_version_expiration`

Read-Only:

- `newer_noncurrent_versions` (Number) Number of noncurrent versions S3 will retain.
- `noncurrent_days` (Number) Number of days an object is noncurrent before S3 can perform the associated action. Must be a positive integer.

Loading
Loading