This commit is contained in:
2026-02-11 13:02:14 +03:00
parent 069d63a65c
commit b8283ebfaf
277 changed files with 2184 additions and 4192 deletions

View File

@@ -50,11 +50,13 @@ func flattenAudit(d *schema.ResourceData, au *audit.RecordAudit) {
d.Set("responsetime", au.ResponseTime)
d.Set("result", au.Result)
d.Set("status_code", au.StatusCode)
d.Set("tags", au.Tags)
d.Set("timestamp", au.Timestamp)
d.Set("timestamp_end", au.TimestampEnd)
d.Set("ttl", au.TTL)
d.Set("user", au.User)
d.Set("resgroup_id", au.ResgroupID)
d.Set("account_id", au.AccountID)
d.Set("compute_id", au.ComputeID)
}
func flattenAuditList(au *audit.ListAudits) []map[string]interface{} {

View File

@@ -46,11 +46,6 @@ func dataSourceAuditSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Computed: true,
},
//TODO
//"tags": {
// Type: schema.TypeString,
// Computed: true,
//},
"timestamp": {
Type: schema.TypeFloat,
Computed: true,
@@ -67,6 +62,18 @@ func dataSourceAuditSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"resgroup_id": {
Type: schema.TypeInt,
Computed: true,
},
"account_id": {
Type: schema.TypeInt,
Computed: true,
},
"compute_id": {
Type: schema.TypeInt,
Computed: true,
},
}
}

View File

@@ -52,7 +52,7 @@ func utilityAuditCheckPresence(ctx context.Context, d *schema.ResourceData, m in
req.AuditGuid = d.Get("audit_guid").(string)
}
log.Debugf("utilityStackCheckPresence: load stack")
log.Debugf("utilityAuditCheckPresence: load audit")
auditInfo, err := c.CloudBroker().Audit().Get(ctx, req)
if err != nil {
return nil, err