Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Error applying several bootstraps with terraform #4

Closed
allamand opened this issue Sep 12, 2023 · 4 comments
Closed

Error applying several bootstraps with terraform #4

allamand opened this issue Sep 12, 2023 · 4 comments

Comments

@allamand
Copy link

While working with the cluster, sometimes, Terraform is not able to apply the manifest due to fetch error:

│ Error: argocd/bootstrap-addons failed to fetch resource from kubernetes: the server could not find the requested resource
│ 
│   with module.eks_cluster.module.gitops_bridge_bootstrap.kubectl_manifest.bootstrap["addons"],
│   on .terraform/modules/eks_cluster.gitops_bridge_bootstrap/main.tf line 93, in resource "kubectl_manifest" "bootstrap":
│   93: resource "kubectl_manifest" "bootstrap" {
│ 

This seems to be related to gavinbunney/terraform-provider-kubectl#270

One of the suggested workaround, is to relay on a raw helm chart to apply the manifest

@allamand
Copy link
Author

User Alekc has forked the gavinbunney in version 1.14 and has made some fixes on it here : https://github.com/alekc/terraform-provider-kubectl

A Quick fix, is to change the provider to uses a maintained fork of the kubectl provider :

before:
    kubectl = {
      source  = "gavinbunney/kubectl"
      version = ">= 1.14"
    }
after:
    kubectl = {
      source  = "alekc/kubectl"
      version = ">= 2.0.2"
    }

@allamand
Copy link
Author

In fact the error is still there.

To repdocude, I delete the application and try try again

argocd appset delete argocd/bootstrap-workloads -y
argocd appset delete argocd/bootstrap-addons -y

@allamand
Copy link
Author

This is resolved with the uses of helm instead of kubectl

@csantanapr
Copy link
Member

Fix in #6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants