-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate compute instance and subnetwork iam
- Loading branch information
1 parent
614f406
commit ae6cc70
Showing
12 changed files
with
69 additions
and
886 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
resource "google_compute_instance" "<%= ctx[:primary_resource_id] %>" { | ||
name = "<%= ctx[:vars]['instance_name'] %>" | ||
zone = "<%= ctx[:vars]['zone_name'] %>" | ||
machine_type = "n1-standard-1" | ||
|
||
boot_disk { | ||
initialize_params { | ||
image = "debian-cloud/debian-9" | ||
} | ||
} | ||
|
||
network_interface { | ||
network = "default" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,14 +243,29 @@ exported: | |
|
||
## Import | ||
|
||
<%= product_ns -%> <%= object.name.downcase -%> IAM resources can be imported using the project, resource identifiers, role and member. | ||
For all import syntaxes, the "resource in question" can take any of the following forms: | ||
|
||
<% import_id_formats(object).each do |id_format| -%> | ||
* <%= id_format %> | ||
<% end -%> | ||
|
||
Any variables not passed in the import command will be taken from the provider configuration. | ||
|
||
<%= product_ns -%> <%= object.name.downcase -%> IAM resources can be imported using the resource identifiers, role, and member. | ||
|
||
IAM member imports use space-delimited identifiers: the resource in question, the role, and the member identity, e.g. | ||
``` | ||
$ terraform import <% if object.min_version.name == 'beta' %>-provider=google-beta <% end -%><%= resource_ns_iam -%>_member.editor "<%= object.id_format.gsub('{{name}}', "{{#{object.name.underscore}}}") -%> <%= object.iam_policy.allowed_iam_role -%> [email protected]" | ||
``` | ||
$ terraform import <%= resource_ns_iam -%>_policy.editor <%= object.id_format.gsub('{{name}}', "{{#{object.name.underscore}}}") %> | ||
|
||
IAM binding imports use space-delimited identifiers: the resource in question and the role, e.g. | ||
``` | ||
$ terraform import <%= resource_ns_iam -%>_binding.editor "<%= object.id_format.gsub('{{name}}', "{{#{object.name.underscore}}}") -%> <%= object.iam_policy.allowed_iam_role -%>" | ||
``` | ||
|
||
$ terraform import <%= resource_ns_iam -%>_member.editor "<%= object.id_format.gsub('{{name}}', "{{#{object.name.underscore}}}") -%> <%= object.iam_policy.allowed_iam_role -%> [email protected]" | ||
IAM policy imports use the identifier of the resource in question, e.g. | ||
``` | ||
$ terraform import <% if object.min_version.name == 'beta' %>-provider=google-beta <% end -%><%= resource_ns_iam -%>_policy.editor <%= object.id_format.gsub('{{name}}', "{{#{object.name.underscore}}}") %> | ||
``` | ||
|
||
-> If you're importing a resource with beta features, make sure to include `-provider=google-beta` | ||
|
147 changes: 0 additions & 147 deletions
147
third_party/terraform/resources/iam_compute_instance.go
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.