|
| 1 | +# Copyright IBM Corp. 2014, 2026 |
| 2 | +# SPDX-License-Identifier: MPL-2.0 |
| 3 | + |
| 4 | +provider_source = "registry.terraform.io/hashicorp/aws" |
| 5 | +provider_dir = "." |
| 6 | +schema_json = "terraform-providers-schema/schema.json" |
| 7 | + |
| 8 | +file_aliases = { |
| 9 | + "list_resource/aws_ebs_volume" = "aws_ec2_ebs_volume" |
| 10 | +} |
| 11 | + |
| 12 | +ignore_contents_check = [ |
| 13 | + "data_source/aws_kms_secret", |
| 14 | +] |
| 15 | + |
| 16 | +# ─── Type overrides ───────────────────────────────────────────────────────── |
| 17 | +# Define bylines, frontmatter requirements, and other AWS-specific conventions. |
| 18 | + |
| 19 | +type "resource" { |
| 20 | + schema_kind = "resource" |
| 21 | + website_paths = ["website/docs/r/{name}.html.markdown"] |
| 22 | + title_prefix = "Resource" |
| 23 | + |
| 24 | + arguments_bylines = [ |
| 25 | + "This resource supports the following arguments:", |
| 26 | + "The following arguments are required:", |
| 27 | + "The following arguments are optional:", |
| 28 | + "This resource does not support any arguments.", |
| 29 | + ] |
| 30 | + attributes_bylines = [ |
| 31 | + "This resource exports the following attributes in addition to the arguments above:", |
| 32 | + "This resource exports no additional attributes.", |
| 33 | + ] |
| 34 | + |
| 35 | + require_attributes = "required" |
| 36 | + require_import = "optional" |
| 37 | + require_timeouts = "optional" |
| 38 | + require_signature = "forbidden" |
| 39 | + |
| 40 | + frontmatter_require = ["description", "page_title"] |
| 41 | + frontmatter_forbid = ["sidebar_current"] |
| 42 | + |
| 43 | + region_aware = true |
| 44 | +} |
| 45 | + |
| 46 | +type "data_source" { |
| 47 | + schema_kind = "data_source" |
| 48 | + website_paths = ["website/docs/d/{name}.html.markdown"] |
| 49 | + title_prefix = "Data Source" |
| 50 | + |
| 51 | + arguments_bylines = [ |
| 52 | + "This data source supports the following arguments:", |
| 53 | + "The following arguments are required:", |
| 54 | + "The following arguments are optional:", |
| 55 | + "This data source does not support any arguments.", |
| 56 | + ] |
| 57 | + attributes_bylines = [ |
| 58 | + "This data source exports the following attributes in addition to the arguments above:", |
| 59 | + "This data source exports no additional attributes.", |
| 60 | + ] |
| 61 | + |
| 62 | + require_attributes = "required" |
| 63 | + require_import = "forbidden" |
| 64 | + require_timeouts = "optional" |
| 65 | + require_signature = "forbidden" |
| 66 | + |
| 67 | + frontmatter_require = ["description", "page_title"] |
| 68 | + frontmatter_forbid = ["sidebar_current"] |
| 69 | + |
| 70 | + region_aware = true |
| 71 | +} |
| 72 | + |
| 73 | +type "ephemeral" { |
| 74 | + schema_kind = "ephemeral" |
| 75 | + website_paths = ["website/docs/ephemeral-resources/{name}.html.markdown"] |
| 76 | + title_prefix = "Ephemeral" |
| 77 | + |
| 78 | + arguments_bylines = [ |
| 79 | + "This ephemeral resource supports the following arguments:", |
| 80 | + "The following arguments are required:", |
| 81 | + "The following arguments are optional:", |
| 82 | + "This ephemeral resource does not support any arguments.", |
| 83 | + ] |
| 84 | + attributes_bylines = [ |
| 85 | + "This ephemeral resource exports the following attributes in addition to the arguments above:", |
| 86 | + "This ephemeral resource exports no additional attributes.", |
| 87 | + ] |
| 88 | + |
| 89 | + require_attributes = "required" |
| 90 | + require_import = "forbidden" |
| 91 | + require_timeouts = "forbidden" |
| 92 | + require_signature = "forbidden" |
| 93 | + |
| 94 | + frontmatter_require = ["description", "page_title"] |
| 95 | + frontmatter_forbid = ["sidebar_current"] |
| 96 | + |
| 97 | + region_aware = true |
| 98 | +} |
| 99 | + |
| 100 | +type "function" { |
| 101 | + schema_kind = "function" |
| 102 | + website_paths = ["website/docs/functions/{name}.html.markdown"] |
| 103 | + title_prefix = "Function" |
| 104 | + |
| 105 | + arguments_heading = "Arguments" |
| 106 | + allow_missing_arguments_byline = true |
| 107 | + |
| 108 | + require_attributes = "forbidden" |
| 109 | + require_import = "forbidden" |
| 110 | + require_timeouts = "forbidden" |
| 111 | + require_signature = "required" |
| 112 | + |
| 113 | + frontmatter_require = ["description", "page_title"] |
| 114 | + frontmatter_forbid = ["sidebar_current"] |
| 115 | + |
| 116 | + region_aware = false |
| 117 | +} |
| 118 | + |
| 119 | +type "list_resource" { |
| 120 | + schema_kind = "list_resource" |
| 121 | + website_paths = ["website/docs/list-resources/{name}.html.markdown"] |
| 122 | + title_prefix = "List Resource" |
| 123 | + |
| 124 | + arguments_bylines = [ |
| 125 | + "This list resource supports the following arguments:", |
| 126 | + "The following arguments are required:", |
| 127 | + "The following arguments are optional:", |
| 128 | + "This list resource does not support any arguments.", |
| 129 | + ] |
| 130 | + |
| 131 | + require_attributes = "forbidden" |
| 132 | + require_import = "forbidden" |
| 133 | + require_timeouts = "forbidden" |
| 134 | + require_signature = "forbidden" |
| 135 | + |
| 136 | + frontmatter_require = ["description", "page_title"] |
| 137 | + frontmatter_forbid = ["sidebar_current"] |
| 138 | + |
| 139 | + region_aware = true |
| 140 | +} |
| 141 | + |
| 142 | +type "action" { |
| 143 | + schema_kind = "action" |
| 144 | + website_paths = ["website/docs/actions/{name}.html.markdown"] |
| 145 | + title_prefix = "Action" |
| 146 | + |
| 147 | + arguments_bylines = [ |
| 148 | + "This action supports the following arguments:", |
| 149 | + "The following arguments are required:", |
| 150 | + "The following arguments are optional:", |
| 151 | + "This action does not support any arguments.", |
| 152 | + ] |
| 153 | + |
| 154 | + require_attributes = "forbidden" |
| 155 | + require_import = "forbidden" |
| 156 | + require_timeouts = "forbidden" |
| 157 | + require_signature = "forbidden" |
| 158 | + |
| 159 | + frontmatter_require = ["description", "page_title", "subcategory"] |
| 160 | + frontmatter_forbid = ["sidebar_current"] |
| 161 | + |
| 162 | + region_aware = false |
| 163 | +} |
| 164 | + |
| 165 | +# ─── Check blocks ─────────────────────────────────────────────────────────── |
| 166 | + |
| 167 | +check "schema_docs" { |
| 168 | + enabled = true |
| 169 | + |
| 170 | + byline = true |
| 171 | + coverage = true |
| 172 | + description = true |
| 173 | + format = true |
| 174 | + heading = true |
| 175 | + labels = true |
| 176 | + ordering = true |
| 177 | + |
| 178 | + block_heading_styles = [ |
| 179 | + "`{Parent}` `{Block}` Block", |
| 180 | + "`{Block}` Block", |
| 181 | + "{Block} Block", |
| 182 | + "{Block} block", |
| 183 | + "{Block} Configuration Block", |
| 184 | + "{Block} Argument Reference", |
| 185 | + "{Block} Attribute Reference", |
| 186 | + "{Title} Arguments", |
| 187 | + "{Title} Argument Reference", |
| 188 | + "{Title} Attribute Reference", |
| 189 | + "`{Block}`", |
| 190 | + "{Block}", |
| 191 | + "{Title}", |
| 192 | + ] |
| 193 | + |
| 194 | + prefer_block_heading_styles = [ |
| 195 | + "`{Parent}` `{Block}` Block", |
| 196 | + "`{Block}` Block", |
| 197 | + ] |
| 198 | +} |
| 199 | + |
| 200 | +check "import_section" { |
| 201 | + enabled = true |
| 202 | + require_identity_section = true |
| 203 | +} |
| 204 | + |
| 205 | +check "frontmatter" { |
| 206 | + enabled = true |
| 207 | + |
| 208 | + require_subcategory = true |
| 209 | + require_page_title = true |
| 210 | + require_description = true |
| 211 | + require_layout = true |
| 212 | + |
| 213 | + allow_subcategories_file = "website/allowed-subcategories.txt" |
| 214 | + |
| 215 | + allow_empty_subcategory_targets = [ |
| 216 | + "arn_build", |
| 217 | + "arn_parse", |
| 218 | + "trim_iam_role_path", |
| 219 | + "user_agent", |
| 220 | + ] |
| 221 | +} |
| 222 | + |
| 223 | +check "section_presence" { |
| 224 | + enabled = true |
| 225 | +} |
| 226 | + |
| 227 | +check "timeouts_section" { |
| 228 | + enabled = true |
| 229 | +} |
| 230 | + |
| 231 | +check "region_argument" { |
| 232 | + enabled = true |
| 233 | +} |
| 234 | + |
| 235 | +check "file_match" { |
| 236 | + enabled = true |
| 237 | + ignore_missing = [ |
| 238 | + "aws_alb", |
| 239 | + "aws_alb_listener", |
| 240 | + "aws_alb_listener_certificate", |
| 241 | + "aws_alb_listener_rule", |
| 242 | + "aws_alb_target_group", |
| 243 | + "aws_alb_target_group_attachment", |
| 244 | + "aws_alb_trust_store", |
| 245 | + "aws_alb_trust_store_revocation", |
| 246 | + "aws_albs", |
| 247 | + ] |
| 248 | +} |
0 commit comments