Skip to content

Commit 625c343

Browse files
authored
feat: add resource_manager_tags to bastion compute_instance (#227)
1 parent 0ec29c1 commit 625c343

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ If the user does not share the same domain as the org the bastion is in, you wil
9696
| project | The project ID to deploy to | `string` | n/a | yes |
9797
| random\_role\_id | Enables role random id generation. | `bool` | `true` | no |
9898
| region | The region where the bastion instance template will live | `string` | `null` | no |
99+
| resource\_manager\_tags | (Optional) A tag is a key-value pair that can be attached to a Google Cloud resource. You can use tags to conditionally allow or deny policies based on whether a resource has a specific tag. This value is not returned by the API. In Terraform, this value cannot be updated and changing it will recreate the resource. | `map(string)` | `null` | no |
99100
| scopes | List of scopes to attach to the bastion host | `list(string)` | <pre>[<br> "cloud-platform"<br>]</pre> | no |
100101
| service\_account\_email | If set, the service account and its permissions will not be created. The service account being passed in should have at least the roles listed in the `service_account_roles` variable so that logging and OS Login work as expected. | `string` | `""` | no |
101102
| service\_account\_name | Account ID for the service account | `string` | `"bastion"` | no |

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ resource "google_compute_instance_from_template" "bastion_vm" {
103103
}
104104

105105
source_instance_template = module.instance_template.self_link
106+
107+
params {
108+
resource_manager_tags = var.resource_manager_tags
109+
}
106110
}
107111

108112
module "iap_tunneling" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,3 +287,9 @@ variable "can_ip_forward" {
287287
description = "Whether the bastion should allow IP forwarding."
288288
default = false
289289
}
290+
291+
variable "resource_manager_tags" {
292+
description = "(Optional) A tag is a key-value pair that can be attached to a Google Cloud resource. You can use tags to conditionally allow or deny policies based on whether a resource has a specific tag. This value is not returned by the API. In Terraform, this value cannot be updated and changing it will recreate the resource."
293+
type = map(string)
294+
default = null
295+
}

0 commit comments

Comments
 (0)