Skip to content

Commit 876866e

Browse files
committed
feat: add information on README.md
1 parent bf237c9 commit 876866e

File tree

6 files changed

+42
-6
lines changed

6 files changed

+42
-6
lines changed

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
11
## Terraform-Plugin-Framework-Demo
2-
This is demo for [Terraform-Plugin-Framework](https://www.terraform.io/docs/plugin/framework/) which is a new SDK under active development.
2+
This is an unofficial demo for [Terraform-Plugin-Framework](https://www.terraform.io/docs/plugin/framework/) which is a new SDK under active development.
33
Further information might be in [Official GitHub Repository](https://github.com/hashicorp/terraform-plugin-framework).
4+
5+
## How to use
6+
1. install plugin locally
7+
8+
```bash
9+
$ make install
10+
```
11+
12+
2. terraform init
13+
14+
```bash
15+
cd examples
16+
terraform init
17+
```
18+
19+
3. terraform apply(Create)
20+
21+
```bash
22+
echo "running demo server for applying"
23+
go run ../demo-server/main.go
24+
terraform apply
25+
```
26+
27+
4. terraform apply(Read)
28+
29+
```bash
30+
terraform apply
31+
```
32+
33+
5. terraform apply(Update)
34+
35+
```bash
36+
echo "edit configuration in main.tf"
37+
vim main.tf
38+
terraform apply
39+
```

demo-server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
"github.com/go-chi/chi"
1313
"github.com/go-chi/chi/middleware"
14-
"github.com/task4233/note-v2-terraform/client"
14+
"github.com/task4233/terraform-plugin-framework-demo/client"
1515
)
1616

1717
const (

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/task4233/note-v2-terraform
1+
module github.com/task4233/terraform-plugin-framework-demo
22

33
go 1.17
44

log/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/hashicorp/terraform-plugin-framework/diag"
77
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
88
"github.com/hashicorp/terraform-plugin-framework/types"
9-
"github.com/task4233/note-v2-terraform/client"
9+
"github.com/task4233/terraform-plugin-framework-demo/client"
1010
)
1111

1212
// ref: https://pkg.go.dev/github.com/hashicorp/terraform-plugin-framework@v0.4.2/tfsdk#Provider

log/resource_log.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/hashicorp/terraform-plugin-framework/diag"
1010
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
1111
"github.com/hashicorp/terraform-plugin-framework/types"
12-
"github.com/task4233/note-v2-terraform/client"
12+
"github.com/task4233/terraform-plugin-framework-demo/client"
1313
)
1414

1515
type resourceLogType struct{}

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55

66
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
7-
"github.com/task4233/note-v2-terraform/log"
7+
"github.com/task4233/terraform-plugin-framework-demo/log"
88
)
99

1010
func main() {

0 commit comments

Comments
 (0)