Skip to content

Commit 221a762

Browse files
authored
Merge branch 'master' into warn-creds
2 parents 6803bef + a71bb37 commit 221a762

17 files changed

+3618
-746
lines changed

docs/resources/iam_user.md

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,15 @@ page_title: "Scaleway: scaleway_iam_user"
55

66
# Resource: scaleway_iam_user
77

8-
Creates and manages Scaleway IAM Users.
8+
Creates and manages Scaleway IAM [Users](https://www.scaleway.com/en/docs/iam/concepts/#member).
99
For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/iam/#path-users-list-users-of-an-organization).
1010

1111
## Example Usage
1212

13-
### Guest user
13+
### User
1414

1515
```terraform
16-
resource "scaleway_iam_user" "guest" {
17-
18-
tags = ["test-tag"]
19-
}
20-
```
21-
22-
### Member user
23-
24-
```terraform
25-
resource "scaleway_iam_user" "member" {
16+
resource "scaleway_iam_user" "user" {
2617
2718
tags = ["test-tag"]
2819
username = "foo"
@@ -31,21 +22,26 @@ resource "scaleway_iam_user" "member" {
3122
}
3223
```
3324

34-
When `username` is set, the user is created as a [Member](https://www.scaleway.com/en/docs/iam/concepts/#member). Otherwise, it is created as a [Guest](https://www.scaleway.com/en/docs/iam/concepts/#guest).
35-
3625
### Multiple users
3726

3827
```terraform
3928
locals {
40-
users = toset([
41-
42-
43-
])
29+
users = [
30+
{
31+
32+
username = "test"
33+
},
34+
{
35+
36+
username = "test2"
37+
}
38+
]
4439
}
4540
46-
resource "scaleway_iam_user" "user" {
47-
for_each = local.users
48-
email = each.key
41+
resource "scaleway_iam_user" "users" {
42+
count = length(local.users)
43+
email = local.users[count.index].email
44+
username = local.users[count.index].username
4945
}
5046
```
5147

@@ -57,7 +53,7 @@ resource "scaleway_iam_user" "user" {
5753

5854
- `tags` - (Optional) The tags associated with the user.
5955

60-
- `username` - (Optional) The username of the IAM user. When it is set, the user is created as a Member. When it is not set, the user is created as a Guest and the username is set as equal to the email.
56+
- `username` - (Required) The username of the IAM user.
6157

6258
- `password` - The password for first access.
6359

@@ -73,8 +69,6 @@ resource "scaleway_iam_user" "user" {
7369

7470
- `locale` - The user's locale (e.g., en_US).
7571

76-
Important: When creating a Guest user, all arguments are ignored, except for `organization_id`, `email` and `tags`.
77-
7872
## Attributes Reference
7973

8074
In addition to all arguments above, the following attributes are exported:

docs/resources/object.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ The following arguments are supported:
4949

5050
* `metadata` - (Optional) Map of metadata used for the object (keys must be lowercase).
5151

52+
* `content_type` - (Optional) The standard MIME type of the object's content (e.g., 'application/json', 'text/plain'). This specifies how the object should be interpreted by clients. See RFC 9110: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
53+
5254
* `tags` - (Optional) Map of tags.
5355

5456
* `sse_customer_key` - (Optional) Customer's encryption keys to encrypt data (SSE-C)

docs/resources/object_bucket_website_configuration.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,27 @@ Refer to the [dedicated documentation](https://www.scaleway.com/en/docs/object-s
1212
## Example Usage
1313

1414
```terraform
15-
resource "scaleway_object_bucket" "main" {
16-
name = "MyBucket"
15+
resource "scaleway_object_bucket" "test" {
16+
name = "my-bucket"
1717
acl = "public-read"
1818
}
1919
20-
resource "scaleway_object_bucket_website_configuration" "main" {
21-
bucket = scaleway_object_bucket.main.id
20+
resource scaleway_object "some_file" {
21+
bucket = scaleway_object_bucket.test.name
22+
key = "index.html"
23+
file = "index.html"
24+
visibility = "public-read"
25+
content_type = "text/html"
26+
}
27+
28+
resource "scaleway_object_bucket_website_configuration" "test" {
29+
bucket = scaleway_object_bucket.test.name
2230
index_document {
2331
suffix = "index.html"
2432
}
33+
error_document {
34+
key = "error.html"
35+
}
2536
}
2637
```
2738

internal/services/block/helpers_block.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func customDiffCannotShrink(key string) schema.CustomizeDiffFunc {
5252
oldValue := oldValueI.(int)
5353
newValue := newValueI.(int)
5454

55-
return oldValue < newValue
55+
return oldValue > newValue
5656
})
5757
}
5858

0 commit comments

Comments
 (0)