Skip to content

Commit 5cc92af

Browse files
remyleonedevtools-ci-cd
and
devtools-ci-cd
authored
fix(container): add support for putting region in the state after import (#2970)
Co-authored-by: devtools-ci-cd <[email protected]>
1 parent 7ab4915 commit 5cc92af

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

internal/services/container/cron.go

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ func ResourceContainerCronRead(ctx context.Context, d *schema.ResourceData, m in
133133
_ = d.Set("args", args)
134134
_ = d.Set("status", cron.Status)
135135
_ = d.Set("name", cron.Name)
136+
_ = d.Set("region", region)
136137

137138
return nil
138139
}

internal/services/container/cron_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func TestAccCron_Basic(t *testing.T) {
4343
resource.TestCheckResourceAttr("scaleway_container_cron.main", "schedule", "5 4 * * *"),
4444
resource.TestCheckResourceAttr("scaleway_container_cron.main", "args", "{\"test\":\"scw\"}"),
4545
resource.TestCheckResourceAttr("scaleway_container_cron.main", "name", "tf-tests-container-cron-basic"),
46+
resource.TestCheckResourceAttr("scaleway_container_cron.main", "region", "fr-par"),
4647
),
4748
},
4849
{
@@ -67,6 +68,7 @@ func TestAccCron_Basic(t *testing.T) {
6768
resource.TestCheckResourceAttr("scaleway_container_cron.main", "schedule", "5 4 * * *"),
6869
resource.TestCheckResourceAttr("scaleway_container_cron.main", "args", "{\"test\":\"scw\"}"),
6970
resource.TestCheckResourceAttr("scaleway_container_cron.main", "name", "tf-tests-container-cron-basic-changed"),
71+
resource.TestCheckResourceAttr("scaleway_container_cron.main", "region", "fr-par"),
7072
),
7173
},
7274
},

0 commit comments

Comments
 (0)