Hi there! I’m trying to setup AWS cost budgets wit...
# general
e
Hi there! I’m trying to setup AWS cost budgets with tag filters, but can’t get what’s the expected format for the
CostFilters
map.
Copy code
_, err = budgets.NewBudget(ctx, "test-budget", &budgets.BudgetArgs{
    BudgetType: pulumi.String("COST"),
    CostFilters: pulumi.StringMap{
        "TagKeyValue": pulumi.String(`["stack$test"]`),
    },
    LimitAmount: pulumi.String(budgetAmount),
    LimitUnit:   pulumi.String("USD"),
    TimeUnit:    pulumi.String("MONTHLY"),
})
Copy code
Diagnostics:
  aws:budgets:Budget (test-budget):
    error: aws:budgets/budget:Budget resource 'test-budget' has a problem: Attribute should be a list. Examine values at 'Budget.CostFilters'.
Tried the example in the docs: https://www.pulumi.com/docs/reference/pkg/aws/budgets/budget/#example-usage, but just get a compilation error:
Copy code
Invalid composite literal type: String
Missing key in the map literal
Anyone has a working example?
Hi all, sorry for bumping up this question. Anyone have any tips on how to setup an AWS budget cost filter with Pulumi’s latest version?
The documented example doesn’t seem to work (https://www.pulumi.com/docs/reference/pkg/aws/budgets/budget/#example-usage):
Copy code
CostFilters: pulumi.StringMap{
    pulumi.String{
        Name: "Service",
        Values: []string{
            "Amazon Elastic Compute Cloud - Compute",
        },
    },
},
Compilation errors:
Copy code
Invalid composite literal type: String

Missing key in the map literal