Giter VIP home page Giter VIP logo

terraform-provider-cilium's Introduction

Terraform Cilium Provider (Experimental)

The Cilium Provider allows Terraform to manage Cilium resources.

Requirements

Building The Provider

$ git clone https://github.com/littlejo/terraform-provider-cilium.git
$ cd terraform-provider-cilium

Enter the provider directory and build the provider

$ make build

Using the provider

Please see the documentation in the Terraform registry.

Or you can browse the documentation within this repo here.

Using the locally built provider

If you wish to test the provider from the local version you just built, you can try the following method.

First install the Terraform Provider binary into your local plugin repository:

# Set your target environment (OS_architecture): linux_amd64, darwin_amd64...
$ vim GNUmakefile
$ make install

Then create a Terraform configuration using this exact provider:

$ mkdir ~/test-terraform-provider-cilium
$ cd ~/test-terraform-provider-cilium
$ cat > main.tf <<EOF
# Configure the cilium Provider
terraform {
  required_providers {
    cilium = {
      source = "terraform.local/local/cilium"
      version = "0.0.1"
    }
  }
}

provider "cilium" {
}
EOF

# Initialize your project and remove existing dependencies lock file
$ rm .terraform.lock.hcl && terraform init
...

# Apply your resources & datasources
$ terraform apply
...

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.22+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

To compile the provider, run make build. This will build the provider and put the provider binary in the $GOPATH/bin directory.

$ make build

Testing the Provider

In order to test the provider, you can simply run make test.

$ make test

In order to run the full suite of Acceptance tests you will need to create a kubernetes cluster like kind. You can also test on some examples:

Contributing

Please read the contributing guide to learn about how you can contribute to the Cilium Terraform provider.
There is no small contribution, don't hesitate!

Our awesome contributors:

terraform-provider-cilium's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kaplan-michael

terraform-provider-cilium's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Package lookup failures

Warning

Renovate failed to look up the following dependencies: Failed to look up terraform-provider package local/cilium.

Files affected: .github/tf/versions.tf


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/release.yml
  • actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • actions/setup-go v5.0.1@cdcb36043654635271a94b9a6d1392de5bb323a7
  • crazy-max/ghaction-import-gpg v6.1.0@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4
  • goreleaser/goreleaser-action v5.0.0@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8
.github/workflows/test.yml
  • actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • actions/setup-go v5.0.1@cdcb36043654635271a94b9a6d1392de5bb323a7
  • golangci/golangci-lint-action v6.0.0@23faadfdeb23a6f9e511beaba149bb123b5b145a
  • actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • actions/setup-go v5.0.1@cdcb36043654635271a94b9a6d1392de5bb323a7
  • actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • actions/setup-go v5.0.1@cdcb36043654635271a94b9a6d1392de5bb323a7
  • opentofu/setup-opentofu v1
  • helm/kind-action v1.10.0@0025e74a8c7512023d06dc019c617aa3cf561fde
  • actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • actions/setup-go v5.0.1@cdcb36043654635271a94b9a6d1392de5bb323a7
  • hashicorp/setup-terraform v3.1.1@651471c36a6092792c552e8b1bef71e592b462d8
  • helm/kind-action v1.10.0@0025e74a8c7512023d06dc019c617aa3cf561fde
  • actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • actions/setup-go v5.0.1@cdcb36043654635271a94b9a6d1392de5bb323a7
  • opentofu/setup-opentofu v1
  • helm/kind-action v1.10.0@0025e74a8c7512023d06dc019c617aa3cf561fde
  • helm/kind-action v1.10.0@0025e74a8c7512023d06dc019c617aa3cf561fde
  • actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • actions/setup-go v5.0.1@cdcb36043654635271a94b9a6d1392de5bb323a7
  • opentofu/setup-opentofu v1
  • helm/kind-action v1.10.0@0025e74a8c7512023d06dc019c617aa3cf561fde
  • actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • actions/setup-go v5.0.1@cdcb36043654635271a94b9a6d1392de5bb323a7
  • opentofu/setup-opentofu v1
  • helm/kind-action v1.10.0@0025e74a8c7512023d06dc019c617aa3cf561fde
  • actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
  • actions/setup-go v5.0.1@cdcb36043654635271a94b9a6d1392de5bb323a7
  • opentofu/setup-opentofu v1
  • helm/kind-action v1.10.0@0025e74a8c7512023d06dc019c617aa3cf561fde
gomod
go.mod
  • go 1.22.2
  • github.com/cilium/cilium v1.16.0-pre.2
  • github.com/cilium/cilium-cli v0.16.7
  • github.com/hashicorp/terraform-plugin-docs v0.19.2
  • github.com/hashicorp/terraform-plugin-framework v1.8.0
  • github.com/hashicorp/terraform-plugin-go v0.23.0
  • github.com/hashicorp/terraform-plugin-log v0.9.0
  • github.com/hashicorp/terraform-plugin-testing v1.7.0
  • gopkg.in/yaml.v3 v3.0.1
  • helm.sh/helm/v3 v3.14.4
  • k8s.io/apimachinery v0.30.0
terraform
.github/tf/cilium/main.tf
.github/tf/cilium/versions.tf
  • cilium >= 0.2.0
  • hashicorp/terraform >= 1.3
.github/tf/clustermesh/main.tf
.github/tf/clustermesh/versions.tf
  • cilium >= 0.2.0
  • hashicorp/terraform >= 1.3
.github/tf/kubeproxy-free/main.tf
.github/tf/kubeproxy-free/versions.tf
  • cilium >= 0.2.0
  • hashicorp/terraform >= 1.3
.github/tf/provider-config-content/main.tf
.github/tf/provider-config-content/versions.tf
  • cilium >= 0.2.0
  • hashicorp/terraform >= 1.3
.github/tf/versions.tf
  • cilium 0.0.1
  • hashicorp/terraform >= 1.3

  • Check this box to trigger a request for Renovate to run again on this repository

Provider always crash

Hello,
Often when using the Cilium provider, an error appears stating that the plugin has failed.
I've been using it since version 0.1.6 and the same behavior is evident.
When updating to version 0.1.7 I temporarily no longer had any problems, but about 3 days ago the same error occurred again. I then updated to the new release (0.1.8) and the error remains.
I would like to use the provider in an "online" way so that I don't always need to update the project files (provider offline).
The screenshot of the error follows the link: Image
Thank you!

Client Lazy init & direct credentials

Hello, I would like to use this to install cilium as part of my bigger terraform that is also installing the cluster.
but I have computed credentials for it, so

  1. I can't use this as you don't support direct kubeconfig loading(only from a path)
  2. I need the client to be lazy inited as it will error out when it doesn't have the creds yet(in the plan stage)

I have put it together this way in my provider
so I can mostly take that code and change it here(but to be honest, it's probably not the best code)

What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.