Skip to content

Instantly share code, notes, and snippets.

View zerolaser's full-sized avatar

Vamshi Krishna zerolaser

View GitHub Profile
@zerolaser
zerolaser / UpdateForkRepo.md
Created August 7, 2017 00:35 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
environments:
example:
pipelines:
- mypipe
pipelines:
mypipe: # definition of yaml-example pipeline
group: yamlexample
label_template: "${mygit[:8]}"
locking: off
materials:
2016-11-02 00:01:05,493 FATAL [qtp1334729950-32] Rails:? -
Java::JavaLang::RuntimeException (Object [com.thoughtworks.go.config.BasicEnvironmentConfig@4f37cc4f[name=COMMIT,variables=[],agents=[],pipelines=[],configErrors={},
origin=com.thoughtworks.go.config.remote.FileConfigOrigin@5b9b], com.thoughtworks.go.config.BasicEnvironmentConfig@3d1eb7f8[name=COMMIT,variables=[],agents=[],
pipelines=[com.thoughtworks.go.config.EnvironmentPipelineConfig@fc76666a],configErrors={},origin=git@git.company.net:user/gocd-yaml-config.git at d55fa535f4b891cccc18bf3f8f2c77f22101102]]
does not have a ConfigTag):
group_name="app_admin"
iam_path="/"
policy_arn="arn:aws:iam::aws:policy/ReadOnlyAccess"
variable "group_name" {
type = "string"
description ="Name of the IAM group"
}
variable "iam_path" {
type = "string"
default = "/"
description = "path where you want to create the IAM resource"
}
panic: policy_arn is not a map, this is a bug in Terraform.
goroutine 1 [running]:
panic(0x2713440, 0xc420395850)
/opt/go/src/runtime/panic.go:500 +0x1a1
github.com/hashicorp/terraform/terraform.varSetMap(0xc420389ce0, 0xc4202d62e0, 0xa, 0x2713440, 0xc4202d67e0)
/opt/gopath/src/github.com/hashicorp/terraform/terraform/variables.go:143 +0x34a
github.com/hashicorp/terraform/terraform.Variables(0xc4202d5a90, 0xc4202a8cc0, 0xc420389cb0, 0x0, 0xc420389cb0)
/opt/gopath/src/github.com/hashicorp/terraform/terraform/variables.go:108 +0x375
github.com/hashicorp/terraform/terraform.NewContext(0xc4202c2d80, 0x0, 0x0, 0x452d400)
resource "aws_iam_user_policy" "policy" {
name = "${var.user}_policy"
user = "${aws_iam_user.user.name}"
policy = "${file("policy.json")}"
}
#add new user
resource "aws_iam_user" "user" {
name = "${var.user}"
path ="/"