This message was deleted.
# aws
s
This message was deleted.
📣 1
g
im working with pulumi 3.17 on writing infrastructure in C# btw
b
@great-postman-59271 can you share your code?
g
I can but i actually found the issue now: I had accidentially provided the Value of the Partition and Range keys for the TableItem.HashKey and RangeKey properties. For some reason the creation succeeded but i think the whole operation failed when receiving the reply back from AWS, where the Keys would not match what pulumi expected. So the error was mine (thank god 🙂 ) but i think the way it failed could have been much nicer. First of all the exception message was not very informative. Second of all, the tableitem resource got into a state where i could not delete it again. I had to delete i manually in the AWS console and then modify the pulumi state to exclude the resource to remove it again. Modifying the code from here to reproduce the issue, i can do it with this:
Copy code
var exampleTable = new Table("exampleTable", new TableArgs
            {
                ReadCapacity = 10,
                WriteCapacity = 10,
                HashKey = "exampleHashKey",
                Attributes =
                {
                    new TableAttributeArgs
                    {
                        Name = "exampleHashKey",
                        Type = "S",
                    },
                },
            });
            var exampleTableItem = new TableItem("exampleTableItem", new TableItemArgs
            {
                TableName = exampleTable.Name,
                HashKey = "SomeKey",
                Item = @"{
  ""exampleHashKey"": {""S"": ""something""},
  ""one"": {""N"": ""11111""},
  ""two"": {""N"": ""22222""},
  ""three"": {""N"": ""33333""},
  ""four"": {""N"": ""44444""}
}
",
            });
Note the only difference is the value of the HashKey property for TableItem
👍 1
should this be submitted in some bug report?
b
@great-postman-59271 there's not much we can do here, the error you receive comes from the AWS API
a bug for the incorrect doc would be good though
g
damn, thats a shame. Well at least i figured it out. What do you mean about the incorrect doc? You mean my example above? That was edited by me to induce the error, the one you have in your documentation works 🙂