Skip to content

docs(terraform): rewrite the samples for provider v2.10.0 - #2557

Merged
bruno-andrade-azion merged 6 commits into
mainfrom
docs/terraform-v2-samples-mm-16216
Nov 11, 2026
Merged

bruno-andrade-azion merged 6 commits into
mainfrom
docs/terraform-v2-samples-mm-16216

Conversation

@bruno-andrade-azion

@bruno-andrade-azion bruno-andrade-azion commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What & why

Related issue: MM-16216

Pages affected: 14 pages, in both languages (28 files), under apps/docs/src/content/docs/{en,pt-br}/pages/:

  • devtools/terraform/: terraform.mdx, how-it-works.mdx, examples.mdx, troubleshooting.mdx, terraformV3.mdx
  • devtools/terraform/guides/: getting-started.mdx, best-practices.mdx, migration-v3-to-v4.mdx
  • devtools/terraform/resources/: applications.mdx, certificates.mdx, connectors.mdx, security.mdx, workloads.mdx
  • secure-journey/automate/terraform.mdx (secure-jornada/automatizar/terraform.mdx in Portuguese)

The samples. Every Terraform HCL sample is rewritten for the nested schema of aziontech/azion 2.10.0, and every page pins that version. On main, 76 of the 88 samples fail terraform validate. Samples that are wrong on purpose or depend on files outside the page carry an MDX comment, {/* terraform-validate: skip */}, that the markdown twin drops:

  • the v1.x "before" blocks in the migration guide;
  • the three fences of the v1.x page;
  • two certificate samples that read PEM files with file();
  • one call to a local module in the best practices.

The IDs in the domain-to-workload migration pair come from variables instead of literals.

The resource catalog.

  • The names of resources and data sources match the provider documentation of 2.10.0. Examples are azion_application_function_instance(s), azion_firewall_function_instance and azion_firewall_functions_instance, and azion_applications_main_settings.
  • azion_workload binds its application only through azion_workload_deployment, in deployment.strategy.attributes.application.
  • Certificates gain azion_certificate_request, azion_certificate_signing_request, and azion_crl. The resources and data sources page gains Object Storage and Data Stream.

WAF. The pages use the platform's name for the object, a rule set, which Azion Console lists under WAF Rules and the provider manages as azion_waf. azion_waf_rule_set is a WAF exception. The migration guide now maps the v1.x azion_waf_rule_set, which was the rule set itself, to azion_waf, and its azion_waf_rule_sets data source to azion_wafs. It lists the v2 azion_waf_rule_set with the resources that v2 adds. The state and import steps cover the rule set, and the WAF mode moves to the set_waf behavior of a firewall rule.

Migration guide.

  • azion_environment_variable and its data source move to Removed, because v2 has no such resource. So does the azion_waf_domains data source.
  • The resources added after 2.0.0 are listed under "Resources added in v2".
  • The two rule order resources take their arguments at the top level, so the nested-block rule applies to the resources with a v1.x counterpart.

How the provider applies a configuration. how-it-works gains "Configuration is the desired state". An omitted field that a resource enforces returns to its default on apply. An omitted field that it does not enforce, such as domains on azion_workload, keeps the value that the API holds. This follows the "Configuration is the desired state" and "Drift and enforcement" notes of each resource in the provider documentation.

How I checked it.

  • pnpm lint:terraform, from chore(scripts): add pnpm lint:terraform to validate Terraform samples #2637, which adds the validator, reported 70 of 70 samples valid against 2.10.0 and 22 skipped by marker. It was not run again after the review fixes, which changed the migration pair, one IP range in the examples, and code comments.
  • Internal links: 0 broken, 0 cross-language. The en and pt-br code blocks are identical. The headings and table rows match across each pair, and so do the namespaces.
  • Every value that the schema does not enumerate appears in the provider's own documentation for 2.10.0. Examples are http, force_https, blocking, any_url, generic, set_connector, bypass_cache, deny, deliver, honor, override, and default.

