Skip to content

Commit

Permalink
Add support for google_compute_project_metadata_item (hashicorp#176)
Browse files Browse the repository at this point in the history
* Add support for google_compute_project_metadata_item

This allows terraform users to manage single key/value items within the
project metadata map, rather than the entire map itself.

* Update CHANGELOG.md

* Add details about import
  • Loading branch information
selmanj authored Jul 17, 2017
1 parent 3fb0b55 commit f1ca47c
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/r/compute_project_metadata.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ description: |-

# google\_compute\_project\_metadata

Manages metadata common to all instances for a project in GCE.
Manages metadata common to all instances for a project in GCE. If you
want to manage only single key/value pairs within the project metadata
rather than the entire set, then use
[google_compute_project_metadata_item](compute_project_metadata_item.html).

## Example Usage

Expand Down
48 changes: 48 additions & 0 deletions docs/r/compute_project_metadata_item.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
layout: "google"
page_title: "Google: google_compute_project_metadata_item"
sidebar_current: "docs-google-compute-project-metadata-item"
description: |-
Manages a single key/value pair on common instance metadata
---

# google\_compute\_project\_metadata\_item

Manages a single key/value pair on metadata common to all instances for
a project in GCE. Using `google_compute_project_metadata_item` lets you
manage a single key/value setting in Terraform rather than the entire
project metadata map.

## Example Usage

```hcl
resource "google_compute_project_metadata_item" "default" {
key = "my_metadata"
value = "my_value"
}
```

## Argument Reference

The following arguments are supported:

* `key` - (Required) The metadata key to set.

* `value` - (Required) The value to set for the given metadata key.

- - -

* `project` - (Optional) The project in which the resource belongs. If it
is not provided, the provider project is used.

## Attributes Reference

Only the arguments listed above are exposed as attributes.

## Import

Project metadata items can be imported using the `key`, e.g.

```
$ terraform import google_compute_project_metadata_item.default my_metadata
```
4 changes: 4 additions & 0 deletions google.erb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@
<a href="/docs/providers/google/r/compute_project_metadata.html">google_compute_project_metadata</a>
</li>

<li<%= sidebar_current("docs-google-compute-project-metadata-item") %>>
<a href="/docs/providers/google/r/compute_project_metadata_item.html">google_compute_project_metadata_item</a>
</li>

<li<%= sidebar_current("docs-google-compute-region-backend-service") %>>
<a href="/docs/providers/google/r/compute_region_backend_service.html">google_compute_region_backend_service</a>
</li>
Expand Down

0 comments on commit f1ca47c

Please sign in to comment.