Skip to content

Commit

Permalink
Merge pull request #13 from lgallard/feature/update-examples
Browse files Browse the repository at this point in the history
Update examples & README
  • Loading branch information
lgallard authored Mar 18, 2021
2 parents dfe3549 + 1744751 commit bc8de7b
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.5.1 (March 18, 2021)

ENHANCEMENTS:

* Update examples & README

## 0.5.0 (March 18, 2021)

FEATURES:
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,23 @@ module "myapp-project" {
}
}
# Secondary Sources (optional)
codebuild_secondary_sources = [
{
type = "GITHUB"
location = "https://github.com/myprofile/myproject-1.git"
source_identifier = "my_awesome_project1"
},
{
type = "GITHUB"
location = "https://github.com/myprofile/myproject-2.git"
git_clone_depth = 1
source_identifier = "my_awesome_project2"
report_build_status = true
insecure_ssl = true
}
]
# Environment
environment = {
compute_type = "BUILD_GENERAL1_SMALL"
Expand Down
2 changes: 1 addition & 1 deletion examples/codebuild_using_objects/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module "myapp-project" {
}
}

# Secondary Sources
# Secondary Sources (optional)
codebuild_secondary_sources = [
{
type = "GITHUB"
Expand Down
29 changes: 23 additions & 6 deletions examples/codebuild_using_objects_vpc/main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# CodeBuild
module "myapp-project" {
module "myapp-project-vpc" {

source = "git::https://github.com/lgallard/terraform-aws-codebuild.git"
source = "lgallard/codebuild/aws"

name = "my-app"
description = "Codebuild for deploying myapp"
name = "my-app-vpc"
description = "Codebuild for deploying myapp in a VPC"

codebuild_source_version = "master"
codebuild_source = {
Expand All @@ -17,6 +17,23 @@ module "myapp-project" {
}
}

# Secondary Sources (optional)
codebuild_secondary_sources = [
{
type = "GITHUB"
location = "https://github.com/myprofile/myproject-1.git"
source_identifier = "my_awesome_project1"
},
{
type = "GITHUB"
location = "https://github.com/myprofile/myproject-2.git"
git_clone_depth = 1
source_identifier = "my_awesome_project2"
report_build_status = true
insecure_ssl = true
}
]

environment = {
compute_type = "BUILD_GENERAL1_SMALL"
image = "aws/codebuild/standard:2.0"
Expand All @@ -27,11 +44,11 @@ module "myapp-project" {
variables = [
{
name = "REGISTRY_URL"
value = "012345678910.dkr.ecr.us-east-1.amazonaws.com/my-ecr"
value = "012345678910.dkr.ecr.us-west-1.amazonaws.com/my-ecr"
},
{
name = "AWS_DEFAULT_REGION"
value = "us-east-1"
value = "us-west-1"
},
]
}
Expand Down
8 changes: 4 additions & 4 deletions examples/codebuild_using_variables/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CodeBuild
module "myapp-project" {
module "myapp-project-var" {

source = "git::https://github.com/lgallard/terraform-aws-codebuild.git"
source = "lgallard/codebuild/aws"

name = "my-app-var"
description = "Codebuild for deploying myapp (variables)"
Expand All @@ -24,11 +24,11 @@ module "myapp-project" {
environment_variables = [
{
name = "REGISTRY_URL"
value = "012345678910.dkr.ecr.us-east-1.amazonaws.com/my-ecr"
value = "012345678910.dkr.ecr.us-west-1.amazonaws.com/my-ecr"
},
{
name = "AWS_DEFAULT_REGION"
value = "us-east-1"
value = "us-west-1"
},
]

Expand Down

0 comments on commit bc8de7b

Please sign in to comment.