mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-19 04:58:09 +00:00
Creating InstanceConfig Attributes for NSG Refactor (#1331)
* Updating instance_config * Updating attribute names. * Updating list factory. * Updating config attributes. Co-authored-by: nharper285 <nharper285@gmail.com>
This commit is contained in:
committed by
Stas
parent
773ae3a5cf
commit
9f4db320b4
@ -649,6 +649,9 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
||||
"address_space": "10.0.0.0/8",
|
||||
"subnet": "10.0.0.0/16"
|
||||
},
|
||||
"proxy_nsg_config": {
|
||||
"allowed_ips": []
|
||||
},
|
||||
"proxy_vm_sku": "Standard_B2s"
|
||||
}
|
||||
}
|
||||
@ -759,6 +762,9 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
||||
"network_config": {
|
||||
"$ref": "#/definitions/NetworkConfig"
|
||||
},
|
||||
"proxy_nsg_config": {
|
||||
"$ref": "#/definitions/NetworkSecurityGroupConfig"
|
||||
},
|
||||
"proxy_vm_sku": {
|
||||
"default": "Standard_B2s",
|
||||
"title": "Proxy Vm Sku",
|
||||
@ -814,6 +820,26 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
||||
},
|
||||
"title": "NetworkConfig",
|
||||
"type": "object"
|
||||
},
|
||||
"NetworkSecurityGroupConfig": {
|
||||
"properties": {
|
||||
"allowed_ips": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "Allowed Ips",
|
||||
"type": "array"
|
||||
},
|
||||
"allowed_service_tags": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "Allowed Service Tags",
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"title": "NetworkSecurityGroupConfig",
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
@ -5835,6 +5861,9 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
||||
"network_config": {
|
||||
"$ref": "#/definitions/NetworkConfig"
|
||||
},
|
||||
"proxy_nsg_config": {
|
||||
"$ref": "#/definitions/NetworkSecurityGroupConfig"
|
||||
},
|
||||
"proxy_vm_sku": {
|
||||
"default": "Standard_B2s",
|
||||
"title": "Proxy Vm Sku",
|
||||
@ -5942,6 +5971,26 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
||||
"title": "NetworkConfig",
|
||||
"type": "object"
|
||||
},
|
||||
"NetworkSecurityGroupConfig": {
|
||||
"properties": {
|
||||
"allowed_ips": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "Allowed Ips",
|
||||
"type": "array"
|
||||
},
|
||||
"allowed_service_tags": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "Allowed Service Tags",
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"title": "NetworkSecurityGroupConfig",
|
||||
"type": "object"
|
||||
},
|
||||
"NoReproReport": {
|
||||
"properties": {
|
||||
"error": {
|
||||
|
@ -799,6 +799,11 @@ class NetworkConfig(BaseModel):
|
||||
subnet: str = Field(default="10.0.0.0/16")
|
||||
|
||||
|
||||
class NetworkSecurityGroupConfig(BaseModel):
|
||||
allowed_service_tags: Optional[List[str]]
|
||||
allowed_ips: List[str] = Field(default_factory=list)
|
||||
|
||||
|
||||
class KeyvaultExtensionConfig(BaseModel):
|
||||
keyvault_name: str
|
||||
cert_name: str
|
||||
@ -847,6 +852,9 @@ class InstanceConfig(BaseModel):
|
||||
|
||||
allowed_aad_tenants: List[UUID]
|
||||
network_config: NetworkConfig = Field(default_factory=NetworkConfig)
|
||||
proxy_nsg_config: NetworkSecurityGroupConfig = Field(
|
||||
default_factory=NetworkSecurityGroupConfig
|
||||
)
|
||||
extensions: Optional[AzureVmExtensionConfig]
|
||||
proxy_vm_sku: str = Field(default="Standard_B2s")
|
||||
|
||||
|
Reference in New Issue
Block a user