cuetf

package module
v0.2605.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2026 License: MIT Imports: 1 Imported by: 0

README

cuetf

CUE definitions for the selected Terraform providers.

Usage example:

import "github.com/roman-mazur/cuetf/providers/google"

googleInfra: google.#Terraform & {
	provider: google: {
		project: "my_proj"
		zone:    "us-east1-b"
	}
	resource: google_compute_instance: test: {
		name:         "test"
		machine_type: "e2-micro"
		boot_disk: initialize_params: image: "cos-cloud/cos-stable"
		network_interface: network: "default"
	}
}

Then you can do

cue export -e googleInfra > my-infra.tf.json
terraform init
terraform plan

See the examples directory too.

Versioning

This repo is updated automatically by dependabot when new updates to the Terraform providers are detected. CUE module releases happen monthly, with versions following the pattern <major>.YYMM.0. For example, the release that happened in February 2026 is represented with the version v0.2602.0 published to the CUE Central Registry.

Embedding

Instead of importing from the CUE Central Registry you can also choose to vendor the definitions into your project. Command embed available in this repo can be used to generate the definitions for a selected Terraform provider version putting the generated code into your cue.mod/pkg directory.

Example:

# Run in your CUE project.
go run rmazur.io/cuetf/cmd/embed@latest integrations/github 6.11.1

Be aware of the limitations related to this use case: these definitions will not be accessible if you use them in a shared module that other modules depend on.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Data embed.FS

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
embed command
Command embed can be used to add CUE definitions for the specified Terraform provider to your source tree.
Command embed can be used to add CUE definitions for the specified Terraform provider to your source tree.
ci
clog
Package clog exposes a Logger that produces consistent logs sequence about Terraform defs definitions.
Package clog exposes a Logger that produces consistent logs sequence about Terraform defs definitions.
cmd/bump-deps command
Command bump-deps updates the github.com/roman-mazur/cuetf@v0 dependency version in all provider cue.mod/module.cue files.
Command bump-deps updates the github.com/roman-mazur/cuetf@v0 dependency version in all provider cue.mod/module.cue files.
cmd/gen command
Command gen can be used to generate the CUE definitions from a Terraform provider schema.
Command gen can be used to generate the CUE definitions from a Terraform provider schema.
cmd/monthly-release command
Command monthly-release performs the following actions: - checks if the HEAD of the git repo is different from the latest tag, - tags the HEAD using the current month (in a form of <major>.YYMM.<patch>), - publishes the provider cue modules (each in ./providers) with this new version.
Command monthly-release performs the following actions: - checks if the HEAD of the git repo is different from the latest tag, - tags the HEAD using the current month (in a form of <major>.YYMM.<patch>), - publishes the provider cue modules (each in ./providers) with this new version.
cmd/pversion command
Command pversion retrieves the provider version parsing the corpus.tf file.
Command pversion retrieves the provider version parsing the corpus.tf file.
gen
providers
aws

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL