Skip to content

Commit 2bf4fcc

Browse files
author
uros.simovic
committed
chore: rename to misc
1 parent d3827c3 commit 2bf4fcc

9 files changed

+22
-29
lines changed

docs/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
# generated by https://github.com/hashicorp/terraform-plugin-docs
3-
page_title: "kiwi Provider"
3+
page_title: "misc Provider"
44
subcategory: ""
55
description: |-
66
Terraform helpers.
77
---
88

9-
# kiwi Provider
9+
# misc Provider
1010

11-
Terraform helpers.
11+
Various Terraform helpers.
1212

1313

1414

docs/resources/claim_from_pool.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
# generated by https://github.com/hashicorp/terraform-plugin-docs
3-
page_title: "kiwi_claim_from_pool Resource - kiwi"
3+
page_title: "misc_claim_from_pool Resource - misc"
44
subcategory: ""
55
description: |-
6-
Manages an order.
6+
Manages pool claimers.
77
---
88

9-
# kiwi_claim_from_pool (Resource)
9+
# misc_claim_from_pool (Resource)
1010

11-
Manages an order.
11+
Manages pool claimers.
1212

1313

1414

examples/main.tf

+9-16
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
11
terraform {
22
required_providers {
33
kiwi = {
4-
source = "kiwicom/kiwi"
4+
source = "kiwicom/misc"
55
}
66
}
77
}
88

9-
resource "kiwi_claim_from_pool" "server_addresses" {
10-
pool = [
11-
"10.0.0.1",
12-
"10.0.0.2",
13-
"10.0.0.3",
14-
"10.0.0.4",
15-
"10.0.0.5",
16-
"10.0.0.6",
17-
]
9+
resource "misc_claim_from_pool" "master_cidr_subnets" {
10+
pool = [for i in range(900, 1024) : cidrsubnet("172.23.192.0/18", 10, i)]
1811
claimers = [
19-
"server1",
20-
"server2",
21-
"server3",
22-
"server4",
12+
"cluster1",
13+
"cluster2",
14+
"cluster3",
15+
"cluster4",
2316
]
2417
}
2518

26-
output "server_addresses" {
27-
value = kiwi_claim_from_pool.output
19+
output "master_cidr_subnets" {
20+
value = misc_claim_from_pool.master_cidr_subnets.output
2821
}

examples/terraform-provider-hashicups

-18 MB
Binary file not shown.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module terraform-provider-kiwi
1+
module terraform-provider-misc
22

33
go 1.18
44

main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ package main
22

33
import (
44
"context"
5-
"terraform-provider-kiwi/kiwi"
5+
"terraform-provider-misc/misc"
66

77
"github.com/hashicorp/terraform-plugin-framework/providerserver"
88
)
99

1010
// Provider documentation generation.
11-
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-name kiwi
11+
//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-name misc
1212

1313
func main() {
1414
providerserver.Serve(context.Background(), kiwi.New, providerserver.ServeOpts{

kiwi/claim_from_pool_resource.go misc/claim_from_pool_resource.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var (
2424
)
2525

2626
// NewOrderResource is a helper function to simplify the provider implementation.
27-
func NewOrderResource() resource.Resource {
27+
func NewClaimFromPoolResource() resource.Resource {
2828
return &claimFromPool{}
2929
}
3030

kiwi/helpers.go misc/helpers.go

File renamed without changes.

kiwi/provider.go misc/provider.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type kiwiProvider struct{}
2525

2626
// Metadata returns the provider type name.
2727
func (p *kiwiProvider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse) {
28-
resp.TypeName = "kiwi"
28+
resp.TypeName = "misc"
2929
}
3030

3131
// Schema defines the provider-level schema for configuration data.
@@ -50,6 +50,6 @@ func (p *kiwiProvider) DataSources(_ context.Context) []func() datasource.DataSo
5050
// Resources defines the resources implemented in the provider.
5151
func (p *kiwiProvider) Resources(_ context.Context) []func() resource.Resource {
5252
return []func() resource.Resource{
53-
NewOrderResource,
53+
NewClaimFromPoolResource,
5454
}
5555
}

0 commit comments

Comments
 (0)