Skip to content

Commit

Permalink
docs: Documentation bug fixes in README snippets (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanskid authored Sep 20, 2024
1 parent 4010f00 commit 19c9720
Show file tree
Hide file tree
Showing 16 changed files with 371 additions and 348 deletions.
147 changes: 74 additions & 73 deletions modules/appgw/.header.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In order to use module `appgw`, you need to deploy `azurerm_resource_group` and
Then you can use below code as an example of calling module to create Application Gateway:

```hcl
# Create Application Gateay
# Create Application Gateway
module "appgw" {
source = "PaloAltoNetworks/swfw-modules/azurerm//modules/appgw"
Expand Down Expand Up @@ -79,6 +79,13 @@ appgws = {
port = 80
}
}
backend_settings = {
minimum = {
name = "http-backend"
port = 80
protocol = "Http"
}
}
rewrites = {
minimum = {
name = "minimum-set"
Expand All @@ -97,9 +104,9 @@ appgws = {
minimum = {
name = "minimum-rule"
priority = 1
backend = "minimum"
listener = "minimum"
rewrite = "minimum"
backend_key = "minimum"
listener_key = "minimum"
rewrite_key = "minimum"
}
}
}
Expand Down Expand Up @@ -129,13 +136,11 @@ appgws = {
capacity = {
static = 2
}
backends = {
backend_settings = {
existing = {
name = "http-backend"
port = 80
protocol = "Http"
timeout = 60
cookie_based_affinity = "Enabled"
}
}
listeners = {
Expand All @@ -162,9 +167,9 @@ appgws = {
existing = {
name = "existing-rule"
priority = 1
backend = "existing"
listener = "existing"
rewrite = "existing"
backend_key = "existing"
listener_key = "existing"
rewrite_key = "existing"
}
}
}
Expand Down Expand Up @@ -195,13 +200,11 @@ appgws = {
max = 20
}
}
backends = {
backend_settings = {
http = {
name = "http-backend"
port = 80
protocol = "Http"
timeout = 60
cookie_based_affinity = "Enabled"
}
}
listeners = {
Expand All @@ -214,8 +217,8 @@ appgws = {
http = {
name = "http-rule"
priority = 1
backend = "http"
listener = "http"
backend_key = "http"
listener_key = "http"
}
}
}
Expand Down Expand Up @@ -250,13 +253,11 @@ appgws = {
rule_set_type = "OWASP"
rule_set_version = "3.2"
}
backends = {
backend_settings = {
waf = {
name = "waf-backend"
port = 80
protocol = "Http"
timeout = 60
cookie_based_affinity = "Enabled"
}
}
listeners = {
Expand All @@ -283,9 +284,9 @@ appgws = {
minimum = {
name = "waf-rule"
priority = 1
backend = "waf"
listener = "waf"
rewrite = "waf"
backend_key = "waf"
listener_key = "waf"
rewrite_key = "waf"
}
}
}
Expand Down Expand Up @@ -342,9 +343,9 @@ appgws = {
capacity = {
static = 2
}
ssl_global = {
ssl_policy_type = "Predefined"
ssl_policy_name = "AppGwSslPolicy20170401"
global_ssl_policy = {
type = "Predefined"
name = "AppGwSslPolicy20170401"
}
ssl_profiles = {
profile1 = {
Expand All @@ -360,28 +361,28 @@ appgws = {
protocol = "Https"
ssl_profile_name = "appgw-ssl-profile1"
ssl_certificate_path = "./files/test1.pfx"
ssl_certificate_pass = ""
ssl_certificate_pass = "123abc"
host_names = ["test1.appgw.local"]
}
https2 = {
name = "https2-listener"
port = 443
protocol = "Https"
ssl_certificate_path = "./files/test2.pfx"
ssl_certificate_pass = ""
ssl_certificate_pass = "123abc"
host_names = ["test2.appgw.local"]
}
}
backend_pool = {
name = "vmseries-pool"
}
backends = {
backend_settings = {
https1 = {
name = "https1-settings"
port = 481
protocol = "Https"
timeout = 60
cookie_based_affinity = "Enabled"
use_cookie_based_affinity = true
hostname_from_backend = false
hostname = "test1.appgw.local"
root_certs = {
Expand All @@ -396,7 +397,7 @@ appgws = {
port = 482
protocol = "Https"
timeout = 60
cookie_based_affinity = "Enabled"
use_cookie_based_affinity = true
hostname_from_backend = false
hostname = "test2.appgw.local"
root_certs = {
Expand Down Expand Up @@ -453,16 +454,16 @@ appgws = {
https1 = {
name = "https1-rule"
priority = 2
backend = "https1"
listener = "https1"
rewrite = "https1"
backend_key = "https1"
listener_key = "https1"
rewrite_key = "https1"
}
https2 = {
name = "https2-rule"
priority = 3
backend = "https2"
listener = "https2"
rewrite = "https2"
backend_key = "https2"
listener_key = "https2"
rewrite_key = "https2"
}
}
}
Expand Down Expand Up @@ -498,10 +499,10 @@ appgws = {
capacity = {
static = 2
}
ssl_global = {
ssl_policy_type = "Custom"
ssl_policy_min_protocol_version = "TLSv1_0"
ssl_policy_cipher_suites = ["TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA", "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
global_ssl_policy = {
type = "Custom"
min_protocol_version = "TLSv1_0"
cipher_suites = ["TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA", "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", "TLS_DHE_DSS_WITH_AES_256_CBC_SHA", "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256",
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA", "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
Expand Down Expand Up @@ -583,21 +584,21 @@ appgws = {
backend_pool = {
name = "vmseries-pool"
}
backends = {
backend_settings = {
http = {
name = "http-settings"
port = 80
protocol = "Http"
timeout = 60
cookie_based_affinity = "Enabled"
probe = "http"
use_cookie_based_affinity = true
probe_key = "http"
}
https1 = {
name = "https1-settings"
port = 481
protocol = "Https"
timeout = 60
cookie_based_affinity = "Enabled"
use_cookie_based_affinity = true
hostname_from_backend = false
hostname = "test1.appgw.local"
root_certs = {
Expand All @@ -606,14 +607,14 @@ appgws = {
path = "./files/ca-cert1.pem"
}
}
probe = "https1"
probe_key = "https1"
}
https2 = {
name = "https2-settings"
port = 482
protocol = "Https"
timeout = 60
cookie_based_affinity = "Enabled"
use_cookie_based_affinity = true
hostname_from_backend = false
hostname = "test2.appgw.local"
root_certs = {
Expand All @@ -622,7 +623,7 @@ appgws = {
path = "./files/ca-cert2.pem"
}
}
probe = "https2"
probe_key = "https2"
}
}
probes = {
Expand Down Expand Up @@ -704,60 +705,60 @@ appgws = {
http = {
name = "http-rule"
priority = 1
backend = "http"
listener = "http"
rewrite = "http"
backend_key = "http"
listener_key = "http"
rewrite_key = "http"
}
https1 = {
name = "https1-rule"
priority = 2
backend = "https1"
listener = "https1"
rewrite = "https1"
backend_key = "https1"
listener_key = "https1"
rewrite_key = "https1"
}
https2 = {
name = "https2-rule"
priority = 3
backend = "https2"
listener = "https2"
rewrite = "https2"
backend_key = "https2"
listener_key = "https2"
rewrite_key = "https2"
}
redirect_listener = {
name = "redirect-listener-rule"
priority = 4
listener = "redirect_listener"
redirect = "redirect_listener"
listener_key = "redirect_listener"
redirect_key = "redirect_listener"
}
redirect_url = {
name = "redirect-url-rule"
priority = 5
listener = "redirect_url"
redirect = "redirect_url"
listener_key = "redirect_url"
redirect_key = "redirect_url"
}
path_based_backend = {
name = "path-based-backend-rule"
priority = 6
listener = "path_based_backend"
url_path_map = "path_based_backend"
listener_key = "path_based_backend"
url_path_map_key = "path_based_backend"
}
path_based_redirect_listener = {
name = "path-redirect-listener-rule"
priority = 7
listener = "path_based_redirect_listener"
url_path_map = "path_based_redirect_listener"
listener_key = "path_based_redirect_listener"
url_path_map_key = "path_based_redirect_listener"
}
path_based_redirect_url = {
name = "path-redirect-rul-rule"
priority = 8
listener = "path_based_redirect_url"
url_path_map = "path_based_redirect_url"
listener_key = "path_based_redirect_url"
url_path_map_key = "path_based_redirect_url"
}
}
redirects = {
redirect_listener = {
name = "listener-redirect"
type = "Permanent"
target_listener = "http"
target_listener_key = "http"
include_path = true
include_query_string = true
}
Expand All @@ -772,35 +773,35 @@ appgws = {
url_path_maps = {
path_based_backend = {
name = "backend-map"
backend = "http"
backend_key = "http"
path_rules = {
http = {
paths = ["/plaintext"]
backend = "http"
backend_key = "http"
}
https = {
paths = ["/secure"]
backend = "https1"
backend_key = "https1"
}
}
}
path_based_redirect_listener = {
name = "redirect-listener-map"
backend = "http"
backend_key = "http"
path_rules = {
http = {
paths = ["/redirect"]
redirect = "redirect_listener"
redirect_key = "redirect_listener"
}
}
}
path_based_redirect_url = {
name = "redirect-url-map"
backend = "http"
backend_key = "http"
path_rules = {
http = {
paths = ["/redirect"]
redirect = "redirect_url"
redirect_key = "redirect_url"
}
}
}
Expand Down
Loading

0 comments on commit 19c9720

Please sign in to comment.