|
| 1 | +--- |
| 2 | +# ---------------------------------------------------------------------------- |
| 3 | +# |
| 4 | +# *** AUTO GENERATED CODE *** Type: MMv1 *** |
| 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 | +subcategory: "Parameter Manager" |
| 16 | +description: |- |
| 17 | + A Parameter resource is a logical parameter. |
| 18 | +--- |
| 19 | + |
| 20 | +# google_parameter_manager_parameter |
| 21 | + |
| 22 | +A Parameter resource is a logical parameter. |
| 23 | + |
| 24 | +~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. |
| 25 | +See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. |
| 26 | + |
| 27 | +To get more information about Parameter, see: |
| 28 | + |
| 29 | +* [API documentation](https://cloud.google.com/secret-manager/parameter-manager/docs/reference/rest/v1/projects.locations.parameters) |
| 30 | + |
| 31 | +<div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| 32 | + <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=parameter_config_basic&open_in_editor=main.tf" target="_blank"> |
| 33 | + <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| 34 | + </a> |
| 35 | +</div> |
| 36 | +## Example Usage - Parameter Config Basic |
| 37 | + |
| 38 | + |
| 39 | +```hcl |
| 40 | +resource "google_parameter_manager_parameter" "parameter-basic" { |
| 41 | + provider = google-beta |
| 42 | + parameter_id = "parameter" |
| 43 | +} |
| 44 | +``` |
| 45 | +<div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| 46 | + <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=parameter_with_format&open_in_editor=main.tf" target="_blank"> |
| 47 | + <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| 48 | + </a> |
| 49 | +</div> |
| 50 | +## Example Usage - Parameter With Format |
| 51 | + |
| 52 | + |
| 53 | +```hcl |
| 54 | +resource "google_parameter_manager_parameter" "parameter-with-format" { |
| 55 | + provider = google-beta |
| 56 | + parameter_id = "parameter" |
| 57 | + format = "JSON" |
| 58 | +} |
| 59 | +``` |
| 60 | +<div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| 61 | + <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=parameter_with_labels&open_in_editor=main.tf" target="_blank"> |
| 62 | + <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| 63 | + </a> |
| 64 | +</div> |
| 65 | +## Example Usage - Parameter With Labels |
| 66 | + |
| 67 | + |
| 68 | +```hcl |
| 69 | +resource "google_parameter_manager_parameter" "parameter-with-labels" { |
| 70 | + provider = google-beta |
| 71 | + parameter_id = "parameter" |
| 72 | +
|
| 73 | + labels = { |
| 74 | + key1 = "val1" |
| 75 | + key2 = "val2" |
| 76 | + key3 = "val3" |
| 77 | + key4 = "val4" |
| 78 | + key5 = "val5" |
| 79 | + } |
| 80 | +} |
| 81 | +``` |
| 82 | + |
| 83 | +## Argument Reference |
| 84 | + |
| 85 | +The following arguments are supported: |
| 86 | + |
| 87 | + |
| 88 | +* `parameter_id` - |
| 89 | + (Required) |
| 90 | + This must be unique within the project. |
| 91 | + |
| 92 | + |
| 93 | +- - - |
| 94 | + |
| 95 | + |
| 96 | +* `labels` - |
| 97 | + (Optional) |
| 98 | + The labels assigned to this Parameter. |
| 99 | + Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, |
| 100 | + and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} |
| 101 | + Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, |
| 102 | + and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} |
| 103 | + No more than 64 labels can be assigned to a given resource. |
| 104 | + An object containing a list of "key": value pairs. Example: |
| 105 | + { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| 106 | + |
| 107 | + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. |
| 108 | + Please refer to the field `effective_labels` for all of the labels present on the resource. |
| 109 | + |
| 110 | +* `format` - |
| 111 | + (Optional) |
| 112 | + The format type of the parameter resource. |
| 113 | + Default value is `UNFORMATTED`. |
| 114 | + Possible values are: `UNFORMATTED`, `YAML`, `JSON`. |
| 115 | + |
| 116 | +* `project` - (Optional) The ID of the project in which the resource belongs. |
| 117 | + If it is not provided, the provider project is used. |
| 118 | + |
| 119 | + |
| 120 | +## Attributes Reference |
| 121 | + |
| 122 | +In addition to the arguments listed above, the following computed attributes are exported: |
| 123 | + |
| 124 | +* `id` - an identifier for the resource with format `projects/{{project}}/locations/global/parameters/{{parameter_id}}` |
| 125 | + |
| 126 | +* `name` - |
| 127 | + The resource name of the Parameter. Format: |
| 128 | + `projects/{{project}}/locations/global/parameters/{{parameter_id}}` |
| 129 | + |
| 130 | +* `create_time` - |
| 131 | + The time at which the Parameter was created. |
| 132 | + |
| 133 | +* `update_time` - |
| 134 | + The time at which the Parameter was updated. |
| 135 | + |
| 136 | +* `policy_member` - |
| 137 | + Policy member strings of a Google Cloud resource. |
| 138 | + Structure is [documented below](#nested_policy_member). |
| 139 | + |
| 140 | +* `terraform_labels` - |
| 141 | + The combination of labels configured directly on the resource |
| 142 | + and default labels configured on the provider. |
| 143 | + |
| 144 | +* `effective_labels` - |
| 145 | + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. |
| 146 | + |
| 147 | + |
| 148 | +<a name="nested_policy_member"></a>The `policy_member` block contains: |
| 149 | + |
| 150 | +* `iam_policy_uid_principal` - |
| 151 | + (Output) |
| 152 | + IAM policy binding member referring to a Google Cloud resource by system-assigned unique identifier. |
| 153 | + If a resource is deleted and recreated with the same name, the binding will not be applicable to the |
| 154 | + new resource. Format: |
| 155 | + `principal://parametermanager.googleapis.com/projects/{{project}}/uid/locations/global/parameters/{{uid}}` |
| 156 | + |
| 157 | +* `iam_policy_name_principal` - |
| 158 | + (Output) |
| 159 | + IAM policy binding member referring to a Google Cloud resource by user-assigned name. If a |
| 160 | + resource is deleted and recreated with the same name, the binding will be applicable to the |
| 161 | + new resource. Format: |
| 162 | + `principal://parametermanager.googleapis.com/projects/{{project}}/name/locations/global/parameters/{{parameter_id}}` |
| 163 | + |
| 164 | +## Timeouts |
| 165 | + |
| 166 | +This resource provides the following |
| 167 | +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| 168 | + |
| 169 | +- `create` - Default is 20 minutes. |
| 170 | +- `update` - Default is 20 minutes. |
| 171 | +- `delete` - Default is 20 minutes. |
| 172 | + |
| 173 | +## Import |
| 174 | + |
| 175 | + |
| 176 | +Parameter can be imported using any of these accepted formats: |
| 177 | + |
| 178 | +* `projects/{{project}}/locations/global/parameters/{{parameter_id}}` |
| 179 | +* `{{project}}/{{parameter_id}}` |
| 180 | +* `{{parameter_id}}` |
| 181 | + |
| 182 | + |
| 183 | +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Parameter using one of the formats above. For example: |
| 184 | + |
| 185 | +```tf |
| 186 | +import { |
| 187 | + id = "projects/{{project}}/locations/global/parameters/{{parameter_id}}" |
| 188 | + to = google_parameter_manager_parameter.default |
| 189 | +} |
| 190 | +``` |
| 191 | + |
| 192 | +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Parameter can be imported using one of the formats above. For example: |
| 193 | + |
| 194 | +``` |
| 195 | +$ terraform import google_parameter_manager_parameter.default projects/{{project}}/locations/global/parameters/{{parameter_id}} |
| 196 | +$ terraform import google_parameter_manager_parameter.default {{project}}/{{parameter_id}} |
| 197 | +$ terraform import google_parameter_manager_parameter.default {{parameter_id}} |
| 198 | +``` |
| 199 | + |
| 200 | +## User Project Overrides |
| 201 | + |
| 202 | +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |
0 commit comments