|
| 1 | +--- |
| 2 | +# ---------------------------------------------------------------------------- |
| 3 | +# |
| 4 | +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** |
| 5 | +# |
| 6 | +# ---------------------------------------------------------------------------- |
| 7 | +# |
| 8 | +# This file is automatically generated by Magic Modules and manual |
| 9 | +# changes will be clobbered when the file is regenerated. |
| 10 | +# |
| 11 | +# Please read more about how to change this file in |
| 12 | +# .github/CONTRIBUTING.md. |
| 13 | +# |
| 14 | +# ---------------------------------------------------------------------------- |
| 15 | +layout: "google" |
| 16 | +page_title: "Google: google_resourcemanager_lien" |
| 17 | +sidebar_current: "docs-google-resourcemanager-lien" |
| 18 | +description: |- |
| 19 | + A Lien represents an encumbrance on the actions that can be performed on a resource. |
| 20 | +--- |
| 21 | + |
| 22 | +# google\_resourcemanager\_lien |
| 23 | + |
| 24 | +A Lien represents an encumbrance on the actions that can be performed on a resource. |
| 25 | + |
| 26 | + |
| 27 | +## Example Usage |
| 28 | + |
| 29 | +```hcl |
| 30 | +resource "random_id" "r" { |
| 31 | + byte_length = 8 |
| 32 | +} |
| 33 | +
|
| 34 | +resource "google_project" "project" { |
| 35 | + project_id = "project-${random_id.r.hex}" |
| 36 | + name = "A very important project!" |
| 37 | +} |
| 38 | +
|
| 39 | +resource "google_resourcemanager_lien" "lien" { |
| 40 | + parent = "projects/${google_project.project.number}" |
| 41 | + restrictions = ["resourcemanager.projects.delete"] |
| 42 | + origin = "machine-readable-explanation" |
| 43 | + reason = "This project is very important to me!" |
| 44 | +} |
| 45 | +``` |
| 46 | + |
| 47 | +## Argument Reference |
| 48 | + |
| 49 | +The following arguments are supported: |
| 50 | + |
| 51 | +* `reason` - |
| 52 | + (Required) |
| 53 | + Concise user-visible strings indicating why an action cannot be performed |
| 54 | + on a resource. Maximum length of 200 characters. |
| 55 | +* `origin` - |
| 56 | + (Required) |
| 57 | + A stable, user-visible/meaningful string identifying the origin |
| 58 | + of the Lien, intended to be inspected programmatically. Maximum length of |
| 59 | + 200 characters. |
| 60 | +* `parent` - |
| 61 | + (Required) |
| 62 | + A reference to the resource this Lien is attached to. |
| 63 | + The server will validate the parent against those for which Liens are supported. |
| 64 | + Since a variety of objects can have Liens against them, you must provide the type |
| 65 | + prefix (e.g. "projects/my-project-name"). |
| 66 | +* `restrictions` - |
| 67 | + (Required) |
| 68 | + The types of operations which should be blocked as a result of this Lien. |
| 69 | + Each value should correspond to an IAM permission. The server will validate |
| 70 | + the permissions against those for which Liens are supported. An empty |
| 71 | + list is meaningless and will be rejected. |
| 72 | + e.g. ['resourcemanager.projects.delete'] |
| 73 | + |
| 74 | + |
| 75 | +- - - |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | +## Attributes Reference |
| 80 | + |
| 81 | +In addition to the arguments listed above, the following computed attributes are exported: |
| 82 | + |
| 83 | +* `name` - |
| 84 | + A system-generated unique identifier for this Lien. |
| 85 | +* `create_time` - |
| 86 | + Time of creation |
| 87 | + |
| 88 | + |
| 89 | +## Timeouts |
| 90 | + |
| 91 | +This resource provides the following |
| 92 | +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: |
| 93 | + |
| 94 | +- `create` - Default is 4 minutes. |
| 95 | +- `delete` - Default is 4 minutes. |
| 96 | + |
| 97 | +## Import |
| 98 | + |
| 99 | +Lien can be imported using any of these accepted formats: |
| 100 | + |
| 101 | +``` |
| 102 | +$ terraform import google_resourcemanager_lien.default {{parent}}/{{name}} |
| 103 | +``` |
0 commit comments