Not verified.

  • No sample was applied against an Azion account. That is MM-16196, which this pull request unblocks.
  • pnpm build:local was not run locally.
  • For the DevTools reviewer (MM-16194):
    • Confirm the v1 to v2 mappings cname_access_only = false → workload_domain_allow_access = true and origin_protocol → transport_policy.
    • Confirm that the top-level id of azion_network_list is the ID that is_in_list expects.

Out of scope:

  • The import sections of the migration guide for the renamed application resources.
  • The data-source rows of the renamed v1.x application and firewall resources.
  • A CI job that runs pnpm lint:terraform, which belongs to the CI owners.

Type of change

  • 🆕 New content (feat) — no new page
  • 🩹 Fix (fix) — typo, broken link, wrong information
  • ♻️ Content update (docs) — rewrite, expansion, upkeep
  • 🌐 Translation sync (i18n) — pt-br changes travel with the English ones
  • 🏗️ Platform / structure (refactor / chore) — reviewed by UXE, no content mixed in — the validator script is in chore(scripts): add pnpm lint:terraform to validate Terraform samples #2637

Author checklist

  • PR title follows type(scope): summary (see GOVERNANCE.md §4)
  • Frontmatter complete: title, description, meta_tags, namespace, permalink, last_reviewed — no page in the repository carries last_reviewed; the other five fields are present on every page
  • No legacy "edge-" product names in the copy — v1.x resource types such as azion_edge_function appear only as code in the migration guide and the v1.x page
  • How-to/tutorial content includes at least one runnable, copy-paste-tested code block — the samples pass terraform validate but were not applied against an account (MM-16196)
  • Screenshots (if any) have alt text and follow image standards — no screenshot is added or changed
  • Internal links are relative and resolve locally — root-relative, 0 broken
  • If any permalink changed or page moved: redirect added in this PR — no permalink changed
  • i18n: pt-br updated in this PR or follow-up i18n issue created: pt-br updated in this PR
  • I ran pnpm build:local (build + frontmatter check) without errors — not run; the CI Build check covers it

…ider

Add scripts/ci/terraform-validate.mjs (pnpm lint:terraform): it runs terraform fmt -check
and terraform validate on each hcl fence in the docs against aziontech/azion 2.10.0, and
a Terraform samples job in the CI gate runs it when Terraform pages change.

Refs MM-16216
Every HCL sample now uses the provider v2 nested schema and passes terraform validate.
Fixes the resource and data source catalog (WAF exceptions, function instances, missing
v2 resources, azion_environment_variable), pins 2.10.0 on every page, and documents that
configuration is the desired state. en and pt-br.

Refs MM-16216
@bruno-andrade-azion
bruno-andrade-azion requested a review from a team November 3, 2026 19:43
@bruno-andrade-azion bruno-andrade-azion self-assigned this Nov 3, 2026
CI is owned by another team, so this docs change keeps only the validator
script and the pnpm lint:terraform command. The job is listed in the PR
as a follow-up for the CI owners.
…on code

The Registry pages for the application function instance resource and its
list data source live at application_functions_instance; the links pointed
at slugs that do not exist. The applications sample now wraps the function
code in trimspace(), as the provider recommends.
…request

The validator and the lint:terraform script now travel in #2637, so this pull request carries content only.

Refs MM-16216
- how-it-works: an omitted field returns to its default only when the
  resource enforces it; azion_workload keeps the API value of the fields it
  does not enforce, per the provider 2.10.0 documentation.
- Migration guide: the v1.x azion_waf_rule_set maps to azion_waf, and its
  data source to azion_wafs; the v2 azion_waf_rule_set is a WAF exception.
  The state and import steps cover the rule set, the WAF mode moves to the
  set_waf behavior, and two v1.x data sources move to Removed. The
  nested-block rule applies to resources with a v1.x counterpart, and the
  domain sample reads its IDs from variables.
- The WAF object is a rule set, as on the platform pages, and Azion Console
  lists it under WAF Rules.
- An aside replaces a blockquote, Rules Engine keeps its capitals, the field
  tables read "Requires ...", and the example IP uses a documentation range.

