terraform provider pinecone
v0.1.2
Pineconeでリソースを管理するためのTerraformプロバイダー。完全なプロバイダーのドキュメントについては、レジストリのプロバイダーページを参照してください
terraform {
required_providers {
pinecone = {
source = " thiskevinwang/pinecone "
version = " 0.1.2 "
}
}
}
provider "pinecone" {
apikey = var . pinecone_api_key # optional; PINECONE_API_KEY
environment = var . pinecone_environment # optional; PINECONE_ENVIRONMENT
}
data "pinecone_collection" "existing-collection" {
name = " my-existing-collection "
}
resource "pinecone_index" "my-first-index" {
name = " index-to-be-managed "
metric = " cosine "
pods = 1
source_collection = data . pinecone_collection . existing-collection . name
dimension = data . pinecone_collection . existing-collection . dimension
}ローカルで実行できるさまざまな例については、Examples Directoryをご覧ください。
ローカル開発中に、Terraform構成ファイル( ~/.terraformrc )にprovider_overrideを設定して、ローカルバイナリを指すようにしてください。
provider_installation {
dev_overrides {
# Adjust this path to point to the directory where the local provider
# binary is present. It is likely your $GOPATH/bin directory.
" thekevinwang.com/terraform-providers/pinecone " = " /Users/kevin/go/bin "
}
# For all other providers, install them directly from their origin provider
# registries as normal. If you omit this, Terraform will _only_ use
# the dev_overrides block, and so no other providers will be available.
direct {}
} terraform {
required_providers {
pinecone = {
source = " thekevinwang.com/terraform-providers/pinecone "
}
}
} cp .env.example .env
go test -v ./... このプロジェクトは./tools/tools.goに依存して、 tfplugindocsをインストールします。
export GOBIN=$PWD/bin
export PATH=$GOBIN:$PATH
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
which tfplugindocs tfplugindocsを実行してドキュメントを生成し、https://registry.terraform.io/tools/doc-previewで個々のファイルをプレビューします
すでに行われているいくつかのタイムステップがあり、このREADMEではカバーされません。詳細については、次の脚注を参照してください。 1
プロバイダーの新しいバージョンをレジストリにリリースするには、新しいGitHubリリースを作成する必要があります。次の手順を使用して続行します。
mainにいて、きれいな作業木を持っています。git tag v0.1.2git push origin v0.1.2goreleaser : GITHUB_TOKEN=$(gh auth token) goreleaser release --clean注記
GoreLeaser構成では、 GPG_FINGERPRINT設定する必要があります。たぶん次のことを試してみてください(テストする必要があります)
export GPG_FINGERPRINT= $( gpg --list-keys --with-colons | awk -F: ' $1 == "fpr" || $1 == "fp2" {print $10} ' | head -n 1 )
export GITHUB_TOKEN= $( gh auth token )
goreleaser release --clean公開に関するドキュメント:https://developer.hashicorp.com/terraform/registry/providers/publishing#publishing-to-the-registry