cloud-native-toolkit / terraform-tools-gitops

Module to create a GitOps repository
6 stars 6 forks source link

Second use of gitops module gives error initializing #52

Closed seansund closed 2 years ago

seansund commented 2 years ago
│ Error: local-exec provisioner error
│ 
│   with module.gitops_repo.null_resource.initialize_gitops[0],
│   on .terraform/modules/gitops_repo/main.tf line 83, in resource "null_resource" "initialize_gitops":
│   83:   provisioner "local-exec" {
│ 
│ Error running command '.terraform/modules/gitops_repo/scripts/initialize-gitops.sh 'github.com/seansund/quickstart-sms10-gitops' 'openshift-gitops' 'default'': exit status 1. Output: Cloning into '.tmpgitops'...
│ On branch main
│ Your branch is up to date with 'origin/main'.
│ 
│ nothing to commit, working tree clean

The repo should not be initialized again if it already exists and the initialize variable is not explicitly set to true