Skip to content

Commit d5ace61

Browse files
authored
feat: add support for project_id filtering in data sources (#2340)
* feat: add support for project_id filtering * fix * lint
1 parent 8027203 commit d5ace61

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+96
-58
lines changed

docs/data-sources/baremetal_server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ data "scaleway_baremetal_server" "by_id" {
2727

2828
- `name` - (Optional) The server name. Only one of `name` and `server_id` should be specified.
2929
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the server exists.
30+
- `project_id` - (Optional) The ID of the project the baremetal server is associated with.
3031

3132
## Attributes Reference
3233

docs/data-sources/container.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ The following arguments are required:
4444

4545
- `namespace_id` - (Required) The container namespace ID of the container.
4646

47+
- `project_id` - (Optional) The ID of the project the container is associated with.
48+
4749
~> **Important** Updates to `name` will recreate the container.
4850

4951
## Attributes Reference

docs/data-sources/documentdb_instance.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ data "scaleway_documentdb_instance" "db" {
3333

3434
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the DocumentDB instance is in.
3535

36+
- `project_id` - (Optional) The ID of the project the DocumentDB instance is associated with.
37+
38+
3639
## Attributes Reference
3740

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

docs/data-sources/instance_security_group.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ data "scaleway_instance_security_group" "my_key" {
2929

3030
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the security group exists.
3131

32+
- `project_id` - (Optional) The ID of the project the security group is associated with.
33+
3234
## Attributes Reference
3335

3436
In addition to all above arguments, the following attributes are exported:
@@ -39,8 +41,6 @@ In addition to all above arguments, the following attributes are exported:
3941

4042
- `organization_id` - The ID of the organization the security group is associated with.
4143

42-
- `project_id` - The ID of the project the security group is associated with.
43-
4444
- `inbound_default_policy` - The default policy on incoming traffic. Possible values are: `accept` or `drop`.
4545

4646
- `outbound_default_policy` - The default policy on outgoing traffic. Possible values are: `accept` or `drop`.

docs/data-sources/instance_server.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ data "scaleway_instance_server" "my_key" {
2929

3030
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the server exists.
3131

32+
- `project_id` - (Optional) The ID of the project the instance server is associated with.
33+
3234
## Attributes Reference
3335

3436
In addition to all above arguments, the following attributes are exported:
@@ -44,8 +46,6 @@ You find all the available types on the [pricing page](https://www.scaleway.com/
4446

4547
- `organization_id` - The ID of the organization the server is associated with.
4648

47-
- `project_id` - The ID of the project the server is associated with.
48-
4949
- `tags` - The tags associated with the server.
5050

5151
- `security_group_id` - The [security group](https://developers.scaleway.com/en/products/instance/api/#security-groups-8d7f89) the server is attached to.

docs/data-sources/instance_volume.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ data "scaleway_instance_volume" "my_volume" {
3131

3232
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the volume exists.
3333

34-
35-
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the volume is associated with.
34+
- `project_id` - (Optional) The ID of the project the volume is associated with.
3635

3736
## Attributes Reference
3837

docs/data-sources/iot_hub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ data "scaleway_iot_hub" "my_hub" {
3232

3333
- `region` - (Default to [provider](../index.md) `region`) The [region](../guides/regions_and_zones.md#zones) in which the hub exists.
3434

35-
- `project_id` - (Default to [provider](../index.md) `project_id`)
35+
- `project_id` - (Optional) The ID of the project the hub is associated with.
3636

3737
## Attributes Reference
3838

docs/data-sources/k8s_cluster.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ data "scaleway_k8s_cluster" "my_key" {
2929

3030
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) in which the cluster exists.
3131

32+
- `project_id` - (Optional) The ID of the project the cluster is associated with.
33+
3234
## Attributes Reference
3335

3436
In addition to all above arguments, the following attributes are exported:
@@ -104,6 +106,3 @@ In addition to all above arguments, the following attributes are exported:
104106
- `region` - The [region](../guides/regions_and_zones.md#regions) in which the cluster is.
105107

106108
- `organization_id` - The ID of the organization the cluster is associated with.
107-
108-
- `project_id` - The ID of the project the cluster is associated with.
109-

docs/data-sources/lb.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ data "scaleway_lb" "by_id" {
2727

2828
- `ip_id` - (Optional) The load balancer IP ID.
2929

30+
- `project_id` - (Optional) The ID of the project the LB is associated with.
31+
3032
## Attributes Reference
3133

3234
In addition to all arguments above, the following attributes are exported:
@@ -41,6 +43,4 @@ In addition to all arguments above, the following attributes are exported:
4143

4244
- `tags` - The tags associated with the load-balancer.
4345

44-
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the LB is associated with.
45-
4646
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the LB exists.

docs/data-sources/lb_ip.md

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

3434
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the IP should be reserved.
3535

36+
- `project_id` - (Optional) The ID of the project the LB IP associated with.
37+
3638
## Attributes Reference
3739

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

docs/data-sources/rdb_database_backup.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ data scaleway_rdb_database_backup find_by_id {
3434
- `name` - (Optional) The name of the RDB instance.
3535
Only one of the `name` and `backup_id` should be specified.
3636

37-
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) in which the Database Instance should be created.
37+
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) in which the Database Backup is associated with.
38+
39+
- `project_id` - (Optional) The ID of the project the Database Backup is associated with.
3840

3941
## Attributes Reference
4042

docs/data-sources/redis_cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ data "scaleway_redis_cluster" "my_cluster" {
3131

3232
- `zone` - (Default to [provider](../index.md) `region`) The [zone](../guides/regions_and_zones.md#zones) in which the server exists.
3333

34-
- `project_id` - (Default to [provider](../index.md) `project_id`)
34+
- `project_id` - (Optional) The ID of the project the Redis cluster is associated with.
3535

3636
## Attributes Reference
3737

docs/data-sources/secret_version.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ The following arguments are supported:
6262
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions)
6363
in which the resource exists.
6464

65+
- `project_id` - (Optional) The ID of the project the Secret version is associated with.
66+
6567
## Data
6668

6769
Note: This Data Source give you **access** to the secret payload encoded en base64.

docs/data-sources/vpc_private_network.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ data "scaleway_vpc_private_network" "my_id" {
2323

2424
## Argument Reference
2525

26-
* `name` - (Optional) Name of the private network. One of `name` and `private_network_id` should be specified.
27-
* `private_network_id` - (Optional) ID of the private network. One of `name` and `private_network_id` should be specified.
26+
- `name` - (Optional) Name of the private network. One of `name` and `private_network_id` should be specified.
27+
- `private_network_id` - (Optional) ID of the private network. One of `name` and `private_network_id` should be specified.
28+
- `project_id` - (Optional) The ID of the project the private network is associated with.
2829

2930
## Attributes Reference
3031

docs/data-sources/vpc_public_gateway.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ data "scaleway_vpc_public_gateway" "pg_test_by_id" {
3131
- `name` - (Required) Exact name of the public gateway.
3232
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which
3333
the public gateway should be created.
34+
- `project_id` - (Optional) The ID of the project the public gateway is associated with.
3435

3536
## Attributes Reference
3637

scaleway/data_source_baremetal_server.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func dataSourceScalewayBaremetalServer() *schema.Resource {
1414
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayBaremetalServer().Schema)
1515

1616
// Set 'Optional' schema elements
17-
addOptionalFieldsToSchema(dsSchema, "name", "zone")
17+
addOptionalFieldsToSchema(dsSchema, "name", "zone", "project_id")
1818

1919
dsSchema["name"].ConflictsWith = []string{"server_id"}
2020
dsSchema["server_id"] = &schema.Schema{
@@ -41,8 +41,9 @@ func dataSourceScalewayBaremetalServerRead(ctx context.Context, d *schema.Resour
4141
if !ok { // Get server by zone and name.
4242
serverName := d.Get("name").(string)
4343
res, err := api.ListServers(&baremetal.ListServersRequest{
44-
Zone: zone,
45-
Name: scw.StringPtr(serverName),
44+
Zone: zone,
45+
Name: scw.StringPtr(serverName),
46+
ProjectID: expandStringPtr(d.Get("project_id")),
4647
}, scw.WithContext(ctx))
4748
if err != nil {
4849
return diag.FromErr(err)

scaleway/data_source_block_snapshot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func dataSourceScalewayBlockSnapshot() *schema.Resource {
1212
// Generate datasource schema from resource
1313
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayBlockSnapshot().Schema)
1414

15-
addOptionalFieldsToSchema(dsSchema, "name", "zone", "volume_id")
15+
addOptionalFieldsToSchema(dsSchema, "name", "zone", "volume_id", "project_id")
1616

1717
dsSchema["snapshot_id"] = &schema.Schema{
1818
Type: schema.TypeString,

scaleway/data_source_block_volume.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func dataSourceScalewayBlockVolume() *schema.Resource {
1212
// Generate datasource schema from resource
1313
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayBlockVolume().Schema)
1414

15-
addOptionalFieldsToSchema(dsSchema, "name", "zone")
15+
addOptionalFieldsToSchema(dsSchema, "name", "zone", "project_id")
1616

1717
dsSchema["volume_id"] = &schema.Schema{
1818
Type: schema.TypeString,

scaleway/data_source_container.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ func dataSourceScalewayContainer() *schema.Resource {
2929
Description: "The ID of the Container namespace",
3030
ValidateFunc: validationUUIDorUUIDWithLocality(),
3131
}
32+
dsSchema["project_id"] = &schema.Schema{
33+
Type: schema.TypeString,
34+
Optional: true,
35+
Description: "The ID of the project to filter the Container",
36+
ValidateFunc: validationUUID(),
37+
}
3238

3339
return &schema.Resource{
3440
ReadContext: dataSourceScalewayContainerRead,
@@ -50,6 +56,7 @@ func dataSourceScalewayContainerRead(ctx context.Context, d *schema.ResourceData
5056
Region: region,
5157
Name: expandStringPtr(containerName),
5258
NamespaceID: expandID(namespaceID),
59+
ProjectID: expandStringPtr(d.Get("project_id")),
5360
}, scw.WithContext(ctx))
5461
if err != nil {
5562
return diag.FromErr(err)

scaleway/data_source_container_namespace.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func dataSourceScalewayContainerNamespace() *schema.Resource {
1313
// Generate datasource schema from resource
1414
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayContainerNamespace().Schema)
1515

16-
addOptionalFieldsToSchema(dsSchema, "name", "region")
16+
addOptionalFieldsToSchema(dsSchema, "name", "region", "project_id")
1717

1818
dsSchema["name"].ConflictsWith = []string{"namespace_id"}
1919
dsSchema["namespace_id"] = &schema.Schema{
@@ -40,8 +40,9 @@ func dataSourceScalewayContainerNamespaceRead(ctx context.Context, d *schema.Res
4040
if !ok {
4141
namespaceName := d.Get("name").(string)
4242
res, err := api.ListNamespaces(&container.ListNamespacesRequest{
43-
Region: region,
44-
Name: expandStringPtr(namespaceName),
43+
Region: region,
44+
Name: expandStringPtr(namespaceName),
45+
ProjectID: expandStringPtr(d.Get("project_id")),
4546
}, scw.WithContext(ctx))
4647
if err != nil {
4748
return diag.FromErr(err)

scaleway/data_source_document_db_instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func dataSourceScalewayDocumentDBInstance() *schema.Resource {
1212
// Generate datasource schema from resource
1313
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayDocumentDBInstance().Schema)
1414

15-
addOptionalFieldsToSchema(dsSchema, "name", "region")
15+
addOptionalFieldsToSchema(dsSchema, "name", "region", "project_id")
1616

1717
dsSchema["instance_id"] = &schema.Schema{
1818
Type: schema.TypeString,

scaleway/data_source_domain_record.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func dataSourceScalewayDomainRecord() *schema.Resource {
1515
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayDomainRecord().Schema)
1616

1717
// Set 'Optional' schema elements
18-
addOptionalFieldsToSchema(dsSchema, "dns_zone", "name", "type", "data")
18+
addOptionalFieldsToSchema(dsSchema, "dns_zone", "name", "type", "data", "project_id")
1919

2020
dsSchema["name"].ConflictsWith = []string{"record_id"}
2121
dsSchema["type"].ConflictsWith = []string{"record_id"}

scaleway/data_source_function.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func dataSourceScalewayFunction() *schema.Resource {
1919
Computed: true,
2020
}
2121

22-
addOptionalFieldsToSchema(dsSchema, "name", "function_id")
22+
addOptionalFieldsToSchema(dsSchema, "name", "function_id", "project_id")
2323
fixDatasourceSchemaFlags(dsSchema, true, "namespace_id")
2424

2525
return &schema.Resource{
@@ -41,6 +41,7 @@ func dataSourceScalewayFunctionRead(ctx context.Context, d *schema.ResourceData,
4141
Region: region,
4242
NamespaceID: expandID(d.Get("namespace_id").(string)),
4343
Name: expandStringPtr(functionName),
44+
ProjectID: expandStringPtr(d.Get("project_id")),
4445
}, scw.WithContext(ctx))
4546
if err != nil {
4647
return diag.FromErr(err)

scaleway/data_source_function_namespace.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func dataSourceScalewayFunctionNamespace() *schema.Resource {
1313
// Generate datasource schema from resource
1414
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayFunctionNamespace().Schema)
1515

16-
addOptionalFieldsToSchema(dsSchema, "name", "region")
16+
addOptionalFieldsToSchema(dsSchema, "name", "region", "project_id")
1717

1818
dsSchema["name"].ConflictsWith = []string{"namespace_id"}
1919
dsSchema["namespace_id"] = &schema.Schema{
@@ -40,8 +40,9 @@ func dataSourceScalewayFunctionNamespaceRead(ctx context.Context, d *schema.Reso
4040
if !ok {
4141
namespaceName := d.Get("name").(string)
4242
res, err := api.ListNamespaces(&function.ListNamespacesRequest{
43-
Region: region,
44-
Name: expandStringPtr(namespaceName),
43+
Region: region,
44+
Name: expandStringPtr(namespaceName),
45+
ProjectID: expandStringPtr(d.Get("project_id")),
4546
}, scw.WithContext(ctx))
4647
if err != nil {
4748
return diag.FromErr(err)

scaleway/data_source_iam_ssh_key.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
func dataSourceScalewayIamSSHKey() *schema.Resource {
1313
// Generate datasource schema from resource
1414
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayIamSSKKey().Schema)
15-
addOptionalFieldsToSchema(dsSchema, "name")
15+
addOptionalFieldsToSchema(dsSchema, "name", "project_id")
1616

1717
dsSchema["name"].ConflictsWith = []string{"ssh_key_id"}
1818
dsSchema["ssh_key_id"] = &schema.Schema{

scaleway/data_source_instance_security_group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func dataSourceScalewayInstanceSecurityGroup() *schema.Resource {
1414
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayInstanceSecurityGroup().Schema)
1515

1616
// Set 'Optional' schema elements
17-
addOptionalFieldsToSchema(dsSchema, "name", "zone")
17+
addOptionalFieldsToSchema(dsSchema, "name", "zone", "project_id")
1818

1919
dsSchema["name"].ConflictsWith = []string{"security_group_id"}
2020
dsSchema["security_group_id"] = &schema.Schema{

scaleway/data_source_instance_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func dataSourceScalewayInstanceServer() *schema.Resource {
1414
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayInstanceServer().Schema)
1515

1616
// Set 'Optional' schema elements
17-
addOptionalFieldsToSchema(dsSchema, "name", "zone")
17+
addOptionalFieldsToSchema(dsSchema, "name", "zone", "project_id")
1818

1919
dsSchema["name"].ConflictsWith = []string{"server_id"}
2020
dsSchema["server_id"] = &schema.Schema{

scaleway/data_source_instance_snapshot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func dataSourceScalewayInstanceSnapshot() *schema.Resource {
1414
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayInstanceSnapshot().Schema)
1515

1616
// Set 'Optional' schema elements
17-
addOptionalFieldsToSchema(dsSchema, "name", "zone")
17+
addOptionalFieldsToSchema(dsSchema, "name", "zone", "project_id")
1818

1919
dsSchema["snapshot_id"] = &schema.Schema{
2020
Type: schema.TypeString,

scaleway/data_source_instance_volume.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func dataSourceScalewayInstanceVolume() *schema.Resource {
1414
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayInstanceVolume().Schema)
1515

1616
// Set 'Optional' schema elements
17-
addOptionalFieldsToSchema(dsSchema, "name", "zone")
17+
addOptionalFieldsToSchema(dsSchema, "name", "zone", "project_id")
1818

1919
dsSchema["volume_id"] = &schema.Schema{
2020
Type: schema.TypeString,

scaleway/data_source_iot_hub.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
func dataSourceScalewayIotHub() *schema.Resource {
1313
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayIotHub().Schema)
1414

15-
addOptionalFieldsToSchema(dsSchema, "name", "region")
15+
addOptionalFieldsToSchema(dsSchema, "name", "region", "project_id")
1616

1717
dsSchema["name"].ConflictsWith = []string{"hub_id"}
1818
dsSchema["hub_id"] = &schema.Schema{

scaleway/data_source_k8s_cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func dataSourceScalewayK8SCluster() *schema.Resource {
1414
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayK8SCluster().Schema)
1515

1616
// Set 'Optional' schema elements
17-
addOptionalFieldsToSchema(dsSchema, "name", "region")
17+
addOptionalFieldsToSchema(dsSchema, "name", "region", "project_id")
1818
delete(dsSchema, "delete_additional_resources")
1919

2020
dsSchema["name"].ConflictsWith = []string{"cluster_id"}

scaleway/data_source_lb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func dataSourceScalewayLb() *schema.Resource {
1414
dsSchema := datasourceSchemaFromResourceSchema(resourceScalewayLb().Schema)
1515

1616
// Set 'Optional' schema elements
17-
addOptionalFieldsToSchema(dsSchema, "name", "zone")
17+
addOptionalFieldsToSchema(dsSchema, "name", "zone", "project_id")
1818

1919
dsSchema["name"].ConflictsWith = []string{"lb_id"}
2020
dsSchema["lb_id"] = &schema.Schema{

scaleway/data_source_lb_ip.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func dataSourceScalewayLbIP() *schema.Resource {
2727
ConflictsWith: []string{"ip_address"},
2828
ValidateFunc: validationUUIDorUUIDWithLocality(),
2929
}
30+
dsSchema["project_id"].Optional = true
3031

3132
return &schema.Resource{
3233
ReadContext: dataSourceScalewayLbIPRead,

0 commit comments

Comments
 (0)