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 for specifying organization using secretKeyRef or configMapKeyRef #174

Open
ejhayes opened this issue May 12, 2023 · 0 comments
Labels
acknowledged enhancement New feature or request

Comments

@ejhayes
Copy link

ejhayes commented May 12, 2023

Description

This is a great update to the v1 version, thank you!

I was wondering if it'd be possible to be able to specify organization via either a secretKeyRef or configMapRef (in addition to string) in the Workspace / Module CRs. Since this already supports multiple organizations it seems fitting that people may want to pull in the organization name rather than hardcoding it.

Potential YAML Configuration

# modules
apiVersion: app.terraform.io/v1alpha2
kind: Module
metadata:
  name: this
spec:
  organization:
    configMapRef:
      name: tfc-config
      organization: organization
  token:
    secretKeyRef:
      name: tfc-operator
      key: token
  destroyOnDeletion: true
  module:
    source: app.terraform.io/kubernetes-operator/module-random/provider
    version: 0.0.5
  variables:
  - name: counter
  outputs:
  - name: secret
    sensitive: true
  - name: random_strings
  workspace:
    name: kubernetes-operator-demo


# workspaces
apiVersion: app.terraform.io/v1alpha2
kind: Workspace
metadata:
  name: this
spec:
  organization:
    configMapRef:
      name: tfc-config
      organization: organization
  token:
    secretKeyRef:
      name: tfc-operator
      key: token
  name: workspace-demo
  description: Kubernetes Operator Automated Workspace
  applyMethod: auto
  terraformVersion: 1.3.2
  executionMode: remote
  terraformVariables:
    - name: counter
      hcl: true
      value: >
        [
        1,
        2,
        4,
        8,
        16,
        32
        ]
  tags:
    - demo

References

https://github.com/hashicorp/terraform-cloud-operator/blob/main/api/v1alpha2/workspace_types.go#L342
https://github.com/hashicorp/terraform-cloud-operator/blob/main/api/v1alpha2/module_types.go#L86

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.
@ejhayes ejhayes changed the title 🚀 Support for specifying organization using secretkeyref or configmapkeyref 🚀 Support for specifying organization using secretKeyRef or configMapKeyRef May 12, 2023
@iBrandyJackson iBrandyJackson added enhancement New feature or request acknowledged labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants