Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security group blocking destruction process #2821

Open
midnightpacket opened this issue Nov 28, 2024 · 0 comments
Open

Security group blocking destruction process #2821

midnightpacket opened this issue Nov 28, 2024 · 0 comments
Assignees
Labels
bug instance Instance issues, bugs and feature requests

Comments

@midnightpacket
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v1.9.8

Affected Resource(s)

  • scaleway_account_project
  • scaleway_instance_security_group
  • scaleway_instance_server

Terraform Configuration Files

# Copy-paste the minimal (if possible) terraform configuration to reproduce the bug here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp
provider "scaleway" {
  alias = "tmp"
}

resource scaleway_account_project "project" {
  provider = scaleway.tmp
  name = "my_project"
}

provider "scaleway" {
  project_id = scaleway_account_project.project.id
}

resource "scaleway_instance_server" "server" { // Will use scaleway_account_project.project
  image = "ubuntu_jammy"
  type  = "PRO2-XXS"
}

Debug Output

https://gist.github.com/midnightpacket/c05136d107b5b74052c40b6324f60b2f

Panic Output

Expected Behavior

When the apply command was executed, the "Default Security Group" resource was automatically created as part of the instance creation process. Therefore, the destroy command should have also deleted the "Default Security Group" resource.

Actual Behavior

The instance was successfully destroyed, but the "Default Security Group" was not. This omission ultimately prevented the complete destruction of the project.

I used this doc as a reference https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/account_project#use-a-project-in-provider-configuration

Steps to Reproduce

  1. terraform apply
  2. terraform destroy

Important Factoids

References

  • #0000
@yfodil yfodil added bug instance Instance issues, bugs and feature requests labels Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug instance Instance issues, bugs and feature requests
Projects
None yet
Development

No branches or pull requests

3 participants