github.com/mineiros-io/terradoc@v0.0.9-0.20220711062319-018bd4ae81f5/test/testdata/golden-input.tfdoc.hcl (about) 1 header { 2 image = "https://raw.githubusercontent.com/mineiros-io/brand/3bffd30e8bdbbde32c143e2650b2faa55f1df3ea/mineiros-primary-logo.svg" 3 url = "https://mineiros.io/?ref=terraform-google-secret-manager-iam" 4 5 badge "terraform" { 6 image = "https://img.shields.io/badge/Terraform-1.x-623CE4.svg?logo=terraform" 7 url = "https://github.com/hashicorp/terraform/releases" 8 text = "Terraform Version" 9 } 10 11 badge "google-provider" { 12 image = "https://img.shields.io/badge/google-3.x-1A73E8.svg?logo=terraform" 13 url = "https://github.com/terraform-providers/terraform-provider-google/releases" 14 text = "Google Provider Version" 15 } 16 17 badge "slack" { 18 image = "https://img.shields.io/badge/slack-@mineiros--community-f32752.svg?logo=slack" 19 url = "https://mineiros.io/slack" 20 text = "Join Slack" 21 } 22 } 23 24 section { 25 title = "terraform-google-secret-manager-iam" 26 content = <<END 27 A [Terraform](https://www.terraform.io) module to create a [Google Secret Manager IAM](https://cloud.google.com/secret-manager/docs/access-control) on [Google Cloud Services (GCP)](https://cloud.google.com/). 28 29 **_This module supports Terraform version 1 30 and is compatible with the Terraform Google Provider version 3._** 31 32 This module is part of our Infrastructure as Code (IaC) framework 33 that enables our users and customers to easily deploy and manage reusable, 34 secure, and production-grade cloud infrastructure. 35 END 36 37 toc = true 38 39 section { 40 title = "Module Features" 41 content = <<END 42 This module implements the following terraform resources: 43 44 - `google_secret_manager_secret_iam_binding` 45 - `google_secret_manager_secret_iam_member` 46 - `google_secret_manager_secret_iam_policy` 47 END 48 } 49 50 section { 51 title = "Getting Started" 52 content = <<END 53 Most basic usage just setting required arguments: 54 55 ```hcl 56 module "terraform-google-secret-manager-iam" { 57 source = "github.com/mineiros-io/terraform-google-secret-manager-iam.git?ref=v0.1.0" 58 59 secret_id = google_secret_manager_secret.secret-basic.secret_id 60 role = "roles/secretmanager.secretAccessor" 61 members = ["user:admin@example.com"] 62 } 63 ``` 64 END 65 } 66 67 section { 68 title = "Module Argument Reference" 69 content = "See [variables.tf] and [examples/] for details and use-cases." 70 71 section { 72 title = "Top-level Arguments" 73 74 section { 75 title = "Module Configuration" 76 77 variable "module_enabled" { 78 type = bool 79 description = "Specifies whether resources in the module will be created." 80 default = true 81 } 82 83 variable "module_depends_on" { 84 type = list(dependencies) 85 description = "A list of dependencies. Any object can be _assigned_ to this list to define a hidden external dependency." 86 readme_example = <<END 87 module_depends_on = [ 88 google_network.network 89 ] 90 END 91 } 92 } 93 94 section { 95 title = "Main Resource Configuration" 96 97 variable "secret_id" { 98 required = true 99 type = string 100 description = "The id of the secret." 101 } 102 103 variable "members" { 104 type = set(string) 105 default = [] 106 description = <<-END 107 Identities that will be granted the privilege in role. Each entry can have one of the following values: 108 - `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. 109 - `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. 110 - `user:{emailid}`: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com. 111 - `serviceAccount:{emailid}`: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. 112 - `group:{emailid}`: An email address that represents a Google group. For example, admins@example.com. 113 - `domain:{domain}`: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com. 114 - `projectOwner:projectid`: Owners of the given project. For example, `projectOwner:my-example-project` 115 - `projectEditor:projectid`: Editors of the given project. For example, `projectEditor:my-example-project` 116 - `projectViewer:projectid`: Viewers of the given project. For example, `projectViewer:my-example-project` 117 END 118 } 119 120 variable "role" { 121 type = string 122 description = "The role that should be applied. Note that custom roles must be of the format `[projects|organizations]/{parent-name}/roles/{role-name}`." 123 } 124 125 variable "project" { 126 type = string 127 description = "The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used." 128 } 129 130 variable "authoritative" { 131 description = "Whether to exclusively set (authoritative mode) or add (non-authoritative/additive mode) members to the role." 132 type = bool 133 default = true 134 } 135 136 variable "policy_bindings" { 137 type = list(policy_bindings) 138 description = "A list of IAM policy bindings." 139 readme_example = <<END 140 policy_bindings = [{ 141 role = "roles/secretmanager.secretAccessor" 142 members = ["user:member@example.com"] 143 }] 144 END 145 146 attribute "role" { 147 description = "The role that should be applied." 148 required = true 149 type = string 150 } 151 152 attribute "members" { 153 type = set(string) 154 default = var.members 155 description = "Identities that will be granted the privilege in `role`." 156 } 157 158 attribute "condition" { 159 type = object(condition) 160 description = "An IAM Condition for a given binding." 161 readme_example = <<END 162 condition = { 163 expression = "request.time < timestamp(\"2022-01-01T00:00:00Z\")" 164 title = "expires_after_2021_12_31" 165 } 166 END 167 168 attribute "expression" { 169 type = string 170 required = true 171 description = "Textual representation of an expression in Common Expression Language syntax." 172 } 173 174 attribute "title" { 175 type = string 176 required = true 177 description = "A title for the expression, i.e. a short string describing its purpose." 178 } 179 180 attribute "description" { 181 type = string 182 description = "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI." 183 } 184 } 185 } 186 } 187 188 section { 189 title = "Extended Resource Configuration" 190 } 191 } 192 } 193 194 section { 195 title = "Module Attributes Reference" 196 content = "The following attributes are exported in the outputs of the module:" 197 198 output "module_enabled" { 199 type = bool 200 description = "Whether this module is enabled." 201 } 202 203 output "iam" { 204 type = object(iam_output) 205 description = "All attributes of the created `iam_binding` or `iam_member` or `iam_policy` resource according to the mode." 206 } 207 } 208 209 210 section { 211 title = "External Documentation" 212 213 section { 214 title = "Google Documentation" 215 content = <<END 216 - Secret Manager: <https://cloud.google.com/secret-manager/docs> 217 - Secret Manager Access Control: <https://cloud.google.com/secret-manager/docs/access-control> 218 END 219 220 } 221 222 section { 223 title = "Terraform Google Provider Documentation" 224 content = <<END 225 - <https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/secret_manager_secret> 226 - <https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/secret_manager_secret_iam> 227 END 228 } 229 } 230 231 section { 232 title = "Module Versioning" 233 content = <<END 234 This Module follows the principles of [Semantic Versioning (SemVer)]. 235 236 Given a version number `MAJOR.MINOR.PATCH`, we increment the: 237 238 1. `MAJOR` version when we make incompatible changes, 239 2. `MINOR` version when we add functionality in a backwards compatible manner, and 240 3. `PATCH` version when we make backwards compatible bug fixes. 241 END 242 243 section { 244 title = "Backwards compatibility in `0.0.z` and `0.y.z` version" 245 content = <<END 246 - Backwards compatibility in versions `0.0.z` is **not guaranteed** when `z` is increased. (Initial development) 247 - Backwards compatibility in versions `0.y.z` is **not guaranteed** when `y` is increased. (Pre-release) 248 END 249 } 250 } 251 252 section { 253 title = "About Mineiros" 254 content = <<END 255 [Mineiros][homepage] is a remote-first company headquartered in Berlin, Germany 256 that solves development, automation and security challenges in cloud infrastructure. 257 258 Our vision is to massively reduce time and overhead for teams to manage and 259 deploy production-grade and secure cloud infrastructure. 260 261 We offer commercial support for all of our modules and encourage you to reach out 262 if you have any questions or need help. Feel free to email us at [hello@mineiros.io] or join our 263 [Community Slack channel][slack]. 264 END 265 } 266 267 section { 268 title = "Reporting Issues" 269 content = "We use GitHub [Issues] to track community reported issues and missing features." 270 } 271 272 section { 273 title = "Contributing" 274 content = <<END 275 Contributions are always encouraged and welcome! For the process of accepting changes, we use 276 [Pull Requests]. If you'd like more information, please see our [Contribution Guidelines]. 277 END 278 } 279 280 section { 281 title = "Makefile Targets" 282 content = <<END 283 This repository comes with a handy [Makefile]. 284 Run `make help` to see details on each available target. 285 END 286 } 287 288 section { 289 title = "License" 290 content = <<END 291 [![license][badge-license]][apache20] 292 293 This module is licensed under the Apache License Version 2.0, January 2004. 294 Please see [LICENSE] for full details. 295 296 Copyright © 2020-2021 [Mineiros GmbH][homepage] 297 END 298 } 299 } 300 301 references { 302 ref "homepage" { 303 value = "https://mineiros.io/?ref=terraform-google-secret-manager-iam" 304 } 305 306 ref "hello@mineiros.io" { 307 value = "mailto:hello@mineiros.io" 308 } 309 310 ref "badge-build" { 311 value = "https://github.com/mineiros-io/terraform-google-secret-manager-iam/workflows/Tests/badge.svg" 312 } 313 314 ref "badge-semver" { 315 value = "https://img.shields.io/github/v/tag/mineiros-io/terraform-google-secret-manager-iam.svg?label=latest&sort=semver" 316 } 317 318 ref "badge-license" { 319 value = "https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg" 320 } 321 322 ref "badge-terraform" { 323 value = "https://img.shields.io/badge/Terraform-1.x-623CE4.svg?logo=terraform" 324 } 325 326 ref "badge-slack" { 327 value = "https://img.shields.io/badge/slack-@mineiros--community-f32752.svg?logo=slack" 328 } 329 330 ref "build-status" { 331 value = "https://github.com/mineiros-io/terraform-google-secret-manager-iam/actions" 332 } 333 334 ref "releases-github" { 335 value = "https://github.com/mineiros-io/erraform-google-secret-manager-iam/releases" 336 } 337 338 ref "releases-terraform" { 339 value = "https://github.com/hashicorp/terraform/releases" 340 } 341 342 ref "badge-tf-gcp" { 343 value = "https://img.shields.io/badge/google-3.x-1A73E8.svg?logo=terraform" 344 } 345 346 ref "releases-google-provider" { 347 value = "https://github.com/terraform-providers/terraform-provider-google/releases" 348 } 349 350 ref "apache20" { 351 value = "https://opensource.org/licenses/Apache-2.0" 352 } 353 354 ref "slack" { 355 value = "https://mineiros.io/slack" 356 } 357 358 ref "terraform" { 359 value = "https://www.terraform.io" 360 } 361 362 ref "gcp" { 363 value = "https://cloud.google.com/" 364 } 365 366 ref "semantic versioning (semver)" { 367 value = "https://semver.org/" 368 } 369 370 ref "variables.tf" { 371 value = "https://github.com/mineiros-io/terraform-google-secret-manager-iam/blob/main/variables.tf" 372 } 373 374 ref "examples/" { 375 value = "https://github.com/mineiros-io/terraform-google-secret-manager-iam/blob/main/examples" 376 } 377 378 ref "issues" { 379 value = "https://github.com/mineiros-io/terraform-google-secret-manager-iam/issues" 380 } 381 382 ref "license" { 383 value = "https://github.com/mineiros-io/terraform-google-secret-manager-iam/blob/main/LICENSE" 384 } 385 386 ref "makefile" { 387 value = "https://github.com/mineiros-io/terraform-google-secret-manager-iam/blob/main/Makefile" 388 } 389 390 ref "pull requests" { 391 value = "https://github.com/mineiros-io/terraform-google-secret-manager-iam/pulls" 392 } 393 394 ref "contribution guidelines" { 395 value = "https://github.com/mineiros-io/terraform-google-secret-manager-iam/blob/main/CONTRIBUTING.md" 396 } 397 }