-
Notifications
You must be signed in to change notification settings - Fork 389
fix: Adding UI validations for MiG and instance template #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
amrkk123
wants to merge
9
commits into
terraform-google-modules:main
Choose a base branch
from
amrkk123:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8f184d6
Adding UI validations for MiG and instance template
amrkk123 b20e1b7
Removing whitespaces
amrkk123 9747732
Remove remaining whitespace
amrkk123 bc17514
Fixing whitespace
amrkk123 4a4559e
Fixing whitespace
amrkk123 0f6a66c
changing regex for network and subnetwork
amrkk123 5eca863
fix whitespace
amrkk123 f76d43b
fixing escape for regex
amrkk123 2eb1e93
fix regex escape in instance template and mig
amrkk123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -31,6 +31,17 @@ spec: | |
access_config: | ||
name: access_config | ||
title: Access Config | ||
properties: | ||
network_tier: | ||
name: network_tier | ||
title: Network Tier | ||
enumValueLabels: | ||
- label: PREMIUM | ||
value: PREMIUM | ||
- label: STANDARD | ||
value: STANDARD | ||
- label: FIXED_STANDARD | ||
value: FIXED_STANDARD | ||
altDefaults: | ||
- type: ALTERNATE_TYPE_DC | ||
value: | ||
|
@@ -39,25 +50,141 @@ spec: | |
additional_disks: | ||
name: additional_disks | ||
title: Additional Disks | ||
properties: | ||
disk_type: | ||
name: disk_type | ||
title: Disk Type | ||
enumValueLabels: | ||
- label: pd-standard | ||
value: pd-standard | ||
- label: pd-balanced | ||
value: pd-balanced | ||
- label: pd-ssd | ||
value: pd-ssd | ||
- label: local-ssd | ||
value: local-ssd | ||
- label: hyperdisk-balanced | ||
value: hyperdisk-balanced | ||
- label: hyperdisk-throughput | ||
value: hyperdisk-throughput | ||
- label: hyperdisk-extreme | ||
value: hyperdisk-extreme | ||
interface: | ||
name: interface | ||
title: Interface | ||
enumValueLabels: | ||
- label: SCSI | ||
value: SCSI | ||
- label: NVME | ||
value: NVME | ||
mode: | ||
name: mode | ||
title: Mode | ||
enumValueLabels: | ||
- label: READ_WRITE | ||
value: READ_WRITE | ||
- label: READ_ONLY | ||
value: READ_ONLY | ||
additional_networks: | ||
name: additional_networks | ||
title: Additional Networks | ||
properties: | ||
network: | ||
name: network | ||
title: Network | ||
regexValidation: "^(?:[a-z0-9-]{1,63}|projects\\/[a-z0-9-]+\\/global\\/networks\\/[a-z0-9-]{1,63})$" | ||
validation: Invalid network format. Must be a network name or a self link. | ||
subnetwork: | ||
name: subnetwork | ||
title: Subnetwork | ||
regexValidation: "^(?:[a-z0-9-]{1,63}|(?:projects\\/[a-z0-9-]+\\/)?(?:regions\\/[a-z0-9-]+\\/)?subnetworks\\/[a-z0-9-]{1,63})$" | ||
|
||
validation: Invalid subnetwork format. Must be a subnetwork name or a self link. | ||
network_ip: | ||
name: network_ip | ||
title: Network Ip | ||
regexValidation: ^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ | ||
|
||
validation: Invalid IP address format. Must be a valid IPv4 address. | ||
nic_type: | ||
name: nic_type | ||
title: Nic Type | ||
enumValueLabels: | ||
- label: VIRTIO_NET | ||
value: VIRTIO_NET | ||
- label: GVNIC | ||
value: GVNIC | ||
- label: MRDMA | ||
value: MRDMA | ||
- label: IRDMA | ||
value: IRDMA | ||
stack_type: | ||
name: stack_type | ||
title: Stack Type | ||
enumValueLabels: | ||
- label: IPV4_ONLY | ||
value: IPV4_ONLY | ||
- label: IPV6_ONLY | ||
value: IPV6_ONLY | ||
- label: IPV4_IPV6 | ||
value: IPV4_IPV6 | ||
access_config: | ||
name: access_config | ||
title: Access Config | ||
properties: | ||
network_tier: | ||
name: network_tier | ||
title: Network Tier | ||
enumValueLabels: | ||
- label: PREMIUM | ||
value: PREMIUM | ||
- label: STANDARD | ||
value: STANDARD | ||
- label: FIXED_STANDARD | ||
value: FIXED_STANDARD | ||
ipv6_access_config: | ||
name: ipv6_access_config | ||
title: Ipv6 Access Config | ||
properties: | ||
network_tier: | ||
name: network_tier | ||
title: Network Tier | ||
enumValueLabels: | ||
- label: PREMIUM | ||
value: PREMIUM | ||
- label: STANDARD | ||
value: STANDARD | ||
alias_ip_range: | ||
name: alias_ip_range | ||
title: Alias Ip Range | ||
auto_delete: | ||
name: auto_delete | ||
title: Auto Delete | ||
enumValueLabels: | ||
- label: "true" | ||
value: "true" | ||
- label: "false" | ||
value: "false" | ||
automatic_restart: | ||
name: automatic_restart | ||
title: Automatic Restart | ||
level: 1 | ||
can_ip_forward: | ||
name: can_ip_forward | ||
title: Can Ip Forward | ||
enumValueLabels: | ||
- label: "false" | ||
value: "false" | ||
- label: "true" | ||
value: "true" | ||
confidential_instance_type: | ||
name: confidential_instance_type | ||
title: Confidential Instance Type | ||
enumValueLabels: | ||
- label: SEV | ||
value: SEV | ||
- label: SEV_SNP | ||
value: SEV_SNP | ||
- label: TDX | ||
value: TDX | ||
create_service_account: | ||
name: create_service_account | ||
title: Create Service Account | ||
|
@@ -83,6 +210,21 @@ spec: | |
name: disk_type | ||
title: Disk Type | ||
level: 1 | ||
enumValueLabels: | ||
- label: pd-standard | ||
value: pd-standard | ||
- label: pd-balanced | ||
value: pd-balanced | ||
- label: pd-ssd | ||
value: pd-ssd | ||
- label: local-ssd | ||
value: local-ssd | ||
- label: hyperdisk-balanced | ||
value: hyperdisk-balanced | ||
- label: hyperdisk-throughput | ||
value: hyperdisk-throughput | ||
- label: hyperdisk-extreme | ||
value: hyperdisk-extreme | ||
enable_confidential_vm: | ||
name: enable_confidential_vm | ||
title: Enable Confidential Vm | ||
|
@@ -102,6 +244,15 @@ spec: | |
ipv6_access_config: | ||
name: ipv6_access_config | ||
title: Ipv6 Access Config | ||
properties: | ||
network_tier: | ||
name: network_tier | ||
title: Network Tier | ||
enumValueLabels: | ||
- label: PREMIUM | ||
value: PREMIUM | ||
- label: STANDARD | ||
value: STANDARD | ||
labels: | ||
name: labels | ||
title: Labels | ||
|
@@ -112,6 +263,9 @@ spec: | |
maintenance_interval: | ||
name: maintenance_interval | ||
title: Maintenance Interval | ||
enumValueLabels: | ||
- label: PERIODIC | ||
value: PERIODIC | ||
metadata: | ||
name: metadata | ||
title: Metadata | ||
|
@@ -133,21 +287,44 @@ spec: | |
name: network | ||
title: Network | ||
level: 1 | ||
regexValidation: "^(?:[a-z0-9-]{1,63}|projects\\/[a-z0-9-]+\\/global\\/networks\\/[a-z0-9-]{1,63})$" | ||
validation: Invalid network format. Must be a network name or a self link. | ||
altDefaults: | ||
- type: ALTERNATE_TYPE_DC | ||
value: default | ||
network_ip: | ||
name: network_ip | ||
title: Network Ip | ||
regexValidation: ^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ | ||
validation: Invalid IP address format. Must be a valid IPv4 address. | ||
nic_type: | ||
name: nic_type | ||
title: Nic Type | ||
enumValueLabels: | ||
- label: VIRTIO_NET | ||
value: VIRTIO_NET | ||
- label: GVNIC | ||
value: GVNIC | ||
- label: MRDMA | ||
value: MRDMA | ||
- label: IRDMA | ||
value: IRDMA | ||
on_host_maintenance: | ||
name: on_host_maintenance | ||
title: On Host Maintenance | ||
enumValueLabels: | ||
- label: MIGRATE | ||
value: MIGRATE | ||
- label: TERMINATE | ||
value: TERMINATE | ||
preemptible: | ||
name: preemptible | ||
title: Preemptible | ||
enumValueLabels: | ||
- label: "true" | ||
value: "true" | ||
- label: "false" | ||
value: "false" | ||
project_id: | ||
name: project_id | ||
title: Project Id | ||
|
@@ -168,6 +345,8 @@ spec: | |
service_account_project_roles: | ||
name: service_account_project_roles | ||
title: Service Account Project Roles | ||
regexValidation: "^(roles\\/[a-zA-Z0-9_\\.]+|(projects\\/[a-z][a-z0-9\\-]{4,28}[a-z0-9]|organizations\\/[0-9]+)\\/roles\\/[a-zA-Z0-9_]+)$" | ||
validation: Role must be a valid Google Cloud IAM role name, in the format of 'roles/{role_name}'. | ||
shielded_instance_config: | ||
name: shielded_instance_config | ||
title: Shielded Instance Config | ||
|
@@ -189,16 +368,30 @@ spec: | |
spot_instance_termination_action: | ||
name: spot_instance_termination_action | ||
title: Spot Instance Termination Action | ||
enumValueLabels: | ||
- label: STOP | ||
value: STOP | ||
- label: DELETE | ||
value: DELETE | ||
stack_type: | ||
name: stack_type | ||
title: Stack Type | ||
enumValueLabels: | ||
- label: IPV4_ONLY | ||
value: IPV4_ONLY | ||
- label: IPV4_IPV6 | ||
value: IPV4_IPV6 | ||
- label: IPV6_ONLY | ||
value: IPV6_ONLY | ||
startup_script: | ||
name: startup_script | ||
title: Startup Script | ||
subnetwork: | ||
name: subnetwork | ||
title: Subnetwork | ||
level: 1 | ||
regexValidation: "^(?:[a-z0-9-]{1,63}|(?:projects\\/[a-z0-9-]+\\/)?(?:regions\\/[a-z0-9-]+\\/)?subnetworks\\/[a-z0-9-]{1,63})$" | ||
validation: Invalid subnetwork format. Must be a subnetwork name or a self link. | ||
subnetwork_project: | ||
name: subnetwork_project | ||
title: Subnetwork Project | ||
|
@@ -212,3 +405,8 @@ spec: | |
total_egress_bandwidth_tier: | ||
name: total_egress_bandwidth_tier | ||
title: Total Egress Bandwidth Tier | ||
enumValueLabels: | ||
- label: DEFAULT | ||
value: DEFAULT | ||
- label: TIER_1 | ||
value: TIER_1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to add any escape characters.