Skip to content

Instantly share code, notes, and snippets.

View dcaponi's full-sized avatar

Dominick Caponi dcaponi

View GitHub Profile
@dcaponi
dcaponi / linux_commands.md
Created May 15, 2020 18:28
Linux Commands

#Linux Commands

Simple Stuff

grep - search for a string

search for word "stuff" in a file called filename and returns all lines with the word "stuff"

grep "stuff" filename.ext

@dcaponi
dcaponi / remove_tags.bash
Created May 15, 2020 18:27
Reset all tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@dcaponi
dcaponi / main.tf
Last active May 4, 2020 14:53
example hcl
provider "onelogin" {
client_id = "xxxxxxxxxxxxxxxxxxxx"
client_secret = "xxxxxxxxxxxxxxxxxxxx"
url = "https://api.us.onelogin.com"
}
resource "onelogin_saml_apps" "aws-sample-1"{
connector_id = 50534
name = "AWS Multi Role - Terraform change"
description = "AWS Multi Role app created via Terraform"
@dcaponi
dcaponi / app.json
Last active May 4, 2020 14:53
apps example
{
"updated_at": "2020-05-02T16:17:18Z",
"auth_method": 0,
"icon_url": "https://cdn.something.net/images/icons/square/5558229540474713/my_icon.png?1427294311",
"connector_id": 20938,
"role_ids": [],
"id": 1023060,
"name": "fit bit company portal",
"created_at": "2020-05-02T16:17:18Z",
"notes": "",
@dcaponi
dcaponi / main.tf
Last active May 4, 2020 14:51
example hcl file
provider "onelogin" {
client_id = "xxxxxxxxxxxxxxxxxxxx"
client_secret = "xxxxxxxxxxxxxxxxxxxx"
url = "https://api.us.onelogin.com"
}
resource "onelogin_saml_apps" "aws-console"{
connector_id = 50534
name = "AWS Multi Role App"
description = "AWS Multi Role app created via Terraform"
@dcaponi
dcaponi / provider_test.go
Created May 2, 2020 22:17
tf provider test
package onelogin
import (
"errors"
"os"
"testing"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)
@dcaponi
dcaponi / apps_test.go
Created May 2, 2020 22:13
tf test example
package onelogin
import (
"testing"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)
func TestAccApp_crud(t *testing.T) {
base := GetFixture("onelogin_app_example.tf", t)
@dcaponi
dcaponi / main.go
Last active May 2, 2020 21:11
tf boilerplate
package main
import (
"github.com/hashicorp/terraform-plugin-sdk/plugin"
"github.com/onelogin/onelogin-terraform-provider/onelogin"
)
func main() {
plugin.Serve(&plugin.ServeOpts{
ProviderFunc: onelogin.Provider,
@dcaponi
dcaponi / gist:12084d3b8fa8160a4cec56ef0badc6ab
Created April 28, 2020 19:21
Output from TF refresh - search for "READ STARTS HERE"
OUTPUT FROM TERRAFORM REFRESH
2020/04/28 12:19:00 [INFO] Terraform version: 0.12.24
2020/04/28 12:19:00 [INFO] Go runtime version: go1.13.8
2020/04/28 12:19:00 [INFO] CLI args: []string{"/usr/local/bin/terraform", "refresh"}
2020/04/28 12:19:00 [DEBUG] Attempting to open CLI config file: /Users/dominickcaponi/.terraformrc
2020/04/28 12:19:00 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/04/28 12:19:00 [DEBUG] checking for credentials in "/Users/dominickcaponi/.terraform.d/plugins"
2020/04/28 12:19:00 [DEBUG] checking for credentials in "/Users/dominickcaponi/.terraform.d/plugins/darwin_amd64"
2020/04/28 12:19:00 [INFO] CLI command args: []string{"refresh"}
# onelogin_apps.basic will be created
+ resource "onelogin_apps" "basic" {
+ allow_assumed_signin = false
2020/04/28 12:16:47 [DEBUG] command: asking for input: "Do you want to perform these actions?"
+ auth_method = (known after apply)
+ connector_id = 20938
+ created_at = (known after apply)
+ icon_url = (known after apply)
+ id = (known after apply)
+ name = "Form-Based fff"