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

Add option to skip snapshot creation #133

Open
amoralesc opened this issue Mar 11, 2024 · 0 comments
Open

Add option to skip snapshot creation #133

amoralesc opened this issue Mar 11, 2024 · 0 comments

Comments

@amoralesc
Copy link

Description

The DigitalOcean builder could have an option to skip the snapshot creation.

Other builders like the AWS and GCP one already implement this, with the skip_create_ami and skip_create_image configuration options respectively.

Use Case(s)

This behavior would be useful in CI/CD environments, where we could test that an image configuration is valid in a pipeline, without actually creating the resource on DigitalOcean. Current alternatives require calling the DigitalOcean API to delete the snapshot after the long-running create snapshot and transfer snapshot steps are done.

Potential configuration

source "digitalocean" "example" {
  api_token            = "YOUR API KEY"
  image                = "ubuntu-22-04-x64"
  region               = "nyc3"
  size                 = "s-1vcpu-1gb"
  ssh_username         = "root"
  # new option
  skip_create_snapshot = true
}

Potential References

AWS and GCP builders do it on the step_create_*.go files, which seem equivalent to the step_snapshot.go in this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant