https://github.com/rollbar/rollbar-terraform-importer
https://github.com/rollbar/rollbar-terraform-importer
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rollbar/rollbar-terraform-importer
- Owner: rollbar
- License: mit
- Created: 2021-03-18T00:03:24.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-02-25T07:31:48.000Z (over 3 years ago)
- Last Synced: 2025-12-25T18:59:12.523Z (6 months ago)
- Language: Go
- Size: 14.6 KB
- Stars: 1
- Watchers: 20
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rollbar Terraform Importer
This is an importer designed to help migrate Rollbar account data to be managed
by Terraform.
## How It Works
This utility queries the public Rollbar API to obtain user, team and project
information and produces:
- a file with the Terraform import commands,
- a file (or set of files) containing the Rollbar account information as
Terraform resources.
### Flags
- *-accessToken*: Pass a Rollbar account access token with rights to read.
- *-singleFile*: By default, the Terraform files are produced with a file per
type (*e.g.* user.tf, projects.tf, access_tokens.tf), but this can be disabled
to write them all to a single file.
- *-outPath*: The directory to write the generated files to.
### Examples
- `rollbar-terraform-importer -accessToken 53lkj34802lkj2342341l` will
generate an `import` file contain all import commands, as well as
`access_tokens.tf`, `projects.tf`, `teams.tf` and `users.tf` to the current
working directory.
- `rollbar-terraform-importer -accessToken 53lkj34802lkj2342341l -singleFile`
will do the same thing, except it will write all Terraform resources into a
single file called `rollbar_account.tf`. Terraform import files are still
generated into a file called `import`.
## Caveats
The importer requires some manual review to ensure that all resources and names
are correct. For instance, access tokens are not guaranteed to have unique
names and the importer leaves the decision on naming them to the user.