-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add user resource * generate docs * add acceptance tests
- Loading branch information
Showing
22 changed files
with
794 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ terraform-provider-airflow | |
terraform.tfstate | ||
terraform.tfstate.* | ||
.terraform | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
build: | ||
go build -o terraform-provider-airflow | ||
|
||
docs: | ||
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs | ||
|
||
vendor: | ||
go mod vendor | ||
go mod tidy | ||
|
||
test-acceptance: | ||
@AIRFLOW_API_USERNAME=airflow \ | ||
AIRFLOW_API_PASSWORD=airflow \ | ||
AIRFLOW_BASE_ENDPOINT=http://127.0.0.1:8080 \ | ||
TF_ACC=1 $(go_test) go test -v -cover $(shell go list ./... | grep -v vendor) | ||
|
||
start-airflow: | ||
docker run -d -e AIRFLOW__API__AUTH_BACKEND=airflow.api.auth.backend.basic_auth \ | ||
-p 127.0.0.1:8080:8080 --name=airflow apache/airflow:2.2.2 standalone | ||
|
||
stop-airflow: | ||
docker stop airflow; docker rm airflow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//go:build tools | ||
// +build tools | ||
|
||
package docs | ||
|
||
import ( | ||
_ "github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
page_title: "Provider: Airflow" | ||
description: Manage Airflow with Terraform. | ||
--- | ||
|
||
# Airflow Provider | ||
|
||
This is a terraform provider plugin for managing [Apache Airflow](https://airflow.apache.org/). | ||
|
||
## Example Provider Configuration | ||
|
||
```terraform | ||
terraform { | ||
required_providers { | ||
airflow = { | ||
source = "houqp/airflow" | ||
version = "0.2.1" | ||
} | ||
} | ||
} | ||
provider "airflow" { | ||
base_endpoint = "http://localhost:28080/" | ||
username = "test" | ||
password = "test" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "airflow_user Resource - terraform-provider-airflow" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# airflow_user (Resource) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "airflow_user" "example_user" { | ||
username = "test_user" | ||
email = "[email protected]" | ||
first_name = "test" | ||
last_name = "user" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **email** (String) | ||
- **first_name** (String) | ||
- **last_name** (String) | ||
- **username** (String) | ||
|
||
### Optional | ||
|
||
- **id** (String) The ID of this resource. | ||
- **password** (String, Sensitive) **WARNING:** this will put the password in the terraform state file. Use carefully. | ||
- **roles** (Set of String) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "airflow_variable Resource - terraform-provider-airflow" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# airflow_variable (Resource) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "airflow_variable" "foo" { | ||
key = "foo" | ||
value = "bar" | ||
} | ||
resource "airflow_variable" "hello" { | ||
key = "hello" | ||
value = "world" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **key** (String) | ||
- **value** (String) | ||
|
||
### Optional | ||
|
||
- **id** (String) The ID of this resource. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
resource "airflow_user" "example_user" { | ||
username = "test_user" | ||
email = "[email protected]" | ||
first_name = "test" | ||
last_name = "user" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
resource "airflow_variable" "foo" { | ||
key = "foo" | ||
value = "bar" | ||
} | ||
|
||
resource "airflow_variable" "hello" { | ||
key = "hello" | ||
value = "world" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,84 @@ | ||
module github.com/apache/terraform-provider-airflow | ||
|
||
go 1.13 | ||
go 1.17 | ||
|
||
require ( | ||
github.com/apache/airflow-client-go/airflow v0.0.0-20200906053102-e1deffdac652 | ||
github.com/hashicorp/terraform-plugin-sdk v1.10.0 | ||
golang.org/x/net v0.0.0-20200904194848-62affa334b73 // indirect | ||
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 // indirect | ||
github.com/apache/airflow-client-go/airflow v0.0.0-20211202191715-b125451e80fd | ||
github.com/hashicorp/terraform-plugin-docs v0.5.1 | ||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.9.0 | ||
) | ||
|
||
require ( | ||
cloud.google.com/go v0.65.0 // indirect | ||
cloud.google.com/go/storage v1.10.0 // indirect | ||
github.com/Masterminds/goutils v1.1.0 // indirect | ||
github.com/Masterminds/semver v1.5.0 // indirect | ||
github.com/Masterminds/sprig v2.22.0+incompatible // indirect | ||
github.com/agext/levenshtein v1.2.2 // indirect | ||
github.com/apparentlymart/go-cidr v1.0.1 // indirect | ||
github.com/apparentlymart/go-textseg v1.0.0 // indirect | ||
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect | ||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 // indirect | ||
github.com/aws/aws-sdk-go v1.25.3 // indirect | ||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect | ||
github.com/bgentry/speakeasy v0.1.0 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/fatih/color v1.7.0 // indirect | ||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect | ||
github.com/golang/protobuf v1.4.2 // indirect | ||
github.com/google/go-cmp v0.5.6 // indirect | ||
github.com/google/uuid v1.1.2 // indirect | ||
github.com/googleapis/gax-go/v2 v2.0.5 // indirect | ||
github.com/hashicorp/errwrap v1.0.0 // indirect | ||
github.com/hashicorp/go-checkpoint v0.5.0 // indirect | ||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect | ||
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect | ||
github.com/hashicorp/go-getter v1.5.3 // indirect | ||
github.com/hashicorp/go-hclog v0.15.0 // indirect | ||
github.com/hashicorp/go-multierror v1.0.0 // indirect | ||
github.com/hashicorp/go-plugin v1.4.1 // indirect | ||
github.com/hashicorp/go-safetemp v1.0.0 // indirect | ||
github.com/hashicorp/go-uuid v1.0.1 // indirect | ||
github.com/hashicorp/go-version v1.3.0 // indirect | ||
github.com/hashicorp/hcl/v2 v2.3.0 // indirect | ||
github.com/hashicorp/logutils v1.0.0 // indirect | ||
github.com/hashicorp/terraform-exec v0.15.0 // indirect | ||
github.com/hashicorp/terraform-json v0.13.0 // indirect | ||
github.com/hashicorp/terraform-plugin-go v0.4.0 // indirect | ||
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect | ||
github.com/huandu/xstrings v1.3.2 // indirect | ||
github.com/imdario/mergo v0.3.12 // indirect | ||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect | ||
github.com/jstemmer/go-junit-report v0.9.1 // indirect | ||
github.com/klauspost/compress v1.11.2 // indirect | ||
github.com/mattn/go-colorable v0.1.11 // indirect | ||
github.com/mattn/go-isatty v0.0.14 // indirect | ||
github.com/mitchellh/cli v1.1.2 // indirect | ||
github.com/mitchellh/copystructure v1.2.0 // indirect | ||
github.com/mitchellh/go-homedir v1.1.0 // indirect | ||
github.com/mitchellh/go-testing-interface v1.0.4 // indirect | ||
github.com/mitchellh/go-wordwrap v1.0.0 // indirect | ||
github.com/mitchellh/mapstructure v1.1.2 // indirect | ||
github.com/mitchellh/reflectwalk v1.0.2 // indirect | ||
github.com/oklog/run v1.0.0 // indirect | ||
github.com/posener/complete v1.1.1 // indirect | ||
github.com/russross/blackfriday v1.6.0 // indirect | ||
github.com/ulikunitz/xz v0.5.8 // indirect | ||
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect | ||
github.com/zclconf/go-cty v1.10.0 // indirect | ||
go.opencensus.io v0.22.4 // indirect | ||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b // indirect | ||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect | ||
golang.org/x/mod v0.3.0 // indirect | ||
golang.org/x/net v0.0.0-20210326060303-6b1517762897 // indirect | ||
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99 // indirect | ||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 // indirect | ||
golang.org/x/text v0.3.5 // indirect | ||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d // indirect | ||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect | ||
google.golang.org/api v0.30.0 // indirect | ||
google.golang.org/appengine v1.6.6 // indirect | ||
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 // indirect | ||
google.golang.org/grpc v1.32.0 // indirect | ||
google.golang.org/protobuf v1.25.0 // indirect | ||
) |
Oops, something went wrong.