Assign droplet to a project

This commit is contained in:
Jason Rothstein 2020-07-25 16:18:08 -05:00
parent a680939b87
commit 12d3d7db6b
3 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,3 @@
data "digitalocean_project" "this" {
name = var.project
}

View File

@ -0,0 +1,6 @@
resource "digitalocean_project_resources" "this" {
project = data.digitalocean_project.this.id
resources = [
digitalocean_droplet.this.urn
]
}

4
variable.project.tf Normal file
View File

@ -0,0 +1,4 @@
variable "project" {
default = "default"
type = string
}