File tree Expand file tree Collapse file tree 8 files changed +57
-3
lines changed
automatic-labelling-from-localhost
automatic-labelling-from-repository
automatic-labelling-from-localhost
automatic-labelling-from-repository
integration/automatic-labelling Expand file tree Collapse file tree 8 files changed +57
-3
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ resource "google_compute_instance" "main" {
8989 }
9090
9191 machine_type = " f1-micro"
92- name = " unlabelled"
92+ name = " unlabelled- ${ random_pet . main . id } "
9393 zone = " ${ var . zone } "
9494
9595 network_interface = {
Original file line number Diff line number Diff line change 1+ /* *
2+ * Copyright 2019 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ output "compute_instance_name" {
18+ value = " ${ google_compute_instance . main . name } "
19+ description = " The name of the unlabelled Compute instance."
20+ }
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ resource "google_compute_instance" "main" {
118118 }
119119
120120 machine_type = " f1-micro"
121- name = " unlabelled"
121+ name = " unlabelled- ${ random_pet . main . id } "
122122 zone = " ${ var . zone } "
123123
124124 network_interface = {
Original file line number Diff line number Diff line change 1+ /* *
2+ * Copyright 2019 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ output "compute_instance_name" {
18+ value = " ${ google_compute_instance . main . name } "
19+ description = " The name of the unlabelled Compute instance."
20+ }
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17+ output "compute_instance_name" {
18+ value = " ${ module . automatic_labelling_from_localhost . compute_instance_name } "
19+ description = " The name of the unlabelled Compute instance."
20+ }
21+
1722output "project_id" {
1823 value = " ${ var . project_id } "
1924 description = " The ID of the project to which resources are applied."
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17+ output "compute_instance_name" {
18+ value = " ${ module . automatic_labelling_from_repository . compute_instance_name } "
19+ description = " The name of the unlabelled Compute instance."
20+ }
21+
1722output "project_id" {
1823 value = " ${ var . project_id } "
1924 description = " The ID of the project to which resources are applied."
Original file line number Diff line number Diff line change 2020 describe google_compute_instance (
2121 project : attribute ( "project_id" ) ,
2222 zone : attribute ( "zone" ) ,
23- name : "unlabelled" ,
23+ name : attribute ( "compute_instance_name" ) ,
2424 ) do
2525 let :principal_email do
2626 JSON . parse ( File . read ( ENV . fetch ( "GOOGLE_APPLICATION_CREDENTIALS" ) ) ) . fetch ( "client_email" ) . split ( "@" ) . first
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ depends:
2020 git : https://github.com/inspec/inspec-gcp.git
2121 tag : v0.10.0
2222attributes :
23+ - name : compute_instance_name
24+ type : string
25+ required : true
26+ description : " The name of the unlabelled Compute instance."
2327 - name : project_id
2428 type : string
2529 required : true
You can’t perform that action at this time.
0 commit comments