Skip to content

Conversation

yfodil
Copy link
Contributor

@yfodil yfodil commented Jun 5, 2025

Import can be done by identity now:

import {
  to       = scaleway_vpc.main
  identity = {
    id     = "11111111-1111-1111-1111-111111111111"
    region = "fr-par"
  }
}


resource "scaleway_vpc" "main" {}

@yfodil yfodil self-assigned this Jun 5, 2025
@yfodil yfodil added enhancement vpc Virtual Private Cloud (VPC) issues, bugs and feature requests labels Jun 5, 2025
@yfodil yfodil marked this pull request as ready for review September 9, 2025 07:59
@yfodil yfodil requested review from a team and remyleone as code owners September 9, 2025 07:59
identity, err := d.Identity()
if err != nil {
tflog.Warn(ctx, fmt.Sprintf("failed to read identity from ResourceData: %v", err))
} else if identity != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you flatten more and resolve early in case :

  • identity is nil,
  • identity does not contain id and resolve with a specific diagnostic
  • identity does not contain region and resolve with a specific diagnostic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
baremetal enhancement vpc Virtual Private Cloud (VPC) issues, bugs and feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants