Skip to content

Commit

Permalink
chore: rename to misc
Browse files Browse the repository at this point in the history
  • Loading branch information
uros.simovic committed Nov 29, 2023
1 parent d3827c3 commit 2bf4fcc
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 29 deletions.
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "kiwi Provider"
page_title: "misc Provider"
subcategory: ""
description: |-
Terraform helpers.
---

# kiwi Provider
# misc Provider

Terraform helpers.
Various Terraform helpers.



Expand Down
8 changes: 4 additions & 4 deletions docs/resources/claim_from_pool.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "kiwi_claim_from_pool Resource - kiwi"
page_title: "misc_claim_from_pool Resource - misc"
subcategory: ""
description: |-
Manages an order.
Manages pool claimers.
---

# kiwi_claim_from_pool (Resource)
# misc_claim_from_pool (Resource)

Manages an order.
Manages pool claimers.



Expand Down
25 changes: 9 additions & 16 deletions examples/main.tf
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
terraform {
required_providers {
kiwi = {
source = "kiwicom/kiwi"
source = "kiwicom/misc"
}
}
}

resource "kiwi_claim_from_pool" "server_addresses" {
pool = [
"10.0.0.1",
"10.0.0.2",
"10.0.0.3",
"10.0.0.4",
"10.0.0.5",
"10.0.0.6",
]
resource "misc_claim_from_pool" "master_cidr_subnets" {
pool = [for i in range(900, 1024) : cidrsubnet("172.23.192.0/18", 10, i)]
claimers = [
"server1",
"server2",
"server3",
"server4",
"cluster1",
"cluster2",
"cluster3",
"cluster4",
]
}

output "server_addresses" {
value = kiwi_claim_from_pool.output
output "master_cidr_subnets" {
value = misc_claim_from_pool.master_cidr_subnets.output
}
Binary file removed examples/terraform-provider-hashicups
Binary file not shown.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module terraform-provider-kiwi
module terraform-provider-misc

go 1.18

Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package main

import (
"context"
"terraform-provider-kiwi/kiwi"
"terraform-provider-misc/misc"

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

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

func main() {
providerserver.Serve(context.Background(), kiwi.New, providerserver.ServeOpts{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (
)

// NewOrderResource is a helper function to simplify the provider implementation.
func NewOrderResource() resource.Resource {
func NewClaimFromPoolResource() resource.Resource {
return &claimFromPool{}
}

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions kiwi/provider.go → misc/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type kiwiProvider struct{}

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

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

0 comments on commit 2bf4fcc

Please sign in to comment.