Skip to content

Add option to skip snapshot creation #133

@amoralesc

Description

@amoralesc

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions