@@ -54,15 +54,16 @@ repository and apply the configuration from the root folder with:
5454
5555``` bash
5656terraform 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
6363All resources are prefixed with the value specified as ` namespace ` . If the S3
6464bucket 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
6768Now, when you push to ` master ` , or create a pull request, CodeBuild will
6869automatically 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
159185If 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"
0 commit comments