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

Support project envrionments for Enterprise instances #135

Open
carlosjgp opened this issue Apr 18, 2024 · 2 comments
Open

Support project envrionments for Enterprise instances #135

carlosjgp opened this issue Apr 18, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@carlosjgp
Copy link

Describe the feature request

Each deployment of the application represents a new environment for us

Background

On Enterprise instances of Unleash you can create and name as many environments as you want

We would like to leverage this capacity to create a new environment for each of our customers who have dedicated environments and each might adopt feature or release at different cadences

Solution suggestions

data "unleash_project" "my_project" {
  id = "default"
}

resource "unleash_project_envrionment" "client_env" {
  project_id = data.unleash_project.my_project
  name       = "client 1"
  type       = "production"
}

I haven't use Enterprise for too long so I might be missing some properties very basic here

@carlosjgp carlosjgp added the enhancement New feature or request label Apr 18, 2024
@andreas-unleash
Copy link
Contributor

Hi @carlosjgp , thanks for your input. I will bring this to the team and get back to you.

@andreas-unleash andreas-unleash added the help wanted Extra attention is needed label Apr 23, 2024
@gastonfournier
Copy link
Collaborator

Hi @carlosjgp we added this to our backlog, it's not something that's on our top priority list. We're open for contributions though. I think I should write some contribution guidelines with more information on how to contribute, but overall:

  1. We expose the APIs we want to use in https://github.com/Unleash/unleash-server-api-go. It's an auto-generated client for a subset of all our APIs which is defined here: https://github.com/Unleash/unleash-server-api-go/blob/main/operations.yaml
  2. We code the Terraform resource. This is not easy, but can be done by using some of the existing ones.

One thing we try to do is to have 1 API call per resource so we don't have to deal with invalid state if an API call fails. Usually this means we have to create additional resources (e.g. one for the environment and another one for the project-environment link). We said we're going to create APIs in Unleash in case we want to have a specific Terraform resource that does both the creation and the linking (this would be step zero).

We haven't have the need for it yet and I'm not fully convinced is that simple (i.e. the environment should have a list of projects cause it had to be defined only once, or will the project have a list of environments? If the latter then the creation of the environment has to be conditional (or an upsert).

Anyway, this is open for contributions and we'll keep it in our backlog for now.

@sighphyre sighphyre moved this from New to For later in Issues and PRs May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: For later
Development

No branches or pull requests

3 participants