Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/iam/iam.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func EnumerateIAMResources(ctx context.Context, cfg config.AzureConfig) (*AzureR
resources.RoleAssignments = roleAssignments
}

resources.SubscriptionID = cfg.SubID
resources.TenantID = cfg.TenantID
report := AzureResourceReport{
Resources: resources,
Errors: errors,
Expand Down
1 change: 1 addition & 0 deletions internal/iam/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type RoleAssignmentDetails struct {
// AzureResources contains details about all IAM related resources in the subscription.
type AzureResources struct {
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
TenantID string `json:"tenant_id" yaml:"tenant_id"`
Roles []RoleDetails `json:"roles" yaml:"roles"`
RoleAssignments []RoleAssignmentDetails `json:"role_assignments" yaml:"role_assignments"`
}
Expand Down
2 changes: 2 additions & 0 deletions internal/subscription/subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Details struct {
// AzureResources contains details about all Subscriptions.
type AzureResources struct {
Subscriptions []Details `json:"subscriptions" yaml:"subscriptions"`
TenantID string `json:"tenant_id" yaml:"tenant_id"`
}

// AzureResourceReport contains the AzureResources and any non-fatal errors encountered during enumeration.
Expand Down Expand Up @@ -66,6 +67,7 @@ func EnumerateSubscriptions(ctx context.Context, cfg config.AzureConfig, specifi
}

resources.Subscriptions = subscriptions
resources.TenantID = cfg.TenantID
report := AzureResourceReport{
Resources: resources,
Errors: errors,
Expand Down
2 changes: 2 additions & 0 deletions internal/vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ type VirtualMachineScaleSetVM struct {
// AzureResources contains details about all VM related resources in the subscription.
type AzureResources struct {
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
TenantID string `json:"tenant_id" yaml:"tenant_id"`
StandaloneVMInstances []VirtualMachine `json:"standalone_vms" yaml:"standalone_vms"`
VMSSVMInstances []VirtualMachineScaleSetVM `json:"vmss_vms" yaml:"vmss_vms"`
}
Expand Down Expand Up @@ -186,6 +187,7 @@ func EnumerateVMs(ctx context.Context, cfg config.AzureConfig) (*AzureResourceRe
resources.VMSSVMInstances = vmssVMs
}
resources.SubscriptionID = cfg.SubID
resources.TenantID = cfg.TenantID
report := AzureResourceReport{
Resources: resources,
Errors: errors,
Expand Down
2 changes: 2 additions & 0 deletions internal/vnet/vnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type Details struct {
// AzureResources contains details about all VNets in the subscription.
type AzureResources struct {
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
TenantID string `json:"tenant_id" yaml:"tenant_id"`
VirtualNetworks []Details `json:"virtual_networks" yaml:"virtual_networks"`
}

Expand Down Expand Up @@ -74,6 +75,7 @@ func EnumerateVNets(ctx context.Context, cfg config.AzureConfig) (*AzureResource
resources.VirtualNetworks = virtualNetworks
}
resources.SubscriptionID = cfg.SubID
resources.TenantID = cfg.TenantID

report := AzureResourceReport{
Resources: resources,
Expand Down