terraform provider pinecone
v0.1.2
PENECONE의 리소스 관리를위한 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
}로컬로 실행할 수있는 다양한 예제는 예제 디렉토리를 확인하십시오.
로컬 개발 중에 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 ↩