Skip to content

Commit

Permalink
Overhaul for v2 SDK and registry
Browse files Browse the repository at this point in the history
  • Loading branch information
paultyng committed Aug 20, 2020
1 parent d8416a9 commit 3de0976
Show file tree
Hide file tree
Showing 2,157 changed files with 675 additions and 684,181 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: goreleaser

on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/[email protected]
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.15'
-
name: Import GPG key
id: import_gpg
uses: paultyng/[email protected]
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
builds:
- env:
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
goos:
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
binary: '{{ .ProjectName }}_v{{ .Version }}'
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:
- artifacts: checksum
args:
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
changelog:
skip: true
24 changes: 0 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1 @@
# Airtable Terraform Provider

## Data Sources

### `airtable_table`

```hcl
data "airtable_table" "test" {
"workspace_id" = "appOYVvt71h5txnFZ"
"table" = "Table 1"
}
```

#### Arguments

* `workspace_id`
* `table`
* `view`

#### Attributes

* `records`:
* `id`
* `created_time`: RFC3339 time
* `fields`: map of fields and values
53 changes: 53 additions & 0 deletions docs/data-sources/table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
page_title: "airtable_table Data Source - terraform-provider-airtable"
subcategory: ""
description: |-
The airtable_table resource allows you to read information from a table for use in other Terraform resources.
---

# Data Source `airtable_table`

The `airtable_table` resource allows you to read information from a table for use in other Terraform resources.

## Example Usage

```terraform
data "airtable_table" "test" {
"workspace_id" = "appOYVvt71h5txnFZ"
"table" = "Table 1"
}
```

## Schema

### Required

- **table** (String, Required) Name of the table from which to query information.
- **workspace_id** (String, Required) ID of the workspace in Airtable, you can find this in the base URL on your [Bases page](https://airtable.com/) when logged in.

### Optional

- **id** (String, Optional) The ID of this resource.
- **timeouts** (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- **view** (String, Optional) Name of the view from which to query information.

### Read-only

- **records** (List of Object, Read-only) Records in the table / view. (see [below for nested schema](#nestedatt--records))

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- **read** (String, Optional)


<a id="nestedatt--records"></a>
### Nested Schema for `records`

- **created_time** (String)
- **fields** (Map of String)
- **id** (String)


25 changes: 25 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
layout: ""
page_title: "Provider: Airtable"
description: |-
The Airtable provider provides resources to interact with a Airtable API.
---

# Airtable Provider

The Airtable provider provides resources to interact with the Airtable API.

## Example Usage

```terraform
data "airtable_table" "test" {
"workspace_id" = "appOYVvt71h5txnFZ"
"table" = "Table 1"
}
```

## Schema

### Optional

- **api_key** (String, Optional) API key from your [account](https://airtable.com/account) page. You can set this via the `AIRTABLE_API_KEY` environment variable as well.
4 changes: 4 additions & 0 deletions examples/data-sources/airtable_table/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data "airtable_table" "test" {
"workspace_id" = "appOYVvt71h5txnFZ"
"table" = "Table 1"
}
11 changes: 6 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module github.com/paultyng/terraform-provider-airtable

go 1.15

require (
github.com/hashicorp/go-hclog v0.0.0-20190109152822-4783caec6f2e // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 // indirect
github.com/hashicorp/terraform v0.12.2
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/hashicorp/terraform-plugin-docs v0.1.3
github.com/hashicorp/terraform-plugin-sdk/v2 v2.0.1
github.com/posener/complete v1.2.1 // indirect
)
Loading

0 comments on commit 3de0976

Please sign in to comment.