Skip to content

Commit

Permalink
initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleap committed Jul 19, 2024
1 parent 175bbcc commit 8d5fece
Show file tree
Hide file tree
Showing 27 changed files with 358 additions and 846 deletions.
21 changes: 0 additions & 21 deletions .copywrite.hcl

This file was deleted.

1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
* @hashicorp/terraform-devex
5 changes: 0 additions & 5 deletions .github/CODE_OF_CONDUCT.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2021 HashiCorp, Inc.
Copyright (c) 2024 Mixpanel, Inc.

Mozilla Public License Version 2.0
==================================
Expand Down
64 changes: 0 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,64 +0,0 @@
# Terraform Provider Scaffolding (Terraform Plugin Framework)

_This template repository is built on the [Terraform Plugin Framework](https://github.com/hashicorp/terraform-plugin-framework). The template repository built on the [Terraform Plugin SDK](https://github.com/hashicorp/terraform-plugin-sdk) can be found at [terraform-provider-scaffolding](https://github.com/hashicorp/terraform-provider-scaffolding). See [Which SDK Should I Use?](https://developer.hashicorp.com/terraform/plugin/framework-benefits) in the Terraform documentation for additional information._

This repository is a *template* for a [Terraform](https://www.terraform.io) provider. It is intended as a starting point for creating Terraform providers, containing:

- A resource and a data source (`internal/provider/`),
- Examples (`examples/`) and generated documentation (`docs/`),
- Miscellaneous meta files.

These files contain boilerplate code that you will need to edit to create your own Terraform provider. Tutorials for creating Terraform providers can be found on the [HashiCorp Developer](https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework) platform. _Terraform Plugin Framework specific guides are titled accordingly._

Please see the [GitHub template repository documentation](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template) for how to create a new repository from this template on GitHub.

Once you've written your provider, you'll want to [publish it on the Terraform Registry](https://developer.hashicorp.com/terraform/registry/providers/publishing) so that others can use it.

## Requirements

- [Terraform](https://developer.hashicorp.com/terraform/downloads) >= 1.0
- [Go](https://golang.org/doc/install) >= 1.21

## Building The Provider

1. Clone the repository
1. Enter the repository directory
1. Build the provider using the Go `install` command:

```shell
go install
```

## Adding Dependencies

This provider uses [Go modules](https://github.com/golang/go/wiki/Modules).
Please see the Go documentation for the most up to date information about using Go modules.

To add a new dependency `github.com/author/dependency` to your Terraform provider:

```shell
go get github.com/author/dependency
go mod tidy
```

Then commit the changes to `go.mod` and `go.sum`.

## Using the provider

Fill this in for each provider

## Developing the Provider

If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (see [Requirements](#requirements) above).

To compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.

To generate or update documentation, run `go generate`.

In order to run the full suite of Acceptance tests, run `make testacc`.

*Note:* Acceptance tests create real resources, and often cost money to run.

```shell
make testacc
```
30 changes: 0 additions & 30 deletions docs/data-sources/example.md

This file was deleted.

26 changes: 0 additions & 26 deletions docs/functions/example.md

This file was deleted.

16 changes: 5 additions & 11 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "scaffolding Provider"
page_title: "multirotate Provider"
subcategory: ""
description: |-
Multi Rotate Provider is a provider that allows you to easily rotate multiple instances of an object on a regular basis.
---

# scaffolding Provider

# multirotate Provider

Multi Rotate Provider is a provider that allows you to easily rotate multiple instances of an object on a regular basis.

## Example Usage

```terraform
provider "scaffolding" {
# example configuration here
}
provider "multirotate" {}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `endpoint` (String) Example provider attribute
31 changes: 0 additions & 31 deletions docs/resources/example.md

This file was deleted.

51 changes: 51 additions & 0 deletions docs/resources/set.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "multirotate_set Resource - multirotate"
subcategory: ""
description: |-
This resource allows you to control a set of objects that are rotated on a regular basis.
You can define the rotation period, as well as the number of objects to rotate.
It will create an output list with creation/expiration times as well as which one is expiring the furthest out.
---

# multirotate_set (Resource)

This resource allows you to control a set of objects that are rotated on a regular basis.
You can define the rotation period, as well as the number of objects to rotate.
It will create an output list with creation/expiration times as well as which one is expiring the furthest out.

## Example Usage

```terraform
resource "multirotate_set" "token_rotation" {
rotation_period = "24h"
number = "2"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `rotation_period` (String) Rotation period as Go duration string

### Optional

- `number` (Number) Number of different values to rotate
- `version` (String) Version of new rotations

### Read-Only

- `current_rotation` (Number) Current rotation index
- `last_rotate` (String) Last rotation time
- `rotation_set` (Attributes List) List of rotation set info (see [below for nested schema](#nestedatt--rotation_set))

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

Read-Only:

- `creation` (String) Creation time
- `expiration` (String) Expiration time
- `version` (String) Version
9 changes: 0 additions & 9 deletions examples/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions examples/data-sources/scaffolding_example/data-source.tf

This file was deleted.

4 changes: 1 addition & 3 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
provider "scaffolding" {
# example configuration here
}
provider "multirotate" {}
4 changes: 4 additions & 0 deletions examples/resources/multirotate_set/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "multirotate_set" "token_rotation" {
rotation_period = "24h"
number = "2"
}
3 changes: 0 additions & 3 deletions examples/resources/scaffolding_example/resource.tf

This file was deleted.

18 changes: 3 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
module github.com/hashicorp/terraform-provider-scaffolding-framework
module github.com/mixpanel/terraform-provider-multirotate

go 1.21

require (
github.com/hashicorp/terraform-plugin-docs v0.19.4
github.com/hashicorp/terraform-plugin-framework v1.10.0
github.com/hashicorp/terraform-plugin-go v0.23.0
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-testing v1.9.0
)

require (
Expand All @@ -17,32 +15,27 @@ require (
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/cli v1.1.6 // indirect
github.com/hashicorp/errwrap v1.1.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-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hc-install v0.7.0 // indirect
github.com/hashicorp/hcl/v2 v2.21.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.21.0 // indirect
github.com/hashicorp/terraform-json v0.22.1 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.23.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
Expand All @@ -53,14 +46,11 @@ require (
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yuin/goldmark v1.7.1 // indirect
Expand All @@ -71,14 +61,12 @@ require (
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.34.0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 8d5fece

Please sign in to comment.