Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Terraform Bytebase provider

License

NotificationsYou must be signed in to change notification settings

bytebase/terraform-provider-bytebase

Repository files navigation

This repository is the Terraform provider forBytebase. A typical setupinvolves teams using Cloud vendors' Terraform provider to provision database instances, followed byusing Terraform Bytebase Provider to prepare those instances ready for application use.

Usage

  1. Downloadprovider.
  2. Followexample.

Development

Prerequisites

If you have problems runningterraform in MacOS with Apple Silicon, you can followinghttps://stackoverflow.com/questions/66281882/how-can-i-get-terraform-init-to-run-on-my-apple-silicon-macbook-pro-for-the-go and use thetfenv.

Prepare Bytebase OpenAPI server

# clone Bytebase to get the OpenAPI servergit clone git@github.com:bytebase/bytebase.gitgit clone git@github.com:bytebase/terraform-provider-bytebase.git
# start Bytebase OpenAPI servercd bytebase# check https://github.com/bytebase/bytebase for starting the Bytebase server.air -c scripts/.air.toml

Build and test

# install the provider in your local machinecd terraform-provider-bytebase&& make install# test# Any BYTEBASE_SERVICE_ACCOUNT/BYTEBASE_SERVICE_KEY/BYTEBASE_URL value should work since the service is mockedTF_ACC=1 BYTEBASE_SERVICE_ACCOUNT=test@service.bytebase.com BYTEBASE_SERVICE_KEY=test_secret BYTEBASE_URL=https://bytebase.example.com gotest -v ./...# initialize the terraform for your example# you need to set the service_account and service_key to your owncd examples/setup&& terraform init# check the changesterraform plan# apply the changesterraform apply# print outputsterraform output# delete test resourcesterraform destory

Generate docs

This will generate the doc template in thedocs folder

Checkhttps://github.com/hashicorp/terraform-plugin-docs andhashicorp/terraform-plugin-docs#141 for details.

GOOS=darwin GOARCH=amd64 go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs --provider-name=terraform-provider-bytebase

Release

Followthis doc to publish the provider.

Note:We need to publish a new tag for a new version, the tag must be a validSemantic Versionpreceded with a v (for example, v1.2.3). There must not be a branch name with the same name as the tag.

  1. Develop and merge the feature code.
  2. Create a new PR to update the version in./VERSION
  3. After the version is updated, the action./.github/workflows/release.yml will use the newest versionx.y.z to create a new tagvx.y.z, then use the tag to create the release.

About

Terraform Bytebase provider

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors10


[8]ページ先頭

©2009-2025 Movatter.jp