Skip to content
This repository was archived by the owner on Apr 18, 2020. It is now read-only.

Commit e82f1c8

Browse files
committed
Removed default for namespace variable
1 parent 858e9b4 commit e82f1c8

File tree

3 files changed

+39
-10
lines changed

3 files changed

+39
-10
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
terraform-aws-github-ci-0.4.1 (2017-04-01)
2+
3+
* Fixed #5: Removed default for namespace variable
4+
15
terraform-aws-github-ci-0.4.0 (2017-03-30)
26

37
* Refactored complete code base into TypeScript

README.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,16 @@ repository and apply the configuration from the root folder with:
5454

5555
``` bash
5656
terraform apply \
57+
-var namespace=<namespace> \
5758
-var github_owner=<owner> \
5859
-var github_repository=<repository> \
59-
-var github_oauth_token=<oauth-token> \
60-
-var namespace=<unique-identifier>
60+
-var github_oauth_token=<oauth-token>
6161
```
6262

6363
All resources are prefixed with the value specified as `namespace`. If the S3
6464
bucket name (see below) is not explicitly set, it's set to the given `namespace`
65-
which means there must not already exist and S3 bucket with the same name.
65+
which means there must not already exist an S3 bucket with the same name. This
66+
is a common source of error.
6667

6768
Now, when you push to `master`, or create a pull request, CodeBuild will
6869
automatically build the commit and report the status back to GitHub.
@@ -79,6 +80,7 @@ module "github_ci" {
7980
source = "github.com/squidfunk/terraform-aws-github-ci"
8081
version = "0.3.0"
8182
83+
namespace = "<namespace>"
8284
github_owner = "<owner>"
8385
github_repository = "<repository>"
8486
github_oauth_token = "<oauth-token>"
@@ -102,6 +104,11 @@ The following variables can be configured:
102104

103105
### Required
104106

107+
#### `namespace`
108+
109+
- **Description**: AWS resource namespace/prefix (lowercase alphanumeric)
110+
- **Default**: `none`
111+
105112
#### `github_owner`
106113

107114
- **Description**: GitHub repository owner
@@ -117,11 +124,6 @@ The following variables can be configured:
117124
- **Description**: GitHub OAuth token for repository access
118125
- **Default**: `none`
119126

120-
#### `namespace`
121-
122-
- **Description**: AWS resource namespace/prefix (lowercase alphanumeric)
123-
- **Default**: `"github-ci"`
124-
125127
### Optional
126128

127129
#### `github_reporter`
@@ -154,6 +156,30 @@ The following variables can be configured:
154156
- **Description**: S3 bucket to store status badge and artifacts
155157
- **Default**: `"github-ci"` (equal to namespace)
156158

159+
### Outputs
160+
161+
The following outputs are exported:
162+
163+
#### `codebuild_service_role_name`
164+
165+
- **Description**: CodeBuild service role name
166+
167+
#### `codebuild_service_role_arn`
168+
169+
- **Description**: CodeBuild service role ARN
170+
171+
#### `codebuild_bucket`
172+
173+
- **Description**: CodeBuild artifacts bucket name
174+
175+
#### `codebuild_badge_url`
176+
177+
- **Description**: CodeBuild status badge URL
178+
179+
#### `codebuild_url`
180+
181+
- **Description**: CodeBuild project URL
182+
157183
### Default project
158184

159185
If you need more control over the CodeBuild project, you can pass the name of
@@ -169,7 +195,7 @@ resource "aws_codebuild_project" "codebuild" {
169195
170196
source {
171197
type = "GITHUB"
172-
location = "..."
198+
location = "https://github.com/$${owner}/$${repository}.git"
173199
174200
auth {
175201
type = "OAUTH"

variables.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
# var.namespace
2626
variable "namespace" {
2727
description = "AWS resource namespace/prefix"
28-
default = "github-ci"
2928
}
3029

3130
# -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)