Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ First, you'll need to create the new ECR repository.

1. Create a new branch on your infrastructure-live repository: `git checkout -b simple-web-app-repo`.
1. Open [`repos.yml` in
`shared/us-west-2/_regional/ecr-repos`](https://github.com/gruntwork-io/terraform-aws-service-catalog/tree/master/examples/for-production/infrastructure-live/shared/us-west-2/_regional/ecr-repos/repos.yml) and
add the desired repository name of your app. For the purposes of our example, let's call
ours `simple-web-app`:
`shared/us-west-2/_regional/ecr-repos`](https://github.com/gruntwork-io/terraform-aws-service-catalog/tree/master/examples/for-production/infrastructure-live/shared/us-west-2/_regional/ecr-repos/repos.yml) and
add the desired repository name of your app. For the purposes of our example, let's call
ours `simple-web-app`:

```yaml
simple-web-app:
external_account_ids_with_read_access:
```yaml
simple-web-app:
external_account_ids_with_read_access:
# NOTE: we have to comment out the directives so that the python based data merger (see the `merge-data` hook under
# blueprints in this repository) can parse this yaml file. This still works when feeding through templatefile, as it
# will interleave blank comments with the list items, which yaml handles gracefully.
# %{ for account in accounts }
- '${account}'
# %{ endfor }
external_account_ids_with_write_access: []
tags: {}
enable_automatic_image_scanning: true
```
- "${account}"
# %{ endfor }
external_account_ids_with_write_access: []
tags: {}
enable_automatic_image_scanning: true
```

1. Commit and push the change:

```bash
git add shared/us-west-2/shared/data-stores/ecr-repos/terragrunt.hcl && git commit -m 'Added simple-web-app repo' && git push
```
```bash
git add shared/us-west-2/shared/data-stores/ecr-repos/terragrunt.hcl && git commit -m 'Added simple-web-app repo' && git push
```

1. Now open a pull request on the `simple-web-app-repo` branch.

Expand All @@ -51,7 +51,7 @@ docker tag simple-web-app:latest 234567890123.dkr.ecr.us-west-2.amazonaws.com/si
Next, authenticate your Docker client with ECR in the shared-services account:

```bash
aws ecr get-login-password --region "us-west-2" | docker login --username AWS --password-stdin 234567890123.dkr.ecr.us-east-1.amazonaws.com
aws ecr get-login-password --region "us-west-2" | docker login --username AWS --password-stdin 234567890123.dkr.ecr.us-west-2.amazonaws.com
```

And finally, push your newly tagged image to publish it:
Expand Down
2 changes: 1 addition & 1 deletion _docs-sources/guides/working-with-code/forking.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ so you’ll want to pull in these updates as quickly as you can.

## How to use your forked code

Once you’ve forked the code, using it in is very similar to what is outlined in [Using Terraform Modules](/docs/intro/first-deployment/using-terraform-modules), except for the following differences:
Once you’ve forked the code, using it is very similar to what is outlined in [Using Terraform Modules](/docs/intro/first-deployment/using-terraform-modules), except for the following differences:

1. Point the `source` URLs of your Terraform modules to your own Git repos, rather than the `gruntwork-io` GitHub org.
2. Point the `--repo` parameter of `gruntwork-install` to your own Git repos, rather than the `gruntwork-io` GitHub org.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ First, you'll need to create the new ECR repository.

1. Create a new branch on your infrastructure-live repository: `git checkout -b simple-web-app-repo`.
1. Open [`repos.yml` in
`shared/us-west-2/_regional/ecr-repos`](https://github.com/gruntwork-io/terraform-aws-service-catalog/tree/master/examples/for-production/infrastructure-live/shared/us-west-2/_regional/ecr-repos/repos.yml) and
add the desired repository name of your app. For the purposes of our example, let's call
ours `simple-web-app`:
`shared/us-west-2/_regional/ecr-repos`](https://github.com/gruntwork-io/terraform-aws-service-catalog/tree/master/examples/for-production/infrastructure-live/shared/us-west-2/_regional/ecr-repos/repos.yml) and
add the desired repository name of your app. For the purposes of our example, let's call
ours `simple-web-app`:

```yaml
simple-web-app:
external_account_ids_with_read_access:
```yaml
simple-web-app:
external_account_ids_with_read_access:
# NOTE: we have to comment out the directives so that the python based data merger (see the `merge-data` hook under
# blueprints in this repository) can parse this yaml file. This still works when feeding through templatefile, as it
# will interleave blank comments with the list items, which yaml handles gracefully.
# %{ for account in accounts }
- '${account}'
# %{ endfor }
external_account_ids_with_write_access: []
tags: {}
enable_automatic_image_scanning: true
```
- "${account}"
# %{ endfor }
external_account_ids_with_write_access: []
tags: {}
enable_automatic_image_scanning: true
```

1. Commit and push the change:

```bash
git add shared/us-west-2/shared/data-stores/ecr-repos/terragrunt.hcl && git commit -m 'Added simple-web-app repo' && git push
```
```bash
git add shared/us-west-2/shared/data-stores/ecr-repos/terragrunt.hcl && git commit -m 'Added simple-web-app repo' && git push
```

1. Now open a pull request on the `simple-web-app-repo` branch.

Expand All @@ -51,7 +51,7 @@ docker tag simple-web-app:latest 234567890123.dkr.ecr.us-west-2.amazonaws.com/si
Next, authenticate your Docker client with ECR in the shared-services account:

```bash
aws ecr get-login-password --region "us-west-2" | docker login --username AWS --password-stdin 234567890123.dkr.ecr.us-east-1.amazonaws.com
aws ecr get-login-password --region "us-west-2" | docker login --username AWS --password-stdin 234567890123.dkr.ecr.us-west-2.amazonaws.com
```

And finally, push your newly tagged image to publish it:
Expand All @@ -62,5 +62,5 @@ docker push 234567890123.dkr.ecr.us-west-2.amazonaws.com/simple-web-app:v1


<!-- ##DOCS-SOURCER-START
{"sourcePlugin":"local-copier","hash":"4e7ca8a7e4911b5a9e0e63182b09cffc"}
{"sourcePlugin":"local-copier","hash":"4847ef3d9ebb1415b0f6a8ce36bfdb28"}
##DOCS-SOURCER-END -->
4 changes: 2 additions & 2 deletions docs/guides/working-with-code/forking.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ so you’ll want to pull in these updates as quickly as you can.

## How to use your forked code

Once you’ve forked the code, using it in is very similar to what is outlined in [Using Terraform Modules](/docs/intro/first-deployment/using-terraform-modules), except for the following differences:
Once you’ve forked the code, using it is very similar to what is outlined in [Using Terraform Modules](/docs/intro/first-deployment/using-terraform-modules), except for the following differences:

1. Point the `source` URLs of your Terraform modules to your own Git repos, rather than the `gruntwork-io` GitHub org.
2. Point the `--repo` parameter of `gruntwork-install` to your own Git repos, rather than the `gruntwork-io` GitHub org.
Expand All @@ -56,5 +56,5 @@ bans all outside sources, then follow the instructions above to fork the code, a


<!-- ##DOCS-SOURCER-START
{"sourcePlugin":"local-copier","hash":"aa5e9f290e27513b656e9bfaee4c4fa8"}
{"sourcePlugin":"local-copier","hash":"97914adc87d6c65cb7c00383378e43b2"}
##DOCS-SOURCER-END -->