-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:authlete/terraformer
- Loading branch information
Showing
64 changed files
with
2,335 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2022 The Terraformer Authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
package cmd | ||
|
||
import ( | ||
honeycombio_terraforming "github.com/GoogleCloudPlatform/terraformer/providers/honeycombio" | ||
|
||
"github.com/GoogleCloudPlatform/terraformer/terraformutils" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func newCmdHoneycombioImporter(options ImportOptions) *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "honeycombio", | ||
Short: "Import current state to Terraform configuration from Honeycomb.io", | ||
Long: "Import current state to Terraform configuration from Honeycomb.io", | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
provider := newHoneycombProvider() | ||
err := Import(provider, options, options.Projects) | ||
if err != nil { | ||
return err | ||
} | ||
return nil | ||
}, | ||
} | ||
|
||
cmd.AddCommand(listCmd(newHoneycombProvider())) | ||
baseProviderFlags(cmd.PersistentFlags(), &options, "derived_column,board", "board=id1,id2") | ||
cmd.PersistentFlags().StringSliceVarP(&options.Projects, "datasets", "", []string{}, "hello-service,goodbye-service") | ||
|
||
return cmd | ||
} | ||
|
||
func newHoneycombProvider() terraformutils.ProviderGenerator { | ||
return &honeycombio_terraforming.HoneycombProvider{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package cmd | ||
|
||
import ( | ||
myrasec_terraforming "github.com/GoogleCloudPlatform/terraformer/providers/myrasec" | ||
"github.com/GoogleCloudPlatform/terraformer/terraformutils" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// | ||
// newCmdMyrasecImporter | ||
// | ||
func newCmdMyrasecImporter(options ImportOptions) *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "myrasec", | ||
Short: "Import current state to Terraform configuration from Myra Security", | ||
Long: "Import current state to Terraform configuration from Myra Security", | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
provider := newMyrasecProvider() | ||
err := Import(provider, options, []string{}) | ||
if err != nil { | ||
return err | ||
} | ||
return nil | ||
}, | ||
} | ||
|
||
cmd.AddCommand(listCmd(newMyrasecProvider())) | ||
baseProviderFlags(cmd.PersistentFlags(), &options, "domain", "") | ||
return cmd | ||
} | ||
|
||
// | ||
// newMyrasecProvider | ||
// | ||
func newMyrasecProvider() terraformutils.ProviderGenerator { | ||
return &myrasec_terraforming.MyrasecProvider{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
### Use with Honeycomb.io | ||
|
||
Example: | ||
|
||
``` | ||
export HONEYCOMB_API_KEY=MYAPIKEY | ||
./terraformer import honeycombio --resources=board,trigger | ||
``` | ||
|
||
List of supported Honeycomb resources: | ||
|
||
* `board` | ||
* `honeycombio_board` | ||
* `honeycombio_query` | ||
* `honeycombio_query_annotation` | ||
* `derived_column` | ||
* `honeycombio_derived_column` | ||
* `trigger` | ||
* `honeycombio_trigger` | ||
* `honeycombio_query` | ||
* `slo` | ||
* `honeycombio_slo` | ||
* `honeycombio_burn_alert` | ||
* `honeycombio_derived_column` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
### Use with Myra Security | ||
|
||
Example using a Myra Security API Key and corresponding Token: | ||
|
||
``` | ||
export MYRASEC_API_SECRET=[MYRASEC_API_SECRET] | ||
export MYRASEC_API_TOKEN=[MYRASEC_API_TOKEN] | ||
./terraformer import myrasec --resources=domain | ||
``` | ||
|
||
List of supported Myra Security services: | ||
* `domain` | ||
* `myrasec_domain` | ||
* `dns` | ||
* `myrasec_dns_record` | ||
* `redirect` | ||
* `myrasec_redirect` | ||
* `cache_setting` | ||
* `myrasec_cache_setting` | ||
* `ratelimit` | ||
* `myrasec_ratelimit` | ||
* `ip_filter` | ||
* `myrasec_ip_filter` | ||
* `settings` | ||
* `myrasec_settings` | ||
* `waf_rule` | ||
* `myrasec_waf_rule` | ||
* `maintenance` | ||
* `myrasec_maintenance` | ||
* `error_page` | ||
* `myrasec_error_page` |
Oops, something went wrong.