Skip to content

Commit 0ad541b

Browse files
authored
feat: Incorporating user feedback on the Getting Started guide (#3648)
* wip: Incorporating user feedback on the Getting Started guide * feat: Cleaning up Getting Started guide leveraging user feedback * feat: Improving `tfpath` docs * fix: Markdown linting * fix: Make sure the VPCs are unique * fix: Switching to serial subtests for docs test instead of parallel tests * fix: Seeing if this lets me provision the test examples faster * fix: Update docs to not provision nat gateway to save time
1 parent 521d95f commit 0ad541b

File tree

61 files changed

+1098
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1098
-26
lines changed

docs/_docs/01_getting-started/overview.md

Lines changed: 113 additions & 16 deletions

docs/_docs/01_getting-started/quick-start.md

Lines changed: 13 additions & 6 deletions

docs/_docs/01_getting-started/terminology.md

Lines changed: 24 additions & 2 deletions

docs/_docs/04_reference/cli-options.md

Lines changed: 9 additions & 2 deletions
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "content" {}
2+
3+
resource "local_file" "file" {
4+
content = var.content
5+
filename = "${path.module}/hi.txt"
6+
}

test/fixtures/docs/01-quick-start/step-01.1/foo/terragrunt.hcl

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resource "local_file" "file" {
2+
content = "Hello, World!"
3+
filename = "${path.module}/hi.txt"
4+
}

test/fixtures/docs/01-quick-start/step-01/foo/terragrunt.hcl

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "content" {}
2+
3+
resource "local_file" "file" {
4+
content = var.content
5+
filename = "${path.module}/hi.txt"
6+
}

test/fixtures/docs/01-quick-start/step-02/bar/terragrunt.hcl

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "content" {}
2+
3+
resource "local_file" "file" {
4+
content = var.content
5+
filename = "${path.module}/hi.txt"
6+
}

test/fixtures/docs/01-quick-start/step-02/foo/terragrunt.hcl

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
variable "content" {}
2+
3+
module "shared" {
4+
source = "../shared"
5+
6+
content = var.content
7+
}

test/fixtures/docs/01-quick-start/step-03/bar/terragrunt.hcl

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
variable "content" {}
2+
3+
module "shared" {
4+
source = "../shared"
5+
6+
content = var.content
7+
}

test/fixtures/docs/01-quick-start/step-03/foo/terragrunt.hcl

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "content" {}
2+
3+
resource "local_file" "file" {
4+
content = var.content
5+
filename = "${path.module}/hi.txt"
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.terragrunt-cache
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
source = "../shared"
3+
}
4+
5+
inputs = {
6+
content = "Hello from bar, Terragrunt!"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
source = "../shared"
3+
}
4+
5+
inputs = {
6+
content = "Hello from foo, Terragrunt!"
7+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "content" {}
2+
3+
resource "local_file" "file" {
4+
content = var.content
5+
filename = "${path.module}/hi.txt"
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.terragrunt-cache
Lines changed: 1 addition & 0 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
source = "../shared"
3+
}
4+
5+
inputs = {
6+
content = "Hello from bar, Terragrunt!"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
source = "../shared"
3+
}
4+
5+
inputs = {
6+
content = "Hello from foo, Terragrunt!"
7+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "content" {}
2+
3+
resource "local_file" "file" {
4+
content = var.content
5+
filename = "${path.module}/hi.txt"
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.terragrunt-cache
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
terraform {
2+
source = "../shared"
3+
}
4+
5+
dependency "foo" {
6+
config_path = "../foo"
7+
}
8+
9+
inputs = {
10+
content = "Foo content: ${dependency.foo.outputs.content}"
11+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
source = "../shared"
3+
}
4+
5+
inputs = {
6+
content = "Hello from foo, Terragrunt!"
7+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "content" {}
2+
3+
resource "local_file" "file" {
4+
content = var.content
5+
filename = "${path.module}/hi.txt"
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "content" {
2+
value = local_file.file.content
3+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.terragrunt-cache
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
terraform {
2+
source = "../shared"
3+
}
4+
5+
dependency "foo" {
6+
config_path = "../foo"
7+
8+
mock_outputs = {
9+
content = "Mocked content from foo"
10+
}
11+
12+
mock_outputs_allowed_terraform_commands = ["plan"]
13+
}
14+
15+
inputs = {
16+
content = "Foo content: ${dependency.foo.outputs.content}"
17+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
source = "../shared"
3+
}
4+
5+
inputs = {
6+
content = "Hello from foo, Terragrunt!"
7+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "content" {}
2+
3+
resource "local_file" "file" {
4+
content = var.content
5+
filename = "${path.module}/hi.txt"
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "content" {
2+
value = local_file.file.content
3+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.terragrunt-cache
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
terraform {
2+
source = "../shared"
3+
}
4+
5+
dependency "foo" {
6+
config_path = "../foo"
7+
8+
mock_outputs = {
9+
content = "Mocked content from foo"
10+
}
11+
}
12+
13+
inputs = {
14+
content = "Foo content: ${dependency.foo.outputs.content}"
15+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
source = "../shared"
3+
}
4+
5+
inputs = {
6+
content = "Hello from foo, Terragrunt!"
7+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "content" {}
2+
3+
resource "local_file" "file" {
4+
content = var.content
5+
filename = "${path.module}/hi.txt"
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "content" {
2+
value = local_file.file.content
3+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Configure the remote backend
2+
remote_state {
3+
backend = "s3"
4+
5+
generate = {
6+
path = "backend.tf"
7+
if_exists = "overwrite_terragrunt"
8+
}
9+
10+
config = {
11+
bucket = "__FILL_IN_BUCKET_NAME__"
12+
13+
key = "tofu.tfstate"
14+
region = "__FILL_IN_REGION__"
15+
encrypt = true
16+
dynamodb_table = "__FILL_IN_LOCK_TABLE_NAME__"
17+
}
18+
}
19+
20+
# Configure the AWS provider
21+
generate "provider" {
22+
path = "provider.tf"
23+
if_exists = "overwrite_terragrunt"
24+
contents = <<EOF
25+
provider "aws" {
26+
region = "__FILL_IN_REGION__"
27+
}
28+
EOF
29+
}
30+
31+
# Configure the module
32+
#
33+
# The URL used here is a shorthand for
34+
# "tfr://registry.terraform.io/terraform-aws-modules/vpc/aws?version=5.16.0".
35+
#
36+
# You can find the module at:
37+
# https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws/latest
38+
#
39+
# Note the extra `/` after the `tfr` protocol is required for the shorthand
40+
# notation.
41+
terraform {
42+
source = "tfr:///terraform-aws-modules/vpc/aws?version=5.16.0"
43+
}
44+
45+
# Configure the inputs for the module
46+
inputs = {
47+
name = "step-one-vpc"
48+
cidr = "10.0.0.0/16"
49+
50+
azs = ["us-east-1a", "us-east-1b", "us-east-1c"]
51+
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
52+
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
53+
54+
enable_nat_gateway = false
55+
enable_vpn_gateway = false
56+
57+
tags = {
58+
IaC = "true"
59+
Environment = "dev"
60+
}
61+
}
62+

0 commit comments

Comments
 (0)