Skip to content

Commit 3e9d48f

Browse files
committed
initial version
1 parent 010be70 commit 3e9d48f

27 files changed

+358
-846
lines changed

.copywrite.hcl

-21
This file was deleted.

.github/CODEOWNERS

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
* @hashicorp/terraform-devex

.github/CODE_OF_CONDUCT.md

-5
This file was deleted.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2021 HashiCorp, Inc.
1+
Copyright (c) 2024 Mixpanel, Inc.
22

33
Mozilla Public License Version 2.0
44
==================================

README.md

-64
Original file line numberDiff line numberDiff line change
@@ -1,64 +0,0 @@
1-
# Terraform Provider Scaffolding (Terraform Plugin Framework)
2-
3-
_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._
4-
5-
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:
6-
7-
- A resource and a data source (`internal/provider/`),
8-
- Examples (`examples/`) and generated documentation (`docs/`),
9-
- Miscellaneous meta files.
10-
11-
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._
12-
13-
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.
14-
15-
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.
16-
17-
## Requirements
18-
19-
- [Terraform](https://developer.hashicorp.com/terraform/downloads) >= 1.0
20-
- [Go](https://golang.org/doc/install) >= 1.21
21-
22-
## Building The Provider
23-
24-
1. Clone the repository
25-
1. Enter the repository directory
26-
1. Build the provider using the Go `install` command:
27-
28-
```shell
29-
go install
30-
```
31-
32-
## Adding Dependencies
33-
34-
This provider uses [Go modules](https://github.com/golang/go/wiki/Modules).
35-
Please see the Go documentation for the most up to date information about using Go modules.
36-
37-
To add a new dependency `github.com/author/dependency` to your Terraform provider:
38-
39-
```shell
40-
go get github.com/author/dependency
41-
go mod tidy
42-
```
43-
44-
Then commit the changes to `go.mod` and `go.sum`.
45-
46-
## Using the provider
47-
48-
Fill this in for each provider
49-
50-
## Developing the Provider
51-
52-
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).
53-
54-
To compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
55-
56-
To generate or update documentation, run `go generate`.
57-
58-
In order to run the full suite of Acceptance tests, run `make testacc`.
59-
60-
*Note:* Acceptance tests create real resources, and often cost money to run.
61-
62-
```shell
63-
make testacc
64-
```

docs/data-sources/example.md

-30
This file was deleted.

docs/functions/example.md

-26
This file was deleted.

docs/index.md

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
---
22
# generated by https://github.com/hashicorp/terraform-plugin-docs
3-
page_title: "scaffolding Provider"
3+
page_title: "multirotate Provider"
44
subcategory: ""
55
description: |-
6-
6+
Multi Rotate Provider is a provider that allows you to easily rotate multiple instances of an object on a regular basis.
77
---
88

9-
# scaffolding Provider
10-
9+
# multirotate Provider
1110

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

1313
## Example Usage
1414

1515
```terraform
16-
provider "scaffolding" {
17-
# example configuration here
18-
}
16+
provider "multirotate" {}
1917
```
2018

2119
<!-- schema generated by tfplugindocs -->
2220
## Schema
23-
24-
### Optional
25-
26-
- `endpoint` (String) Example provider attribute

docs/resources/example.md

-31
This file was deleted.

docs/resources/set.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "multirotate_set Resource - multirotate"
4+
subcategory: ""
5+
description: |-
6+
This resource allows you to control a set of objects that are rotated on a regular basis.
7+
You can define the rotation period, as well as the number of objects to rotate.
8+
It will create an output list with creation/expiration times as well as which one is expiring the furthest out.
9+
---
10+
11+
# multirotate_set (Resource)
12+
13+
This resource allows you to control a set of objects that are rotated on a regular basis.
14+
You can define the rotation period, as well as the number of objects to rotate.
15+
It will create an output list with creation/expiration times as well as which one is expiring the furthest out.
16+
17+
## Example Usage
18+
19+
```terraform
20+
resource "multirotate_set" "token_rotation" {
21+
rotation_period = "24h"
22+
number = "2"
23+
}
24+
```
25+
26+
<!-- schema generated by tfplugindocs -->
27+
## Schema
28+
29+
### Required
30+
31+
- `rotation_period` (String) Rotation period as Go duration string
32+
33+
### Optional
34+
35+
- `number` (Number) Number of different values to rotate
36+
- `version` (String) Version of new rotations
37+
38+
### Read-Only
39+
40+
- `current_rotation` (Number) Current rotation index
41+
- `last_rotate` (String) Last rotation time
42+
- `rotation_set` (Attributes List) List of rotation set info (see [below for nested schema](#nestedatt--rotation_set))
43+
44+
<a id="nestedatt--rotation_set"></a>
45+
### Nested Schema for `rotation_set`
46+
47+
Read-Only:
48+
49+
- `creation` (String) Creation time
50+
- `expiration` (String) Expiration time
51+
- `version` (String) Version

examples/README.md

-9
This file was deleted.

examples/data-sources/scaffolding_example/data-source.tf

-3
This file was deleted.

examples/provider/provider.tf

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
provider "scaffolding" {
2-
# example configuration here
3-
}
1+
provider "multirotate" {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resource "multirotate_set" "token_rotation" {
2+
rotation_period = "24h"
3+
number = "2"
4+
}

examples/resources/scaffolding_example/resource.tf

-3
This file was deleted.

go.mod

+3-15
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
module github.com/hashicorp/terraform-provider-scaffolding-framework
1+
module github.com/mixpanel/terraform-provider-multirotate
22

33
go 1.21
44

55
require (
66
github.com/hashicorp/terraform-plugin-docs v0.19.4
77
github.com/hashicorp/terraform-plugin-framework v1.10.0
8-
github.com/hashicorp/terraform-plugin-go v0.23.0
98
github.com/hashicorp/terraform-plugin-log v0.9.0
10-
github.com/hashicorp/terraform-plugin-testing v1.9.0
119
)
1210

1311
require (
@@ -17,32 +15,27 @@ require (
1715
github.com/Masterminds/semver/v3 v3.2.0 // indirect
1816
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
1917
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
20-
github.com/agext/levenshtein v1.2.2 // indirect
2118
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
2219
github.com/armon/go-radix v1.0.0 // indirect
2320
github.com/bgentry/speakeasy v0.1.0 // indirect
2421
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
2522
github.com/cloudflare/circl v1.3.7 // indirect
2623
github.com/fatih/color v1.16.0 // indirect
2724
github.com/golang/protobuf v1.5.4 // indirect
28-
github.com/google/go-cmp v0.6.0 // indirect
2925
github.com/google/uuid v1.6.0 // indirect
3026
github.com/hashicorp/cli v1.1.6 // indirect
3127
github.com/hashicorp/errwrap v1.1.0 // indirect
3228
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
3329
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
34-
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
3530
github.com/hashicorp/go-hclog v1.6.3 // indirect
3631
github.com/hashicorp/go-multierror v1.1.1 // indirect
3732
github.com/hashicorp/go-plugin v1.6.0 // indirect
3833
github.com/hashicorp/go-uuid v1.0.3 // indirect
3934
github.com/hashicorp/go-version v1.7.0 // indirect
4035
github.com/hashicorp/hc-install v0.7.0 // indirect
41-
github.com/hashicorp/hcl/v2 v2.21.0 // indirect
42-
github.com/hashicorp/logutils v1.0.0 // indirect
4336
github.com/hashicorp/terraform-exec v0.21.0 // indirect
4437
github.com/hashicorp/terraform-json v0.22.1 // indirect
45-
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect
38+
github.com/hashicorp/terraform-plugin-go v0.23.0 // indirect
4639
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
4740
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
4841
github.com/hashicorp/yamux v0.1.1 // indirect
@@ -53,14 +46,11 @@ require (
5346
github.com/mattn/go-runewidth v0.0.9 // indirect
5447
github.com/mitchellh/copystructure v1.2.0 // indirect
5548
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
56-
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
57-
github.com/mitchellh/mapstructure v1.5.0 // indirect
5849
github.com/mitchellh/reflectwalk v1.0.2 // indirect
5950
github.com/oklog/run v1.0.0 // indirect
6051
github.com/posener/complete v1.2.3 // indirect
6152
github.com/shopspring/decimal v1.3.1 // indirect
6253
github.com/spf13/cast v1.5.0 // indirect
63-
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
6454
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
6555
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
6656
github.com/yuin/goldmark v1.7.1 // indirect
@@ -71,14 +61,12 @@ require (
7161
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
7262
golang.org/x/mod v0.17.0 // indirect
7363
golang.org/x/net v0.25.0 // indirect
74-
golang.org/x/sync v0.7.0 // indirect
7564
golang.org/x/sys v0.22.0 // indirect
7665
golang.org/x/text v0.16.0 // indirect
77-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
78-
google.golang.org/appengine v1.6.8 // indirect
7966
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
8067
google.golang.org/grpc v1.63.2 // indirect
8168
google.golang.org/protobuf v1.34.0 // indirect
69+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
8270
gopkg.in/yaml.v2 v2.3.0 // indirect
8371
gopkg.in/yaml.v3 v3.0.1 // indirect
8472
)

0 commit comments

Comments
 (0)