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

🚀 Add project support #300

Merged
merged 10 commits into from
Nov 24, 2023
Merged

🚀 Add project support #300

merged 10 commits into from
Nov 24, 2023

Conversation

arybolovlev
Copy link
Contributor

@arybolovlev arybolovlev commented Nov 13, 2023

Description

This PR extends the Workspace controller by adding support for Terraform Cloud Projects. A new field spec.project.[id | name] allows assigning a workspace to a project.

Can I create a workspace or move the one that already exists to a specific project?

Yes, you can do this. Bear in mind that a project must exist before referring to it; otherwise, the create or update operation will fail:

  • If this is a new workspace and the referred project doesn’t exist, the workspace creation will fail with a corresponding error/event message.

  • If this involves migrating an existing workspace and the referred project doesn’t exist, the workspace will remain within the same project, and a corresponding error/event message will be provided.

If the spec.project field is not specified, the workspace will be created or moved to the default project.

Tests:

Usage Example

---
apiVersion: app.terraform.io/v1alpha2
kind: Workspace
metadata:
  name: this
spec:
  organization: kubernetes-operator
  token:
    secretKeyRef:
      name: tfc-operator
      key: token
  name: kubernetes-operator-demo
  project:
    name: kubernetes-operator
    # Alternatively, you can use the Project ID:
    #
    # id: prj-e89jyCXbxi1sU2AR

Release Note

Workspace: add support for Terraform Cloud Projects.

References

Fix: #57 need to re-open the issue once this PR gets merged since it implements requests partially

Community Note

  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

@arybolovlev arybolovlev marked this pull request as ready for review November 20, 2023 08:38
@arybolovlev arybolovlev requested a review from a team as a code owner November 20, 2023 08:38
@arybolovlev arybolovlev merged commit 4f73ba2 into main Nov 24, 2023
7 checks passed
@arybolovlev arybolovlev deleted the add-project-support branch November 24, 2023 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀Support for Terraform Cloud Projects
2 participants