hashicorp / terraform-k8s

Terraform Cloud Operator for Kubernetes
https://learn.hashicorp.com/tutorials/terraform/kubernetes-operator?in=terraform/kubernetes
Mozilla Public License 2.0
454 stars 71 forks source link

Terraform Cloud Operator doesn't support azure devops vcs provider #104

Open dmakeroam opened 3 years ago

dmakeroam commented 3 years ago

terraform-k8s & Kubernetes Version

terraform-k8s: 1.0.0 kubernetes-version: 18.9.9

Affected Resource(s)

Terraform Cloud Workspace Resource:

apiVersion: app.terraform.io/v1alpha1 kind: Workspace

Terraform Cloud Workspace Configuration File

apiVersion: app.terraform.io/v1alpha1
kind: Workspace
metadata:
  name: kubeopsskills-dev-dns
  namespace: "terraform-cloud"
spec:
  organization: "kubeopsskills"
  secretsMountPath: "/tmp/secrets"
  module:
    source: "git@ssh.dev.azure.com:v3/kubeopsskills/IAC/huaweicloud-dns-record-set-module"
  vcs:
   token_id: "ot-wU7dcYP2JioAeMxc"
   repo_identifier: "kubeopsskills/huaweicloud-dns-record-set-module"
   ingress_submodules: false
  variables:
    - key: region
      value: "ap-southeast-2"
      sensitive: false
      environmentVariable: false
    - key: zone_id
      value: "8aace3ba76c2ccea018a193ad9325639"
      sensitive: false
      environmentVariable: false
    - key: name
      value: "test.kubeops.guru."
      sensitive: false
      environmentVariable: false
    - key: type
      value: "A"
      sensitive: false
      environmentVariable: false
    - key: records
      value: '["10.0.0.1"]'
      hcl: true
      sensitive: false
      environmentVariable: false
    - key: ttl
      value: "300"
      sensitive: false
      environmentVariable: false
    - key: description
      value: "KubeOps Dev Domain"
      sensitive: false
      environmentVariable: false
    - key: HW_REGION_NAME
      sensitive: true
      environmentVariable: true
    - key: HW_ACCESS_KEY
      sensitive: true
      environmentVariable: true
    - key: HW_SECRET_KEY
      sensitive: true
      environmentVariable: true

Debug Output

Expected Behavior

Terraform Cloud Operator read the Terraform Cloud Workspace resource and is able to pull the Terraform module from Azure DevOps

Actual Behavior

Terraform Cloud Operator read the Terraform Cloud Workspace resource and is not able to pull the Terraform module from Azure DevOps, then got "Internal Error"

Steps to Reproduce

  1. Apply the Terraform Cloud Workspace resource as above
  2. Go to Terraform Cloud console, we won't get any workspaces
  3. If we see logs from Terraform Cloud Operator, we'll get "Internal Error".

Important Factoids

*** We use helm to install Terraform Cloud Operator by following steps as this link

References

Azure DevOps VCS Provider

dmakeroam commented 3 years ago

Any updates on this? @joatmon08

dmakeroam commented 3 years ago

@koikonom

koikonom commented 3 years ago

Hi @dmakeroam! Although I'm no longer actively involved with this project I'd suggest you either use the module configuration or the vcs one, not both. Try it with each and let us know if that works for you.

dmakeroam commented 3 years ago

Hi @dmakeroam! Although I'm no longer actively involved with this project I'd suggest you either use the module configuration or the vcs one, not both. Try it with each and let us know if that works for you.

If I use the module from github even declaration both vcs and module, terraform cloud operator will support. It has a problem only Azure DevOps

dmakeroam commented 3 years ago

@koikonom