mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-03 01:01:06 +00:00
Support service accounts on GCE instances
Update the Google Compute Engine provider to add support for service accounts on `google_compute_instance`. Both gcloud shorthand (`compute-ro`, `storage-ro`, etc.) and OAuth2 API endpoints are supported. This feature is currently limited to a single service account (supporting multiple scopes) and an automatically-generated service account email.
This commit is contained in:
parent
3916ab21af
commit
1ec0749d5d
@ -30,6 +30,10 @@ resource "google_compute_instance" "default" {
|
|||||||
metadata {
|
metadata {
|
||||||
foo = "bar"
|
foo = "bar"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
service_account {
|
||||||
|
scopes = ["userinfo-email", "compute-ro", "storage-ro"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -60,6 +64,8 @@ The following arguments are supported:
|
|||||||
specified multiple times for multiple networks. Structure is documented
|
specified multiple times for multiple networks. Structure is documented
|
||||||
below.
|
below.
|
||||||
|
|
||||||
|
* `service_account` - (Optional) Service account to attach to the instance.
|
||||||
|
|
||||||
* `tags` - (Optional) Tags to attach to the instance.
|
* `tags` - (Optional) Tags to attach to the instance.
|
||||||
|
|
||||||
The `disk` block supports:
|
The `disk` block supports:
|
||||||
@ -82,6 +88,11 @@ The `network` block supports:
|
|||||||
* `address` - (Optional) The IP address of a reserved IP address to assign
|
* `address` - (Optional) The IP address of a reserved IP address to assign
|
||||||
to this interface.
|
to this interface.
|
||||||
|
|
||||||
|
The `service_account` block supports:
|
||||||
|
|
||||||
|
* `scopes` - (Required) A list of service scopes. Both OAuth2 URLs and gcloud
|
||||||
|
short names are supported.
|
||||||
|
|
||||||
## Attributes Reference
|
## Attributes Reference
|
||||||
|
|
||||||
The following attributes are exported:
|
The following attributes are exported:
|
||||||
|
Loading…
Reference in New Issue
Block a user