Refs MM-16216
@bruno-andrade-azion bruno-andrade-azion changed the title docs(terraform): rewrite samples for provider v2.10.0 and validate them in CI docs(terraform): rewrite the samples for provider v2.10.0 Nov 11, 2026
@bruno-andrade-azion
bruno-andrade-azion merged commit c1871a9 into main Nov 11, 2026
9 checks passed
@bruno-andrade-azion
bruno-andrade-azion deleted the docs/terraform-v2-samples-mm-16216 branch November 11, 2026 18:17
bruno-andrade-azion pushed a commit that referenced this pull request Nov 11, 2026
* origin/main: (22 commits)
  docs(terraform): rewrite the samples for provider v2.10.0 (#2557)
  chore(deploy): promote docs-v2.4.4 to production (#2631)
  chore(main): release docs 2.4.4 (#2627)
  chore(deploy): promote docs-v2.4.3 to production (#2617)
  fix(applications): apply live test results and define each resource by its role (#2626)
  chore(main): release docs 2.4.3 (#2616)
  docs(applications): review the Applications section and apply the updated writing rules (#2615)
  chore(deps): bump npm and GitHub Actions dependencies (#2590)
  chore(deploy): promote docs-v2.4.2 to production (#2610)
  chore(main): release docs 2.4.2 (#2609)
  docs(style-guide): align the guide with the shipped sections and settle its open rules (#2600)
  chore(deploy): promote docs-v2.4.1 to production (#2569)
  chore(main): release docs 2.4.1 (#2568)
  chore(deploy): promote docs-v2.4.0 to production (#2560)
  docs(workloads): document custom page assignment with azion workload-deployment (#2564)
  docs(templates): reconcile Console Deploy links with the current catalog (#2563)
  docs(applications): fix rewrite argument, certificate API, workload domains, and connector CLI (#2562)
  docs(style-guide): review the EN style guide against the naming catalog (MM-16284) (#2561)
  docs(marketplace): fix invalid Arguments JSON in 7 integration guides (#2559)
  docs(runtime): fix broken example code in the Runtime reference (#2556)
  ...

# Conflicts:
#	apps/docs/src/content/docs/en/pages/main-menu/reference/build/edge-application/first-steps.mdx
#	apps/docs/src/content/docs/pt-br/pages/menu-principal/referencia/build/edge-application/edge-app-primeiros-passos.mdx
bruno-andrade-azion pushed a commit that referenced this pull request Nov 11, 2026
…l-cli-configs

* origin/main: (22 commits)
  docs(terraform): rewrite the samples for provider v2.10.0 (#2557)
  chore(deploy): promote docs-v2.4.4 to production (#2631)
  chore(main): release docs 2.4.4 (#2627)
  chore(deploy): promote docs-v2.4.3 to production (#2617)
  fix(applications): apply live test results and define each resource by its role (#2626)
  chore(main): release docs 2.4.3 (#2616)
  docs(applications): review the Applications section and apply the updated writing rules (#2615)
  chore(deps): bump npm and GitHub Actions dependencies (#2590)
  chore(deploy): promote docs-v2.4.2 to production (#2610)
  chore(main): release docs 2.4.2 (#2609)
  docs(style-guide): align the guide with the shipped sections and settle its open rules (#2600)
  chore(deploy): promote docs-v2.4.1 to production (#2569)
  chore(main): release docs 2.4.1 (#2568)
  chore(deploy): promote docs-v2.4.0 to production (#2560)
  docs(workloads): document custom page assignment with azion workload-deployment (#2564)
  docs(templates): reconcile Console Deploy links with the current catalog (#2563)
  docs(applications): fix rewrite argument, certificate API, workload domains, and connector CLI (#2562)
  docs(style-guide): review the EN style guide against the naming catalog (MM-16284) (#2561)
  docs(marketplace): fix invalid Arguments JSON in 7 integration guides (#2559)
  docs(runtime): fix broken example code in the Runtime reference (#2556)
  ...
bruno-andrade-azion pushed a commit that referenced this pull request Nov 11, 2026
…e-auth-vector-tutorials

* origin/main: (22 commits)
  docs(terraform): rewrite the samples for provider v2.10.0 (#2557)
  chore(deploy): promote docs-v2.4.4 to production (#2631)
  chore(main): release docs 2.4.4 (#2627)
  chore(deploy): promote docs-v2.4.3 to production (#2617)
  fix(applications): apply live test results and define each resource by its role (#2626)
  chore(main): release docs 2.4.3 (#2616)
  docs(applications): review the Applications section and apply the updated writing rules (#2615)
  chore(deps): bump npm and GitHub Actions dependencies (#2590)
  chore(deploy): promote docs-v2.4.2 to production (#2610)
  chore(main): release docs 2.4.2 (#2609)
  docs(style-guide): align the guide with the shipped sections and settle its open rules (#2600)
  chore(deploy): promote docs-v2.4.1 to production (#2569)
  chore(main): release docs 2.4.1 (#2568)
  chore(deploy): promote docs-v2.4.0 to production (#2560)
  docs(workloads): document custom page assignment with azion workload-deployment (#2564)
  docs(templates): reconcile Console Deploy links with the current catalog (#2563)
  docs(applications): fix rewrite argument, certificate API, workload domains, and connector CLI (#2562)
  docs(style-guide): review the EN style guide against the naming catalog (MM-16284) (#2561)
  docs(marketplace): fix invalid Arguments JSON in 7 integration guides (#2559)
  docs(runtime): fix broken example code in the Runtime reference (#2556)
  ...
bruno-andrade-azion pushed a commit that referenced this pull request Nov 11, 2026
* origin/main:
  fix(marketplace): drop the Azion CLI prerequisite from firewall integration guides (#2612)
  docs(guides): replace the residual "These checks confirm" lines with use-case expect blocks (#2611)
  docs(guides): make the auth layer and vector search tutorials runnable (#2566)
  chore(scripts): add pnpm lint:terraform to validate Terraform samples (#2637)
  fix(firewall): correct the CLI binding, the WAF config sample, and the JWT paywall steps (#2565)
  docs(cli): document azion workload-deployment and fix pages that say the CLI cannot bind a deployment (#2567)
  docs(terraform): rewrite the samples for provider v2.10.0 (#2557)
  chore(deploy): promote docs-v2.4.4 to production (#2631)
  chore(main): release docs 2.4.4 (#2627)
  chore(deploy): promote docs-v2.4.3 to production (#2617)
  fix(applications): apply live test results and define each resource by its role (#2626)
bruno-andrade-azion pushed a commit that referenced this pull request Nov 11, 2026
* origin/main:
  fix(marketplace): drop the Azion CLI prerequisite from firewall integration guides (#2612)
  docs(guides): replace the residual "These checks confirm" lines with use-case expect blocks (#2611)
  docs(guides): make the auth layer and vector search tutorials runnable (#2566)
  chore(scripts): add pnpm lint:terraform to validate Terraform samples (#2637)
  fix(firewall): correct the CLI binding, the WAF config sample, and the JWT paywall steps (#2565)
  docs(cli): document azion workload-deployment and fix pages that say the CLI cannot bind a deployment (#2567)
  docs(terraform): rewrite the samples for provider v2.10.0 (#2557)
  chore(deploy): promote docs-v2.4.4 to production (#2631)
  chore(main): release docs 2.4.4 (#2627)
  chore(deploy): promote docs-v2.4.3 to production (#2617)
  fix(applications): apply live test results and define each resource by its role (#2626)
bruno-andrade-azion pushed a commit that referenced this pull request Nov 11, 2026
…-main

* origin/main: (21 commits)
  feat(nav): give every breadcrumb crumb a page and make CLI commands runnable (#2636)
  fix(cli): drop azion update workload-deployment, which the CLI does not expose (#2639)
  docs(terminology): retire Edge Node, module, and add-on from current pages (#2618)
  docs(migration): share the repeated migration-guide procedures as partials (#2619)
  fix(marketplace): drop the Azion CLI prerequisite from firewall integration guides (#2612)
  docs(guides): replace the residual "These checks confirm" lines with use-case expect blocks (#2611)
  docs(guides): make the auth layer and vector search tutorials runnable (#2566)
  chore(scripts): add pnpm lint:terraform to validate Terraform samples (#2637)
  fix(firewall): correct the CLI binding, the WAF config sample, and the JWT paywall steps (#2565)
  docs(cli): document azion workload-deployment and fix pages that say the CLI cannot bind a deployment (#2567)
  docs(terraform): rewrite the samples for provider v2.10.0 (#2557)
  chore(deploy): promote docs-v2.4.4 to production (#2631)
  chore(main): release docs 2.4.4 (#2627)
  chore(deploy): promote docs-v2.4.3 to production (#2617)
  fix(applications): apply live test results and define each resource by its role (#2626)
  chore(main): release docs 2.4.3 (#2616)
  docs(applications): review the Applications section and apply the updated writing rules (#2615)
  chore(deps): bump npm and GitHub Actions dependencies (#2590)
  chore(deploy): promote docs-v2.4.2 to production (#2610)
  chore(main): release docs 2.4.2 (#2609)
  ...
bruno-andrade-azion pushed a commit that referenced this pull request Nov 11, 2026
* commit '7aa84b1d0': (22 commits)
  docs(nav): apply the review of the orphan-page triage
  feat(nav): give every breadcrumb crumb a page and make CLI commands runnable (#2636)
  fix(cli): drop azion update workload-deployment, which the CLI does not expose (#2639)
  docs(terminology): retire Edge Node, module, and add-on from current pages (#2618)
  docs(migration): share the repeated migration-guide procedures as partials (#2619)
  fix(marketplace): drop the Azion CLI prerequisite from firewall integration guides (#2612)
  docs(guides): replace the residual "These checks confirm" lines with use-case expect blocks (#2611)
  docs(guides): make the auth layer and vector search tutorials runnable (#2566)
  chore(scripts): add pnpm lint:terraform to validate Terraform samples (#2637)
  fix(firewall): correct the CLI binding, the WAF config sample, and the JWT paywall steps (#2565)
  docs(cli): document azion workload-deployment and fix pages that say the CLI cannot bind a deployment (#2567)
  docs(terraform): rewrite the samples for provider v2.10.0 (#2557)
  chore(deploy): promote docs-v2.4.4 to production (#2631)
  chore(main): release docs 2.4.4 (#2627)
  chore(deploy): promote docs-v2.4.3 to production (#2617)
  fix(applications): apply live test results and define each resource by its role (#2626)
  chore(main): release docs 2.4.3 (#2616)
  docs(applications): review the Applications section and apply the updated writing rules (#2615)
  chore(deps): bump npm and GitHub Actions dependencies (#2590)
  chore(deploy): promote docs-v2.4.2 to production (#2610)
  ...
bruno-andrade-azion pushed a commit that referenced this pull request Nov 12, 2026
* origin/main: (24 commits)
  chore(nav): count only visible rows toward the navcheck soft max (#2640)
  docs(nav): triage the pages outside the navigation (#2593)
  fix(guides): match the QStash variable and the Functions usage response to the code (#2571)
  feat(nav): give every breadcrumb crumb a page and make CLI commands runnable (#2636)
  fix(cli): drop azion update workload-deployment, which the CLI does not expose (#2639)
  docs(terminology): retire Edge Node, module, and add-on from current pages (#2618)
  docs(migration): share the repeated migration-guide procedures as partials (#2619)
  fix(marketplace): drop the Azion CLI prerequisite from firewall integration guides (#2612)
  docs(guides): replace the residual "These checks confirm" lines with use-case expect blocks (#2611)
  docs(guides): make the auth layer and vector search tutorials runnable (#2566)
  chore(scripts): add pnpm lint:terraform to validate Terraform samples (#2637)
  fix(firewall): correct the CLI binding, the WAF config sample, and the JWT paywall steps (#2565)
  docs(cli): document azion workload-deployment and fix pages that say the CLI cannot bind a deployment (#2567)
  docs(terraform): rewrite the samples for provider v2.10.0 (#2557)
  chore(deploy): promote docs-v2.4.4 to production (#2631)
  chore(main): release docs 2.4.4 (#2627)
  chore(deploy): promote docs-v2.4.3 to production (#2617)
  fix(applications): apply live test results and define each resource by its role (#2626)
  chore(main): release docs 2.4.3 (#2616)
  docs(applications): review the Applications section and apply the updated writing rules (#2615)
  ...
bruno-andrade-azion pushed a commit that referenced this pull request Nov 12, 2026
…y-filter-removal

* origin/main: (24 commits)
  chore(nav): count only visible rows toward the navcheck soft max (#2640)
  docs(nav): triage the pages outside the navigation (#2593)
  fix(guides): match the QStash variable and the Functions usage response to the code (#2571)
  feat(nav): give every breadcrumb crumb a page and make CLI commands runnable (#2636)
  fix(cli): drop azion update workload-deployment, which the CLI does not expose (#2639)
  docs(terminology): retire Edge Node, module, and add-on from current pages (#2618)
  docs(migration): share the repeated migration-guide procedures as partials (#2619)
  fix(marketplace): drop the Azion CLI prerequisite from firewall integration guides (#2612)
  docs(guides): replace the residual "These checks confirm" lines with use-case expect blocks (#2611)
  docs(guides): make the auth layer and vector search tutorials runnable (#2566)
  chore(scripts): add pnpm lint:terraform to validate Terraform samples (#2637)
  fix(firewall): correct the CLI binding, the WAF config sample, and the JWT paywall steps (#2565)
  docs(cli): document azion workload-deployment and fix pages that say the CLI cannot bind a deployment (#2567)
  docs(terraform): rewrite the samples for provider v2.10.0 (#2557)
  chore(deploy): promote docs-v2.4.4 to production (#2631)
  chore(main): release docs 2.4.4 (#2627)
  chore(deploy): promote docs-v2.4.3 to production (#2617)
  fix(applications): apply live test results and define each resource by its role (#2626)
  chore(main): release docs 2.4.3 (#2616)
  docs(applications): review the Applications section and apply the updated writing rules (#2615)
  ...
bruno-andrade-azion pushed a commit that referenced this pull request Nov 12, 2026
* origin/main: (29 commits)
  fix(structure): tag bare code fences, fix heading skips, add pt-br meta_tags (#2629)
  docs(style-guide): drop the nonexistent GlossaryFilter from the glossary template (#2577)
  docs(release-notes): fix the October 14 anchor and merge the duplicate February 24 entry (#2572)
  fix(orchestrator): fix broken bind and create-service API samples (#2574)
  docs(readability): split the long sentences in the Runtime, CLI, Reference, and KV Store pages (#2635)
  chore(nav): count only visible rows toward the navcheck soft max (#2640)
  docs(nav): triage the pages outside the navigation (#2593)
  fix(guides): match the QStash variable and the Functions usage response to the code (#2571)
  feat(nav): give every breadcrumb crumb a page and make CLI commands runnable (#2636)
  fix(cli): drop azion update workload-deployment, which the CLI does not expose (#2639)
  docs(terminology): retire Edge Node, module, and add-on from current pages (#2618)
  docs(migration): share the repeated migration-guide procedures as partials (#2619)
  fix(marketplace): drop the Azion CLI prerequisite from firewall integration guides (#2612)
  docs(guides): replace the residual "These checks confirm" lines with use-case expect blocks (#2611)
  docs(guides): make the auth layer and vector search tutorials runnable (#2566)
  chore(scripts): add pnpm lint:terraform to validate Terraform samples (#2637)
  fix(firewall): correct the CLI binding, the WAF config sample, and the JWT paywall steps (#2565)
  docs(cli): document azion workload-deployment and fix pages that say the CLI cannot bind a deployment (#2567)
  docs(terraform): rewrite the samples for provider v2.10.0 (#2557)
  chore(deploy): promote docs-v2.4.4 to production (#2631)
  ...

# Conflicts:
#	apps/docs/src/content/docs/en/pages/observe/real-time-events/data-sources.mdx
#	apps/docs/src/content/docs/pt-br/pages/observe/real-time-events/fontes-de-dados.mdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants