diff --git a/test/fixtures/compute_instance/disk_snapshot/main.tf b/fixtures/compute_instance/disk_snapshot/main.tf similarity index 100% rename from test/fixtures/compute_instance/disk_snapshot/main.tf rename to fixtures/compute_instance/disk_snapshot/main.tf diff --git a/fixtures/compute_instance/disk_snapshot/network.tf b/fixtures/compute_instance/disk_snapshot/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/compute_instance/disk_snapshot/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/compute_instance/disk_snapshot/outputs.tf b/fixtures/compute_instance/disk_snapshot/outputs.tf similarity index 100% rename from test/fixtures/compute_instance/disk_snapshot/outputs.tf rename to fixtures/compute_instance/disk_snapshot/outputs.tf diff --git a/test/fixtures/compute_instance/disk_snapshot/variables.tf b/fixtures/compute_instance/disk_snapshot/variables.tf similarity index 100% rename from test/fixtures/compute_instance/disk_snapshot/variables.tf rename to fixtures/compute_instance/disk_snapshot/variables.tf diff --git a/test/fixtures/compute_instance/disk_snapshot/versions.tf b/fixtures/compute_instance/disk_snapshot/versions.tf similarity index 100% rename from test/fixtures/compute_instance/disk_snapshot/versions.tf rename to fixtures/compute_instance/disk_snapshot/versions.tf diff --git a/test/fixtures/compute_instance/simple_zone/main.tf b/fixtures/compute_instance/simple_zone/main.tf similarity index 100% rename from test/fixtures/compute_instance/simple_zone/main.tf rename to fixtures/compute_instance/simple_zone/main.tf diff --git a/fixtures/compute_instance/simple_zone/network.tf b/fixtures/compute_instance/simple_zone/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/compute_instance/simple_zone/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/compute_instance/simple_zone/outputs.tf b/fixtures/compute_instance/simple_zone/outputs.tf similarity index 100% rename from test/fixtures/compute_instance/simple_zone/outputs.tf rename to fixtures/compute_instance/simple_zone/outputs.tf diff --git a/test/fixtures/compute_instance/simple_zone/variables.tf b/fixtures/compute_instance/simple_zone/variables.tf similarity index 100% rename from test/fixtures/compute_instance/simple_zone/variables.tf rename to fixtures/compute_instance/simple_zone/variables.tf diff --git a/test/fixtures/compute_instance/simple_zone/versions.tf b/fixtures/compute_instance/simple_zone/versions.tf similarity index 100% rename from test/fixtures/compute_instance/simple_zone/versions.tf rename to fixtures/compute_instance/simple_zone/versions.tf diff --git a/test/fixtures/confidential_compute_instance/main.tf b/fixtures/confidential_compute_instance/main.tf similarity index 100% rename from test/fixtures/confidential_compute_instance/main.tf rename to fixtures/confidential_compute_instance/main.tf diff --git a/fixtures/confidential_compute_instance/network.tf b/fixtures/confidential_compute_instance/network.tf new file mode 100644 index 00000000..4c7435f9 --- /dev/null +++ b/fixtures/confidential_compute_instance/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/confidential_compute_instance/outputs.tf b/fixtures/confidential_compute_instance/outputs.tf similarity index 100% rename from test/fixtures/confidential_compute_instance/outputs.tf rename to fixtures/confidential_compute_instance/outputs.tf diff --git a/test/fixtures/confidential_compute_instance/variables.tf b/fixtures/confidential_compute_instance/variables.tf similarity index 100% rename from test/fixtures/confidential_compute_instance/variables.tf rename to fixtures/confidential_compute_instance/variables.tf diff --git a/test/fixtures/confidential_compute_instance/versions.tf b/fixtures/confidential_compute_instance/versions.tf similarity index 100% rename from test/fixtures/confidential_compute_instance/versions.tf rename to fixtures/confidential_compute_instance/versions.tf diff --git a/test/fixtures/confidential_instance_template/main.tf b/fixtures/confidential_instance_template/main.tf similarity index 100% rename from test/fixtures/confidential_instance_template/main.tf rename to fixtures/confidential_instance_template/main.tf diff --git a/fixtures/confidential_instance_template/network.tf b/fixtures/confidential_instance_template/network.tf new file mode 100644 index 00000000..4c7435f9 --- /dev/null +++ b/fixtures/confidential_instance_template/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/confidential_instance_template/outputs.tf b/fixtures/confidential_instance_template/outputs.tf similarity index 100% rename from test/fixtures/confidential_instance_template/outputs.tf rename to fixtures/confidential_instance_template/outputs.tf diff --git a/test/fixtures/confidential_instance_template/variables.tf b/fixtures/confidential_instance_template/variables.tf similarity index 100% rename from test/fixtures/confidential_instance_template/variables.tf rename to fixtures/confidential_instance_template/variables.tf diff --git a/test/fixtures/confidential_instance_template/versions.tf b/fixtures/confidential_instance_template/versions.tf similarity index 100% rename from test/fixtures/confidential_instance_template/versions.tf rename to fixtures/confidential_instance_template/versions.tf diff --git a/test/fixtures/confidential_intel_compute_instance/main.tf b/fixtures/confidential_intel_compute_instance/main.tf similarity index 100% rename from test/fixtures/confidential_intel_compute_instance/main.tf rename to fixtures/confidential_intel_compute_instance/main.tf diff --git a/fixtures/confidential_intel_compute_instance/network.tf b/fixtures/confidential_intel_compute_instance/network.tf new file mode 100644 index 00000000..4c7435f9 --- /dev/null +++ b/fixtures/confidential_intel_compute_instance/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/confidential_intel_compute_instance/outputs.tf b/fixtures/confidential_intel_compute_instance/outputs.tf similarity index 100% rename from test/fixtures/confidential_intel_compute_instance/outputs.tf rename to fixtures/confidential_intel_compute_instance/outputs.tf diff --git a/test/fixtures/confidential_intel_compute_instance/variables.tf b/fixtures/confidential_intel_compute_instance/variables.tf similarity index 100% rename from test/fixtures/confidential_intel_compute_instance/variables.tf rename to fixtures/confidential_intel_compute_instance/variables.tf diff --git a/test/fixtures/confidential_intel_compute_instance/versions.tf b/fixtures/confidential_intel_compute_instance/versions.tf similarity index 100% rename from test/fixtures/confidential_intel_compute_instance/versions.tf rename to fixtures/confidential_intel_compute_instance/versions.tf diff --git a/test/fixtures/instance_simple/main.tf b/fixtures/instance_simple/main.tf similarity index 100% rename from test/fixtures/instance_simple/main.tf rename to fixtures/instance_simple/main.tf diff --git a/fixtures/instance_simple/network.tf b/fixtures/instance_simple/network.tf new file mode 100644 index 00000000..4c7435f9 --- /dev/null +++ b/fixtures/instance_simple/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/instance_simple/outputs.tf b/fixtures/instance_simple/outputs.tf similarity index 100% rename from test/fixtures/instance_simple/outputs.tf rename to fixtures/instance_simple/outputs.tf diff --git a/test/fixtures/instance_simple/variables.tf b/fixtures/instance_simple/variables.tf similarity index 100% rename from test/fixtures/instance_simple/variables.tf rename to fixtures/instance_simple/variables.tf diff --git a/test/fixtures/instance_simple/versions.tf b/fixtures/instance_simple/versions.tf similarity index 100% rename from test/fixtures/instance_simple/versions.tf rename to fixtures/instance_simple/versions.tf diff --git a/test/fixtures/instance_template/additional_disks/main.tf b/fixtures/instance_template/additional_disks/main.tf similarity index 100% rename from test/fixtures/instance_template/additional_disks/main.tf rename to fixtures/instance_template/additional_disks/main.tf diff --git a/fixtures/instance_template/additional_disks/network.tf b/fixtures/instance_template/additional_disks/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/instance_template/additional_disks/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/instance_template/additional_disks/outputs.tf b/fixtures/instance_template/additional_disks/outputs.tf similarity index 100% rename from test/fixtures/instance_template/additional_disks/outputs.tf rename to fixtures/instance_template/additional_disks/outputs.tf diff --git a/test/fixtures/instance_template/additional_disks/variables.tf b/fixtures/instance_template/additional_disks/variables.tf similarity index 100% rename from test/fixtures/instance_template/additional_disks/variables.tf rename to fixtures/instance_template/additional_disks/variables.tf diff --git a/test/fixtures/instance_template/additional_disks/versions.tf b/fixtures/instance_template/additional_disks/versions.tf similarity index 100% rename from test/fixtures/instance_template/additional_disks/versions.tf rename to fixtures/instance_template/additional_disks/versions.tf diff --git a/test/fixtures/instance_template/alias_ip_range/main.tf b/fixtures/instance_template/alias_ip_range/main.tf similarity index 100% rename from test/fixtures/instance_template/alias_ip_range/main.tf rename to fixtures/instance_template/alias_ip_range/main.tf diff --git a/fixtures/instance_template/alias_ip_range/network.tf b/fixtures/instance_template/alias_ip_range/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/instance_template/alias_ip_range/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/instance_template/alias_ip_range/outputs.tf b/fixtures/instance_template/alias_ip_range/outputs.tf similarity index 100% rename from test/fixtures/instance_template/alias_ip_range/outputs.tf rename to fixtures/instance_template/alias_ip_range/outputs.tf diff --git a/test/fixtures/instance_template/alias_ip_range/variables.tf b/fixtures/instance_template/alias_ip_range/variables.tf similarity index 100% rename from test/fixtures/instance_template/alias_ip_range/variables.tf rename to fixtures/instance_template/alias_ip_range/variables.tf diff --git a/test/fixtures/instance_template/alias_ip_range/versions.tf b/fixtures/instance_template/alias_ip_range/versions.tf similarity index 100% rename from test/fixtures/instance_template/alias_ip_range/versions.tf rename to fixtures/instance_template/alias_ip_range/versions.tf diff --git a/test/fixtures/instance_template/simple/main.tf b/fixtures/instance_template/simple/main.tf similarity index 100% rename from test/fixtures/instance_template/simple/main.tf rename to fixtures/instance_template/simple/main.tf diff --git a/fixtures/instance_template/simple/network.tf b/fixtures/instance_template/simple/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/instance_template/simple/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/instance_template/simple/outputs.tf b/fixtures/instance_template/simple/outputs.tf similarity index 100% rename from test/fixtures/instance_template/simple/outputs.tf rename to fixtures/instance_template/simple/outputs.tf diff --git a/test/fixtures/instance_template/simple/variables.tf b/fixtures/instance_template/simple/variables.tf similarity index 100% rename from test/fixtures/instance_template/simple/variables.tf rename to fixtures/instance_template/simple/variables.tf diff --git a/test/fixtures/instance_template/simple/versions.tf b/fixtures/instance_template/simple/versions.tf similarity index 100% rename from test/fixtures/instance_template/simple/versions.tf rename to fixtures/instance_template/simple/versions.tf diff --git a/test/fixtures/mig/autoscaler/main.tf b/fixtures/mig/autoscaler/main.tf similarity index 100% rename from test/fixtures/mig/autoscaler/main.tf rename to fixtures/mig/autoscaler/main.tf diff --git a/fixtures/mig/autoscaler/network.tf b/fixtures/mig/autoscaler/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/mig/autoscaler/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/mig/autoscaler/outputs.tf b/fixtures/mig/autoscaler/outputs.tf similarity index 100% rename from test/fixtures/mig/autoscaler/outputs.tf rename to fixtures/mig/autoscaler/outputs.tf diff --git a/test/fixtures/mig/autoscaler/variables.tf b/fixtures/mig/autoscaler/variables.tf similarity index 100% rename from test/fixtures/mig/autoscaler/variables.tf rename to fixtures/mig/autoscaler/variables.tf diff --git a/test/fixtures/mig/autoscaler/versions.tf b/fixtures/mig/autoscaler/versions.tf similarity index 100% rename from test/fixtures/mig/autoscaler/versions.tf rename to fixtures/mig/autoscaler/versions.tf diff --git a/test/fixtures/mig/healthcheck/main.tf b/fixtures/mig/healthcheck/main.tf similarity index 100% rename from test/fixtures/mig/healthcheck/main.tf rename to fixtures/mig/healthcheck/main.tf diff --git a/test/fixtures/mig/healthcheck/outputs.tf b/fixtures/mig/healthcheck/outputs.tf similarity index 100% rename from test/fixtures/mig/healthcheck/outputs.tf rename to fixtures/mig/healthcheck/outputs.tf diff --git a/test/fixtures/mig/healthcheck/variables.tf b/fixtures/mig/healthcheck/variables.tf similarity index 100% rename from test/fixtures/mig/healthcheck/variables.tf rename to fixtures/mig/healthcheck/variables.tf diff --git a/test/fixtures/mig/healthcheck/versions.tf b/fixtures/mig/healthcheck/versions.tf similarity index 100% rename from test/fixtures/mig/healthcheck/versions.tf rename to fixtures/mig/healthcheck/versions.tf diff --git a/test/fixtures/mig/simple/main.tf b/fixtures/mig/simple/main.tf similarity index 100% rename from test/fixtures/mig/simple/main.tf rename to fixtures/mig/simple/main.tf diff --git a/fixtures/mig/simple/network.tf b/fixtures/mig/simple/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/mig/simple/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/mig/simple/outputs.tf b/fixtures/mig/simple/outputs.tf similarity index 100% rename from test/fixtures/mig/simple/outputs.tf rename to fixtures/mig/simple/outputs.tf diff --git a/test/fixtures/mig/simple/variables.tf b/fixtures/mig/simple/variables.tf similarity index 100% rename from test/fixtures/mig/simple/variables.tf rename to fixtures/mig/simple/variables.tf diff --git a/test/fixtures/mig/simple/versions.tf b/fixtures/mig/simple/versions.tf similarity index 100% rename from test/fixtures/mig/simple/versions.tf rename to fixtures/mig/simple/versions.tf diff --git a/test/fixtures/mig_stateful/main.tf b/fixtures/mig_stateful/main.tf similarity index 100% rename from test/fixtures/mig_stateful/main.tf rename to fixtures/mig_stateful/main.tf diff --git a/fixtures/mig_stateful/network.tf b/fixtures/mig_stateful/network.tf new file mode 100644 index 00000000..4c7435f9 --- /dev/null +++ b/fixtures/mig_stateful/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/mig_stateful/outputs.tf b/fixtures/mig_stateful/outputs.tf similarity index 100% rename from test/fixtures/mig_stateful/outputs.tf rename to fixtures/mig_stateful/outputs.tf diff --git a/test/fixtures/mig_stateful/variables.tf b/fixtures/mig_stateful/variables.tf similarity index 100% rename from test/fixtures/mig_stateful/variables.tf rename to fixtures/mig_stateful/variables.tf diff --git a/test/fixtures/mig_stateful/versions.tf b/fixtures/mig_stateful/versions.tf similarity index 100% rename from test/fixtures/mig_stateful/versions.tf rename to fixtures/mig_stateful/versions.tf diff --git a/test/fixtures/mig_with_percent/simple/main.tf b/fixtures/mig_with_percent/simple/main.tf similarity index 100% rename from test/fixtures/mig_with_percent/simple/main.tf rename to fixtures/mig_with_percent/simple/main.tf diff --git a/fixtures/mig_with_percent/simple/network.tf b/fixtures/mig_with_percent/simple/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/mig_with_percent/simple/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/mig_with_percent/simple/outputs.tf b/fixtures/mig_with_percent/simple/outputs.tf similarity index 100% rename from test/fixtures/mig_with_percent/simple/outputs.tf rename to fixtures/mig_with_percent/simple/outputs.tf diff --git a/test/fixtures/mig_with_percent/simple/variables.tf b/fixtures/mig_with_percent/simple/variables.tf similarity index 100% rename from test/fixtures/mig_with_percent/simple/variables.tf rename to fixtures/mig_with_percent/simple/variables.tf diff --git a/test/fixtures/mig_with_percent/simple/versions.tf b/fixtures/mig_with_percent/simple/versions.tf similarity index 100% rename from test/fixtures/mig_with_percent/simple/versions.tf rename to fixtures/mig_with_percent/simple/versions.tf diff --git a/test/fixtures/preemptible_and_regular_instance_templates/simple/main.tf b/fixtures/preemptible_and_regular_instance_templates/simple/main.tf similarity index 100% rename from test/fixtures/preemptible_and_regular_instance_templates/simple/main.tf rename to fixtures/preemptible_and_regular_instance_templates/simple/main.tf diff --git a/fixtures/preemptible_and_regular_instance_templates/simple/network.tf b/fixtures/preemptible_and_regular_instance_templates/simple/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/preemptible_and_regular_instance_templates/simple/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/preemptible_and_regular_instance_templates/simple/outputs.tf b/fixtures/preemptible_and_regular_instance_templates/simple/outputs.tf similarity index 100% rename from test/fixtures/preemptible_and_regular_instance_templates/simple/outputs.tf rename to fixtures/preemptible_and_regular_instance_templates/simple/outputs.tf diff --git a/test/fixtures/preemptible_and_regular_instance_templates/simple/variables.tf b/fixtures/preemptible_and_regular_instance_templates/simple/variables.tf similarity index 100% rename from test/fixtures/preemptible_and_regular_instance_templates/simple/variables.tf rename to fixtures/preemptible_and_regular_instance_templates/simple/variables.tf diff --git a/test/fixtures/preemptible_and_regular_instance_templates/simple/versions.tf b/fixtures/preemptible_and_regular_instance_templates/simple/versions.tf similarity index 100% rename from test/fixtures/preemptible_and_regular_instance_templates/simple/versions.tf rename to fixtures/preemptible_and_regular_instance_templates/simple/versions.tf diff --git a/test/fixtures/shared/network.tf b/fixtures/shared/network.tf similarity index 100% rename from test/fixtures/shared/network.tf rename to fixtures/shared/network.tf diff --git a/test/fixtures/shared/variables.tf b/fixtures/shared/variables.tf similarity index 100% rename from test/fixtures/shared/variables.tf rename to fixtures/shared/variables.tf diff --git a/test/fixtures/umig/named_ports/main.tf b/fixtures/umig/named_ports/main.tf similarity index 100% rename from test/fixtures/umig/named_ports/main.tf rename to fixtures/umig/named_ports/main.tf diff --git a/fixtures/umig/named_ports/network.tf b/fixtures/umig/named_ports/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/umig/named_ports/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/umig/named_ports/outputs.tf b/fixtures/umig/named_ports/outputs.tf similarity index 100% rename from test/fixtures/umig/named_ports/outputs.tf rename to fixtures/umig/named_ports/outputs.tf diff --git a/test/fixtures/umig/named_ports/variables.tf b/fixtures/umig/named_ports/variables.tf similarity index 100% rename from test/fixtures/umig/named_ports/variables.tf rename to fixtures/umig/named_ports/variables.tf diff --git a/test/fixtures/umig/named_ports/versions.tf b/fixtures/umig/named_ports/versions.tf similarity index 100% rename from test/fixtures/umig/named_ports/versions.tf rename to fixtures/umig/named_ports/versions.tf diff --git a/test/fixtures/umig/simple/main.tf b/fixtures/umig/simple/main.tf similarity index 100% rename from test/fixtures/umig/simple/main.tf rename to fixtures/umig/simple/main.tf diff --git a/fixtures/umig/simple/network.tf b/fixtures/umig/simple/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/umig/simple/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/umig/simple/outputs.tf b/fixtures/umig/simple/outputs.tf similarity index 100% rename from test/fixtures/umig/simple/outputs.tf rename to fixtures/umig/simple/outputs.tf diff --git a/test/fixtures/umig/simple/variables.tf b/fixtures/umig/simple/variables.tf similarity index 100% rename from test/fixtures/umig/simple/variables.tf rename to fixtures/umig/simple/variables.tf diff --git a/test/fixtures/umig/simple/versions.tf b/fixtures/umig/simple/versions.tf similarity index 100% rename from test/fixtures/umig/simple/versions.tf rename to fixtures/umig/simple/versions.tf diff --git a/test/fixtures/umig/static_ips/main.tf b/fixtures/umig/static_ips/main.tf similarity index 100% rename from test/fixtures/umig/static_ips/main.tf rename to fixtures/umig/static_ips/main.tf diff --git a/fixtures/umig/static_ips/network.tf b/fixtures/umig/static_ips/network.tf new file mode 100644 index 00000000..ab362d34 --- /dev/null +++ b/fixtures/umig/static_ips/network.tf @@ -0,0 +1,17 @@ +/** + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/umig/static_ips/outputs.tf b/fixtures/umig/static_ips/outputs.tf similarity index 100% rename from test/fixtures/umig/static_ips/outputs.tf rename to fixtures/umig/static_ips/outputs.tf diff --git a/test/fixtures/umig/static_ips/variables.tf b/fixtures/umig/static_ips/variables.tf similarity index 100% rename from test/fixtures/umig/static_ips/variables.tf rename to fixtures/umig/static_ips/variables.tf diff --git a/test/fixtures/umig/static_ips/versions.tf b/fixtures/umig/static_ips/versions.tf similarity index 100% rename from test/fixtures/umig/static_ips/versions.tf rename to fixtures/umig/static_ips/versions.tf diff --git a/metadata.display.yaml b/metadata.display.yaml new file mode 100644 index 00000000..95768741 --- /dev/null +++ b/metadata.display.yaml @@ -0,0 +1,28 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: blueprints.cloud.google.com/v1alpha1 +kind: BlueprintMetadata +metadata: + name: terraform-google-vm-display + annotations: + config.kubernetes.io/local-config: "true" +spec: + info: + title: terraform-google-vm + source: + repo: https://github.com/terraform-google-modules/terraform-google-vm + sourceType: git + ui: + input: {} diff --git a/modules/compute_disk_snapshot/metadata.display.yaml b/modules/compute_disk_snapshot/metadata.display.yaml new file mode 100644 index 00000000..aaa7172c --- /dev/null +++ b/modules/compute_disk_snapshot/metadata.display.yaml @@ -0,0 +1,54 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: blueprints.cloud.google.com/v1alpha1 +kind: BlueprintMetadata +metadata: + name: terraform-google-vm-compute-disk-snapshot-display + annotations: + config.kubernetes.io/local-config: "true" +spec: + info: + title: Compute Disk Snapshot + source: + repo: https://github.com/terraform-google-modules/terraform-google-vm + sourceType: git + dir: /modules/compute_disk_snapshot + ui: + input: + variables: + disks: + name: disks + title: Disks + module_depends_on: + name: module_depends_on + title: Module Depends On + name: + name: name + title: Name + project: + name: project + title: Project + region: + name: region + title: Region + snapshot_properties: + name: snapshot_properties + title: Snapshot Properties + snapshot_retention_policy: + name: snapshot_retention_policy + title: Snapshot Retention Policy + snapshot_schedule: + name: snapshot_schedule + title: Snapshot Schedule diff --git a/modules/compute_disk_snapshot/metadata.yaml b/modules/compute_disk_snapshot/metadata.yaml index 12a89ba9..40c7adda 100644 --- a/modules/compute_disk_snapshot/metadata.yaml +++ b/modules/compute_disk_snapshot/metadata.yaml @@ -94,54 +94,15 @@ spec: required: true - name: snapshot_retention_policy description: The retention policy to be applied to the schedule policy. For more details see https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_resource_policy#retention_policy - varType: |- - object( - { - max_retention_days = number - on_source_disk_delete = string - } - ) + varType: "object(\r\n {\r\n max_retention_days = number\r\n on_source_disk_delete = string\r\n }\r\n )" required: true - name: snapshot_schedule description: The scheduled to be used by the snapshot policy. For more details see https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_resource_policy#schedule - varType: |- - object( - { - daily_schedule = object( - { - days_in_cycle = number - start_time = string - } - ) - hourly_schedule = object( - { - hours_in_cycle = number - start_time = string - } - ) - weekly_schedule = object( - { - day_of_weeks = set(object( - { - day = string - start_time = string - } - )) - } - ) - } - ) + varType: "object(\r\n {\r\n daily_schedule = object(\r\n {\r\n days_in_cycle = number\r\n start_time = string\r\n }\r\n )\r\n hourly_schedule = object(\r\n {\r\n hours_in_cycle = number\r\n start_time = string\r\n }\r\n )\r\n weekly_schedule = object(\r\n {\r\n day_of_weeks = set(object(\r\n {\r\n day = string\r\n start_time = string\r\n }\r\n ))\r\n }\r\n )\r\n }\r\n )" required: true - name: snapshot_properties description: The properties of the schedule policy. For more details see https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_resource_policy#snapshot_properties - varType: |- - object( - { - guest_flush = bool - labels = map(string) - storage_locations = list(string) - } - ) + varType: "object(\r\n {\r\n guest_flush = bool\r\n labels = map(string)\r\n storage_locations = list(string)\r\n }\r\n )" - name: disks description: List of self_links persistent disks to attach the snapshot policy to (ie. projects/project_id/disks/diskname/zones/zone_name) varType: list(string) diff --git a/modules/compute_instance/README.md b/modules/compute_instance/README.md index e85ce4e6..ea8eee3f 100644 --- a/modules/compute_instance/README.md +++ b/modules/compute_instance/README.md @@ -24,6 +24,7 @@ See the [simple](https://github.com/terraform-google-modules/terraform-google-vm | instance\_template | Instance template self\_link used to create compute instances | `string` | n/a | yes | | ipv6\_access\_config | IPv6 access configurations. Currently a max of 1 IPv6 access configuration is supported. If not specified, the instance will have no external IPv6 Internet access. |
list(object({
network_tier = string
}))
| `[]` | no | | labels | (Optional) Labels to override those from the template, provided as a map | `map(string)` | `null` | no | +| metadata | Metadata Key Map | `map(string)` | `null` | no | | network | Network to deploy to. Only one of network or subnetwork should be specified. | `string` | `""` | no | | num\_instances | Number of instances to create. This value is ignored if static\_ips is provided. | `number` | `"1"` | no | | region | Region where the instances should be created. | `string` | `null` | no | diff --git a/modules/compute_instance/main.tf b/modules/compute_instance/main.tf index e5e45bee..3d4b77a7 100644 --- a/modules/compute_instance/main.tf +++ b/modules/compute_instance/main.tf @@ -90,5 +90,6 @@ resource "google_compute_instance_from_template" "compute_instance" { } source_instance_template = var.instance_template + metadata = var.metadata } diff --git a/modules/compute_instance/metadata.display.yaml b/modules/compute_instance/metadata.display.yaml new file mode 100644 index 00000000..957b65e7 --- /dev/null +++ b/modules/compute_instance/metadata.display.yaml @@ -0,0 +1,87 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: blueprints.cloud.google.com/v1alpha1 +kind: BlueprintMetadata +metadata: + name: terraform-google-vm-compute-instance-display + annotations: + config.kubernetes.io/local-config: "true" +spec: + info: + title: Compute Instance + source: + repo: https://github.com/terraform-google-modules/terraform-google-vm + sourceType: git + dir: /modules/compute_instance + ui: + input: + variables: + access_config: + name: access_config + title: Access Config + add_hostname_suffix: + name: add_hostname_suffix + title: Add Hostname Suffix + alias_ip_ranges: + name: alias_ip_ranges + title: Alias Ip Ranges + deletion_protection: + name: deletion_protection + title: Deletion Protection + hostname: + name: hostname + title: Hostname + hostname_suffix_separator: + name: hostname_suffix_separator + title: Hostname Suffix Separator + instance_template: + name: instance_template + title: Instance Template + ipv6_access_config: + name: ipv6_access_config + title: Ipv6 Access Config + labels: + name: labels + title: Labels + metadata: + name: metadata + title: Metadata + network: + name: network + title: Network + num_instances: + name: num_instances + title: Num Instances + region: + name: region + title: Region + resource_manager_tags: + name: resource_manager_tags + title: Resource Manager Tags + resource_policies: + name: resource_policies + title: Resource Policies + static_ips: + name: static_ips + title: Static Ips + subnetwork: + name: subnetwork + title: Subnetwork + subnetwork_project: + name: subnetwork_project + title: Subnetwork Project + zone: + name: zone + title: Zone diff --git a/modules/compute_instance/metadata.yaml b/modules/compute_instance/metadata.yaml index 8a697527..80518908 100644 --- a/modules/compute_instance/metadata.yaml +++ b/modules/compute_instance/metadata.yaml @@ -106,18 +106,11 @@ spec: defaultValue: [] - name: access_config description: Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. - varType: |- - list(object({ - nat_ip = string - network_tier = string - })) + varType: "list(object({\r\n nat_ip = string\r\n network_tier = string\r\n }))" defaultValue: [] - name: ipv6_access_config description: IPv6 access configurations. Currently a max of 1 IPv6 access configuration is supported. If not specified, the instance will have no external IPv6 Internet access. - varType: |- - list(object({ - network_tier = string - })) + varType: "list(object({\r\n network_tier = string\r\n }))" defaultValue: [] - name: num_instances description: Number of instances to create. This value is ignored if static_ips is provided. @@ -143,11 +136,7 @@ spec: defaultValue: false - name: alias_ip_ranges description: (Optional) An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. - varType: |- - list(object({ - ip_cidr_range = string - subnetwork_range_name = string - })) + varType: "list(object({\r\n ip_cidr_range = string\r\n subnetwork_range_name = string\r\n }))" defaultValue: [] - name: resource_policies description: (Optional) A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported. @@ -159,6 +148,9 @@ spec: - name: resource_manager_tags 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. varType: map(string) + - name: metadata + description: Metadata Key Map + varType: map(string) outputs: - name: available_zones description: List of available zones in region diff --git a/modules/compute_instance/variables.tf b/modules/compute_instance/variables.tf index f1462a4a..460b76ac 100644 --- a/modules/compute_instance/variables.tf +++ b/modules/compute_instance/variables.tf @@ -128,3 +128,9 @@ variable "resource_manager_tags" { type = map(string) default = null } + +variable "metadata" { + description = "Metadata Key Map" + type = map(string) + default = null +} diff --git a/modules/instance_template/metadata.display.yaml b/modules/instance_template/metadata.display.yaml index 46648999..b1083e75 100644 --- a/modules/instance_template/metadata.display.yaml +++ b/modules/instance_template/metadata.display.yaml @@ -60,7 +60,6 @@ spec: description: name: description title: Description - invisible: false disk_encryption_key: name: disk_encryption_key title: Disk Encryption Key @@ -91,7 +90,6 @@ spec: instance_description: name: instance_description title: Instance Description - invisible: false ipv6_access_config: name: ipv6_access_config title: Ipv6 Access Config @@ -101,7 +99,6 @@ spec: machine_type: name: machine_type title: Machine Type - invisible: false maintenance_interval: name: maintenance_interval title: Maintenance Interval @@ -114,7 +111,6 @@ spec: name_prefix: name: name_prefix title: Name Prefix - invisible: false regexValidation: ^[a-z][a-z0-9-]{0,51}[a-z0-9]$ validation: Use lowercase letters, numbers, and hyphens. Start with a letter and end with letter/number. Must be 53 characters or fewer. network: @@ -135,11 +131,9 @@ spec: project_id: name: project_id title: Project Id - invisible: false region: name: region title: Region - invisible: false resource_policies: name: resource_policies title: Resource Policies @@ -161,7 +155,6 @@ spec: spot: name: spot title: Spot - invisible: false spot_instance_termination_action: name: spot_instance_termination_action title: Spot Instance Termination Action diff --git a/modules/instance_template/metadata.yaml b/modules/instance_template/metadata.yaml index 4064f403..23b6f3b4 100644 --- a/modules/instance_template/metadata.yaml +++ b/modules/instance_template/metadata.yaml @@ -184,21 +184,7 @@ spec: defaultValue: "true" - name: additional_disks description: List of maps of additional disks. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#disk_name - varType: |- - list(object({ - auto_delete = optional(bool, true) - boot = optional(bool, false) - device_name = optional(string) - disk_name = optional(string) - disk_size_gb = optional(number) - disk_type = optional(string) - disk_labels = optional(map(string), {}) - interface = optional(string) - mode = optional(string) - source = optional(string) - source_image = optional(string) - source_snapshot = optional(string) - })) + varType: "list(object({\r\n auto_delete = optional(bool, true)\r\n boot = optional(bool, false)\r\n device_name = optional(string)\r\n disk_name = optional(string)\r\n disk_size_gb = optional(number)\r\n disk_type = optional(string)\r\n disk_labels = optional(map(string), {})\r\n interface = optional(string)\r\n mode = optional(string)\r\n source = optional(string)\r\n source_image = optional(string)\r\n source_snapshot = optional(string)\r\n }))" defaultValue: [] - name: disk_resource_policies description: A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations @@ -228,27 +214,7 @@ spec: varType: string - name: additional_networks description: Additional network interface details for GCE, if any. - varType: |- - list(object({ - network = string - subnetwork = string - subnetwork_project = string - network_ip = string - nic_type = string - stack_type = string - queue_count = number - access_config = list(object({ - nat_ip = string - network_tier = string - })) - ipv6_access_config = list(object({ - network_tier = string - })) - alias_ip_range = list(object({ - ip_cidr_range = string - subnetwork_range_name = string - })) - })) + varType: "list(object({\r\n network = string\r\n subnetwork = string\r\n subnetwork_project = string\r\n network_ip = string\r\n nic_type = string\r\n stack_type = string\r\n queue_count = number\r\n access_config = list(object({\r\n nat_ip = string\r\n network_tier = string\r\n }))\r\n ipv6_access_config = list(object({\r\n network_tier = string\r\n }))\r\n alias_ip_range = list(object({\r\n ip_cidr_range = string\r\n subnetwork_range_name = string\r\n }))\r\n }))" defaultValue: [] - name: total_egress_bandwidth_tier description: Egress bandwidth tier setting for supported VM families @@ -285,11 +251,7 @@ spec: outputExpr: "{\"SERVICE_ACCOUNT_EMAIL\" : email, \"SERVICE_ACCOUNT_IAM_EMAIL\" : iam_email}" - name: service_account description: Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#service_account. - varType: |- - object({ - email = string - scopes = optional(set(string), ["cloud-platform"]) - }) + varType: "object({\r\n email = string\r\n scopes = optional(set(string), [\"cloud-platform\"])\r\n })" required: true connections: - source: @@ -304,12 +266,7 @@ spec: defaultValue: false - name: shielded_instance_config description: Not used unless enable_shielded_vm is true. Shielded VM configuration for the instance. - varType: |- - object({ - enable_secure_boot = bool - enable_vtpm = bool - enable_integrity_monitoring = bool - }) + varType: "object({\r\n enable_secure_boot = bool\r\n enable_vtpm = bool\r\n enable_integrity_monitoring = bool\r\n })" defaultValue: enable_integrity_monitoring: true enable_secure_boot: true @@ -323,36 +280,18 @@ spec: varType: string - name: access_config description: Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. - varType: |- - list(object({ - nat_ip = string - network_tier = string - })) + varType: "list(object({\r\n nat_ip = string\r\n network_tier = string\r\n }))" defaultValue: [] - name: ipv6_access_config description: IPv6 access configurations. Currently a max of 1 IPv6 access configuration is supported. If not specified, the instance will have no external IPv6 Internet access. - varType: |- - list(object({ - network_tier = string - })) + varType: "list(object({\r\n network_tier = string\r\n }))" defaultValue: [] - name: gpu description: GPU information. Type and count of GPU to attach to the instance template. See https://cloud.google.com/compute/docs/gpus more details - varType: |- - object({ - type = string - count = number - }) + varType: "object({\r\n type = string\r\n count = number\r\n })" - name: alias_ip_range - description: | - An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. - ip_cidr_range: The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error. - subnetwork_range_name: The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. - varType: |- - object({ - ip_cidr_range = string - subnetwork_range_name = string - }) + description: "An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.\r\nip_cidr_range: The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.\r\nsubnetwork_range_name: The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.\r\n" + varType: "object({\r\n ip_cidr_range = string\r\n subnetwork_range_name = string\r\n })" outputs: - name: name description: Name of instance template diff --git a/modules/mig/metadata.display.yaml b/modules/mig/metadata.display.yaml index 17fddfc3..4417b81c 100644 --- a/modules/mig/metadata.display.yaml +++ b/modules/mig/metadata.display.yaml @@ -67,7 +67,6 @@ spec: hostname: name: hostname title: Hostname - invisible: false instance_template: name: instance_template title: Instance Template @@ -80,7 +79,6 @@ spec: mig_name: name: mig_name title: Mig Name - invisible: false regexValidation: ^[a-z][a-z0-9-]{0,61}[a-z0-9]$ validation: Use lowercase letters, numbers, and hyphens. Start with a letter and end with letter/number. Must be 63 characters or fewer. mig_timeouts: @@ -95,7 +93,6 @@ spec: project_id: name: project_id title: Project Id - invisible: false region: name: region title: Region @@ -114,7 +111,6 @@ spec: target_size: name: target_size title: Target Size - invisible: false update_policy: name: update_policy title: Update Policy diff --git a/modules/mig_with_percent/metadata.display.yaml b/modules/mig_with_percent/metadata.display.yaml new file mode 100644 index 00000000..cc1c16e7 --- /dev/null +++ b/modules/mig_with_percent/metadata.display.yaml @@ -0,0 +1,123 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: blueprints.cloud.google.com/v1alpha1 +kind: BlueprintMetadata +metadata: + name: terraform-google-vm-mig-with-percent-display + annotations: + config.kubernetes.io/local-config: "true" +spec: + info: + title: Managed Instance Group (MIG) with percent + source: + repo: https://github.com/terraform-google-modules/terraform-google-vm + sourceType: git + dir: /modules/mig_with_percent + ui: + input: + variables: + autoscaler_name: + name: autoscaler_name + title: Autoscaler Name + autoscaling_cpu: + name: autoscaling_cpu + title: Autoscaling Cpu + autoscaling_enabled: + name: autoscaling_enabled + title: Autoscaling Enabled + autoscaling_lb: + name: autoscaling_lb + title: Autoscaling Lb + autoscaling_metric: + name: autoscaling_metric + title: Autoscaling Metric + autoscaling_mode: + name: autoscaling_mode + title: Autoscaling Mode + autoscaling_scale_in_control: + name: autoscaling_scale_in_control + title: Autoscaling Scale In Control + cooldown_period: + name: cooldown_period + title: Cooldown Period + distribution_policy_target_shape: + name: distribution_policy_target_shape + title: Distribution Policy Target Shape + distribution_policy_zones: + name: distribution_policy_zones + title: Distribution Policy Zones + health_check: + name: health_check + title: Health Check + health_check_name: + name: health_check_name + title: Health Check Name + hostname: + name: hostname + title: Hostname + instance_template_initial_version: + name: instance_template_initial_version + title: Instance Template Initial Version + instance_template_next_version: + name: instance_template_next_version + title: Instance Template Next Version + labels: + name: labels + title: Labels + max_replicas: + name: max_replicas + title: Max Replicas + mig_name: + name: mig_name + title: Mig Name + mig_timeouts: + name: mig_timeouts + title: Mig Timeouts + min_replicas: + name: min_replicas + title: Min Replicas + named_ports: + name: named_ports + title: Named Ports + next_version_percent: + name: next_version_percent + title: Next Version Percent + project_id: + name: project_id + title: Project Id + region: + name: region + title: Region + scaling_schedules: + name: scaling_schedules + title: Scaling Schedules + stateful_disks: + name: stateful_disks + title: Stateful Disks + stateful_ips: + name: stateful_ips + title: Stateful Ips + target_pools: + name: target_pools + title: Target Pools + target_size: + name: target_size + title: Target Size + update_policy: + name: update_policy + title: Update Policy + wait_for_instances: + name: wait_for_instances + title: Wait For Instances diff --git a/modules/preemptible_and_regular_instance_templates/metadata.display.yaml b/modules/preemptible_and_regular_instance_templates/metadata.display.yaml new file mode 100644 index 00000000..64c87bae --- /dev/null +++ b/modules/preemptible_and_regular_instance_templates/metadata.display.yaml @@ -0,0 +1,93 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: blueprints.cloud.google.com/v1alpha1 +kind: BlueprintMetadata +metadata: + name: terraform-google-vm-preemptible-and-regular-instance-templates-display + annotations: + config.kubernetes.io/local-config: "true" +spec: + info: + title: preemptible_and_regular_instance_templates + source: + repo: https://github.com/terraform-google-modules/terraform-google-vm + sourceType: git + dir: /modules/preemptible_and_regular_instance_templates + ui: + input: + variables: + access_config: + name: access_config + title: Access Config + additional_disks: + name: additional_disks + title: Additional Disks + auto_delete: + name: auto_delete + title: Auto Delete + can_ip_forward: + name: can_ip_forward + title: Can Ip Forward + disk_size_gb: + name: disk_size_gb + title: Disk Size Gb + disk_type: + name: disk_type + title: Disk Type + ipv6_access_config: + name: ipv6_access_config + title: Ipv6 Access Config + labels: + name: labels + title: Labels + machine_type: + name: machine_type + title: Machine Type + metadata: + name: metadata + title: Metadata + name_prefix: + name: name_prefix + title: Name Prefix + network: + name: network + title: Network + project_id: + name: project_id + title: Project Id + service_account: + name: service_account + title: Service Account + source_image: + name: source_image + title: Source Image + source_image_family: + name: source_image_family + title: Source Image Family + source_image_project: + name: source_image_project + title: Source Image Project + startup_script: + name: startup_script + title: Startup Script + subnetwork: + name: subnetwork + title: Subnetwork + subnetwork_project: + name: subnetwork_project + title: Subnetwork Project + tags: + name: tags + title: Tags diff --git a/modules/preemptible_and_regular_instance_templates/metadata.yaml b/modules/preemptible_and_regular_instance_templates/metadata.yaml index bee9b70b..1b879b27 100644 --- a/modules/preemptible_and_regular_instance_templates/metadata.yaml +++ b/modules/preemptible_and_regular_instance_templates/metadata.yaml @@ -129,16 +129,7 @@ spec: defaultValue: true - name: additional_disks description: List of maps of additional disks. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#disk_name - varType: |- - list(object({ - disk_name = string - device_name = string - auto_delete = bool - boot = bool - disk_size_gb = number - disk_type = string - disk_labels = map(string) - })) + varType: "list(object({\r\n disk_name = string\r\n device_name = string\r\n auto_delete = bool\r\n boot = bool\r\n disk_size_gb = number\r\n disk_type = string\r\n disk_labels = map(string)\r\n }))" defaultValue: [] - name: network description: The name or self_link of the network to attach this interface to. Use network attribute for Legacy or Auto subnetted networks and subnetwork for custom subnetted networks. @@ -162,26 +153,15 @@ spec: defaultValue: {} - name: service_account description: Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#service_account. - varType: |- - object({ - email = string - scopes = set(string) - }) + varType: "object({\r\n email = string\r\n scopes = set(string)\r\n })" required: true - name: access_config description: Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. - varType: |- - list(object({ - nat_ip = string - network_tier = string - })) + varType: "list(object({\r\n nat_ip = string\r\n network_tier = string\r\n }))" defaultValue: [] - name: ipv6_access_config description: IPv6 access configurations. Currently a max of 1 IPv6 access configuration is supported. If not specified, the instance will have no external IPv6 Internet access. - varType: |- - list(object({ - network_tier = string - })) + varType: "list(object({\r\n network_tier = string\r\n }))" defaultValue: [] outputs: - name: preemptible_name diff --git a/modules/umig/metadata.display.yaml b/modules/umig/metadata.display.yaml new file mode 100644 index 00000000..45298238 --- /dev/null +++ b/modules/umig/metadata.display.yaml @@ -0,0 +1,75 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: blueprints.cloud.google.com/v1alpha1 +kind: BlueprintMetadata +metadata: + name: terraform-google-vm-umig-display + annotations: + config.kubernetes.io/local-config: "true" +spec: + info: + title: Unmanaged Instance Group (UMIG) + source: + repo: https://github.com/terraform-google-modules/terraform-google-vm + sourceType: git + dir: /modules/umig + ui: + input: + variables: + access_config: + name: access_config + title: Access Config + additional_networks: + name: additional_networks + title: Additional Networks + hostname: + name: hostname + title: Hostname + hostname_suffix_separator: + name: hostname_suffix_separator + title: Hostname Suffix Separator + instance_template: + name: instance_template + title: Instance Template + ipv6_access_config: + name: ipv6_access_config + title: Ipv6 Access Config + named_ports: + name: named_ports + title: Named Ports + network: + name: network + title: Network + num_instances: + name: num_instances + title: Num Instances + project_id: + name: project_id + title: Project Id + region: + name: region + title: Region + static_ips: + name: static_ips + title: Static Ips + subnetwork: + name: subnetwork + title: Subnetwork + subnetwork_project: + name: subnetwork_project + title: Subnetwork Project + zones: + name: zones + title: Zones diff --git a/modules/umig/metadata.yaml b/modules/umig/metadata.yaml index a24a4033..1f80dc39 100644 --- a/modules/umig/metadata.yaml +++ b/modules/umig/metadata.yaml @@ -101,20 +101,7 @@ spec: defaultValue: "" - name: additional_networks description: Additional network interface details for GCE, if any. - varType: |- - list(object({ - network = string - subnetwork = string - subnetwork_project = string - network_ip = string - access_config = list(object({ - nat_ip = string - network_tier = string - })) - ipv6_access_config = list(object({ - network_tier = string - })) - })) + varType: "list(object({\r\n network = string\r\n subnetwork = string\r\n subnetwork_project = string\r\n network_ip = string\r\n access_config = list(object({\r\n nat_ip = string\r\n network_tier = string\r\n }))\r\n ipv6_access_config = list(object({\r\n network_tier = string\r\n }))\r\n }))" defaultValue: [] - name: hostname description: Hostname of instances @@ -130,11 +117,7 @@ spec: defaultValue: "1" - name: named_ports description: Named name and named port - varType: |- - list(object({ - name = string - port = number - })) + varType: "list(object({\r\n name = string\r\n port = number\r\n }))" defaultValue: [] - name: instance_template description: Instance template self_link used to create compute instances @@ -142,18 +125,11 @@ spec: required: true - name: access_config description: Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. - varType: |- - list(list(object({ - nat_ip = string - network_tier = string - }))) + varType: "list(list(object({\r\n nat_ip = string\r\n network_tier = string\r\n })))" defaultValue: [] - name: ipv6_access_config description: IPv6 access configurations. Currently a max of 1 IPv6 access configuration is supported. If not specified, the instance will have no external IPv6 Internet access. - varType: |- - list(list(object({ - network_tier = string - }))) + varType: "list(list(object({\r\n network_tier = string\r\n })))" defaultValue: [] - name: hostname_suffix_separator description: Separator character to compose hostname when add_hostname_suffix is set to true. diff --git a/test/fixtures/compute_instance/disk_snapshot/network.tf b/test/fixtures/compute_instance/disk_snapshot/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/compute_instance/disk_snapshot/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/compute_instance/simple_zone/network.tf b/test/fixtures/compute_instance/simple_zone/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/compute_instance/simple_zone/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/confidential_compute_instance/network.tf b/test/fixtures/confidential_compute_instance/network.tf deleted file mode 120000 index 98e7464a..00000000 --- a/test/fixtures/confidential_compute_instance/network.tf +++ /dev/null @@ -1 +0,0 @@ -../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/confidential_instance_template/network.tf b/test/fixtures/confidential_instance_template/network.tf deleted file mode 120000 index 98e7464a..00000000 --- a/test/fixtures/confidential_instance_template/network.tf +++ /dev/null @@ -1 +0,0 @@ -../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/confidential_intel_compute_instance/network.tf b/test/fixtures/confidential_intel_compute_instance/network.tf deleted file mode 120000 index 98e7464a..00000000 --- a/test/fixtures/confidential_intel_compute_instance/network.tf +++ /dev/null @@ -1 +0,0 @@ -../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/instance_simple/network.tf b/test/fixtures/instance_simple/network.tf deleted file mode 120000 index 98e7464a..00000000 --- a/test/fixtures/instance_simple/network.tf +++ /dev/null @@ -1 +0,0 @@ -../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/instance_template/additional_disks/network.tf b/test/fixtures/instance_template/additional_disks/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/instance_template/additional_disks/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/instance_template/alias_ip_range/network.tf b/test/fixtures/instance_template/alias_ip_range/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/instance_template/alias_ip_range/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/instance_template/simple/network.tf b/test/fixtures/instance_template/simple/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/instance_template/simple/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/mig/autoscaler/network.tf b/test/fixtures/mig/autoscaler/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/mig/autoscaler/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/mig/simple/network.tf b/test/fixtures/mig/simple/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/mig/simple/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/mig_stateful/network.tf b/test/fixtures/mig_stateful/network.tf deleted file mode 120000 index 98e7464a..00000000 --- a/test/fixtures/mig_stateful/network.tf +++ /dev/null @@ -1 +0,0 @@ -../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/mig_with_percent/simple/network.tf b/test/fixtures/mig_with_percent/simple/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/mig_with_percent/simple/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/preemptible_and_regular_instance_templates/simple/network.tf b/test/fixtures/preemptible_and_regular_instance_templates/simple/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/preemptible_and_regular_instance_templates/simple/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/umig/named_ports/network.tf b/test/fixtures/umig/named_ports/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/umig/named_ports/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/umig/simple/network.tf b/test/fixtures/umig/simple/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/umig/simple/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file diff --git a/test/fixtures/umig/static_ips/network.tf b/test/fixtures/umig/static_ips/network.tf deleted file mode 120000 index 2a31e839..00000000 --- a/test/fixtures/umig/static_ips/network.tf +++ /dev/null @@ -1 +0,0 @@ -../../shared/network.tf \ No newline at end of file