Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .web-docs/components/builder/digitalocean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ each category, the available configuration keys are alphabetized.
- `ssh_key_id` (int) - The ID of an existing SSH key on the DigitalOcean account. This should be
used in conjunction with `ssh_private_key_file`.

- `project_id` (string) - The Project ID to launch the droplet in.

<!-- End of code generated from the comments of the Config struct in builder/digitalocean/config.go; -->


Expand Down
2 changes: 2 additions & 0 deletions builder/digitalocean/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ type Config struct {
// The ID of an existing SSH key on the DigitalOcean account. This should be
// used in conjunction with `ssh_private_key_file`.
SSHKeyID int `mapstructure:"ssh_key_id" required:"false"`
// The Project ID to launch the droplet in.
ProjectID string `mapstructure:"project_id" required:"false"`

ctx interpolate.Context
}
Expand Down
2 changes: 2 additions & 0 deletions builder/digitalocean/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions builder/digitalocean/step_create_droplet.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (s *stepCreateDroplet) Run(ctx context.Context, state multistep.StateBag) m
state.Put("droplet_size", c.Size)
state.Put("droplet_name", c.DropletName)
state.Put("build_region", c.Region)
state.Put("project_id", c.ProjectID)

// Create the droplet based on configuration
ui.Say("Creating droplet...")
Expand Down Expand Up @@ -100,6 +101,7 @@ func (s *stepCreateDroplet) buildDropletCreateRequest(state multistep.StateBag)
UserData: userData,
Tags: c.Tags,
VPCUUID: c.VPCUUID,
ProjectID: c.ProjectID,
}, nil
}

Expand Down
2 changes: 2 additions & 0 deletions docs-partials/builder/digitalocean/Config-not-required.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,6 @@
- `ssh_key_id` (int) - The ID of an existing SSH key on the DigitalOcean account. This should be
used in conjunction with `ssh_private_key_file`.

- `project_id` (string) - The Project ID to launch the droplet in.

<!-- End of code generated from the comments of the Config struct in builder/digitalocean/config.go; -->