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

KubeOne: Digital Ocean Projects not documented #1116

Open
almereyda opened this issue Jul 27, 2022 · 4 comments
Open

KubeOne: Digital Ocean Projects not documented #1116

almereyda opened this issue Jul 27, 2022 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@almereyda
Copy link
Contributor

Digital Ocean now have so-called projects which resources can be assigned to.

This allows creation of resources under different name spaces.

Its usage is currently not documented for KubeOne.

@almereyda
Copy link
Contributor Author

almereyda commented Jul 27, 2022

This is how this looks in main.tf:

resource "digitalocean_project" "kube_cluster" {
  name        = "${var.project_name}"
  description = "${var.project_description}"
  purpose     = "${var.project_purpose}"
  environment = "${var.project_environment}"
  resources   = concat(
    flatten(
      digitalocean_droplet.control_plane.*.urn
    ),
    [
      digitalocean_loadbalancer.control_plane.urn,
      digitalocean_tag.kube_cluster_tag.id,
      digitalocean_ssh_key.deployer.id
    ]
  )
}

and in variables.tf:

variable "project_name" {
  description = "Name of the project"
  type        = string
}

variable "project_description" {
  description = "Description of the project"
  type        = string
}

variable "project_purpose" {
  description = "Purpose of the project"
  type        = string
}

variable "project_environment" {
  description = "Environment of the project"
  type        = string
}

Updates need to be applied to

as well.

@almereyda almereyda changed the title KubeOne: Digital Ocean Project configuration for Terraform not documented. KubeOne: Digital Ocean Projects not documented Jul 27, 2022
@ahmedwaleedmalik ahmedwaleedmalik added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 3, 2022
@ahmedwaleedmalik
Copy link
Member

@almereyda it's not documented because we don't support it?! :D

@almereyda
Copy link
Contributor Author

Yes (:

I was just leaving a note here for documenting my own attempts at using them, in case someone would want to do something similar.

That is, sometimes it had become useful to remove and import the Terraform state of the project, in order for it not being removed during multiple cycles of setting up the KubeOne cluster.

terraform state rm digitalocean_project.kube_cluster
terraform destroy
terraform import digitalocean_project.kube_cluster b36238c2-f9d0-4971-b2ae-fead4b4af00b
terraform plan
terraform apply

The only true workaround for this, from the perspective of a DO Cloud user, is to set the desired project as default project in your account.

@madalinignisca
Copy link

Digital Ocean's Projects are just a label. It's not like Hetzner's projects, which is true isolation between projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants