Skip to content

Commit 820566d

Browse files
authored
fix(container_namespace): deprecated destroy_registry option (#1860)
1 parent 761bb0c commit 820566d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

docs/resources/container_namespace.md

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

3939
- `secret_environment_variables` - The secret environment variables of the namespace.
4040

41-
- `destroy_registry` - (Defaults to false). Destroy linked container registry on deletion.
42-
4341
## Attributes Reference
4442

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

scaleway/resource_container_namespace.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func resourceScalewayContainerNamespace() *schema.Resource {
7777
Optional: true,
7878
Default: false,
7979
Description: "Destroy registry on deletion",
80+
Deprecated: "Registry namespace is automatically destroyed with namespace",
8081
},
8182
"region": regionSchema(),
8283
"organization_id": organizationIDSchema(),
@@ -217,7 +218,7 @@ func resourceScalewayContainerNamespaceDelete(ctx context.Context, d *schema.Res
217218
Region: region,
218219
NamespaceID: registryID,
219220
})
220-
if err != nil {
221+
if err != nil && !is404Error(err) {
221222
return diag.FromErr(err)
222223
}
223224
_, err = waitForRegistryNamespace(ctx, registryAPI, region, registryID, d.Timeout(schema.TimeoutDelete))

0 commit comments

Comments
 (0)