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

Bug with gavinbunney/terraform-provider-kubectl + k8s 1.27 #335

Closed
zack-is-cool opened this issue Aug 11, 2023 · 2 comments · Fixed by defenseunicorns/terraform-aws-eks#53
Assignees

Comments

@zack-is-cool
Copy link
Member

zack-is-cool commented Aug 11, 2023

Persona

delivery iac unicorn

Description

there's a bug in the kubectl terraform provider. seems like it's unable to see things that are already existing or unable to put them into state or something. The thing gets made, but subsequent runs it tries to make the thing again. Specifically seeing this with the vpc-cni eniconfigs in our eks module.

gavinbunney/kubectl provider used in vpc-cni-custom-networking is behaving inconsistently · aws-ia/terraform-aws-eks-blueprints
aws-ia/terraform-aws-eks-blueprints#1675

failed to fetch resource from kubernetes: the server could not find the requested resource · gavinbunney/terraform-provider-kubectl
gavinbunney/terraform-provider-kubectl#270

there are some solutions in the threads above.

  1. use null_provider + bash script
  • (pls no)
  1. use a "raw" helm chart method
  1. use https://github.com/alekc/terraform-provider-kubectl
  • might work.. looks maintained? Easy drop-in solution

Impact

it's bad

Completion

@zack-is-cool zack-is-cool added this to IaC Aug 14, 2023
@github-project-automation github-project-automation bot moved this to No Status in IaC Aug 14, 2023
@zack-is-cool zack-is-cool self-assigned this Aug 14, 2023
@zack-is-cool
Copy link
Member Author

Spoke with @ntwkninja.

Conclusion:
Use helm_release resource from the hashicorp/helm provider with a "raw" helm chart to create arbitrary kubernetes resources. Meaning we will feed arbitrary manifests into it. Likely, we will create and publish our own raw helm chart.

@zack-is-cool
Copy link
Member Author

working this here
https://github.com/defenseunicorns/terraform-aws-uds-eks/pull/53

you can apply eniconfigs through the addon:

aws eks describe-addon-configuration \
    --addon-name vpc-cni \
    --addon-version v1.14.0-eksbuild.3 \
    --query 'configurationSchema' \ 
    --output text | jq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant