Skip to content

Commit e287ece

Browse files
Laure-diCodelax
andcommitted
Apply suggestions from code review
Co-authored-by: Jules Castéran <[email protected]>
1 parent af9fa98 commit e287ece

File tree

5 files changed

+373
-557
lines changed

5 files changed

+373
-557
lines changed

docs/resources/container_cron.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ resource scaleway_container main {
3131
3232
resource scaleway_container_cron main {
3333
container_id = scaleway_container.main.id
34-
name = "my-container-name"
34+
name = "my-cron-name"
3535
schedule = "5 4 1 * *" #cron at 04:05 on day-of-month 1
3636
args = jsonencode(
3737
{
@@ -55,17 +55,15 @@ resource scaleway_container_cron main {
5555

5656
## Argument Reference
5757

58-
The following arguments are required:
58+
The following arguments are supported:
5959

6060
- `schedule` - (Required) Cron format string, e.g. @hourly, as schedule time of its jobs to be created and
6161
executed.
6262
- `container_id` - (Required) The container ID to link with your cron.
6363
- `args` - (Required) The key-value mapping to define arguments that will be passed to your container’s event object
6464
during
65-
66-
The following arguments are supported:
67-
68-
- `name` - (Optional) The name of the container
65+
- `name` - (Optional) The name of the container cron. If not provided, the name is generated.
66+
during
6967

7068
## Attributes Reference
7169

scaleway/resource_container_cron_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestAccScalewayContainerCron_Basic(t *testing.T) {
2929
}
3030
3131
resource scaleway_container_cron main {
32-
name = "hello"
32+
name = "tf-tests-container-cron-basic"
3333
container_id = scaleway_container.main.id
3434
schedule = "5 4 * * *" #cron at 04:05
3535
args = jsonencode({test = "scw"})
@@ -39,7 +39,7 @@ func TestAccScalewayContainerCron_Basic(t *testing.T) {
3939
testAccCheckScalewayContainerCronExists(tt, "scaleway_container_cron.main"),
4040
resource.TestCheckResourceAttr("scaleway_container_cron.main", "schedule", "5 4 * * *"),
4141
resource.TestCheckResourceAttr("scaleway_container_cron.main", "args", "{\"test\":\"scw\"}"),
42-
resource.TestCheckResourceAttr("scaleway_container_cron.main", "name", "hello"),
42+
resource.TestCheckResourceAttr("scaleway_container_cron.main", "name", "tf-tests-container-cron-basic"),
4343
),
4444
},
4545
{
@@ -53,7 +53,7 @@ func TestAccScalewayContainerCron_Basic(t *testing.T) {
5353
}
5454
5555
resource scaleway_container_cron main {
56-
name = "salut"
56+
name = "tf-tests-container-cron-basic-changed"
5757
container_id = scaleway_container.main.id
5858
schedule = "5 4 * * *" #cron at 04:05
5959
args = jsonencode({test = "scw"})
@@ -63,7 +63,7 @@ func TestAccScalewayContainerCron_Basic(t *testing.T) {
6363
testAccCheckScalewayContainerCronExists(tt, "scaleway_container_cron.main"),
6464
resource.TestCheckResourceAttr("scaleway_container_cron.main", "schedule", "5 4 * * *"),
6565
resource.TestCheckResourceAttr("scaleway_container_cron.main", "args", "{\"test\":\"scw\"}"),
66-
resource.TestCheckResourceAttr("scaleway_container_cron.main", "name", "salut"),
66+
resource.TestCheckResourceAttr("scaleway_container_cron.main", "name", "tf-tests-container-cron-basic-changed"),
6767
),
6868
},
6969
},

0 commit comments

Comments
 (0)