Closed choilmto closed 3 years ago
Check format complained about aligning the =
signs:
You can also check this manually (beware that it will automatically apply a fix to your code too):
./bin/check_format.sh
Terraform fmt failed
aws/aws_dynamodb/table/main.tf
--- old/aws/aws_dynamodb/table/main.tf
+++ new/aws/aws_dynamodb/table/main.tf
@@ -31,9 +31,9 @@
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dynamodb_table#argument-reference
resource "aws_dynamodb_table" "changeme_aws_dynamodb_table" {
# Explanation: the table's name, which needs to be unique to a region
- name = "changeme_table_name"
+ name = "changeme_table_name"
# Explanation: the number of read units for the table
- read_capacity = 10
+ read_capacity = 10
# Explanation: the number of write units for the table
write_capacity = 10
hash_key = var.changeme_hash_key
I'll try to fix this here.
I've added a formatting fix: https://github.com/ContainerSolutions/terraform-examples/pull/79/commits/e8756893250fb8c270a6cde78951c341f9319278
Will run the CI on integration (once it's free) and merge.
@ianmiell could you please add the needed AWS role? (probably "dynamodb:*"
should do the trick)
AWS permissions are missing for: dynamodb:CreateTable
on resource: arn:aws:dynamodb:us-east-1:684157722011:table/changeme_table_name
aws_dynamodb_table.changeme_aws_dynamodb_table: Creating...
╷
│ Error: error creating DynamoDB Table: AccessDeniedException: User: arn:aws:iam::684157722011:user/terraform-examples is not authorized to perform: dynamodb:CreateTable on resource: arn:aws:dynamodb:us-east-1:684157722011:table/changeme_table_name
│ status code: 400, request id: S2OHQJ7DTK52FVQ4AI6DQORC2JVV4KQNSO5AEMVJF66Q9ASUAAJG
│
│ with aws_dynamodb_table.changeme_aws_dynamodb_table,
│ on main.tf line 32, in resource "aws_dynamodb_table" "changeme_aws_dynamodb_table":
│ 32: resource "aws_dynamodb_table" "changeme_aws_dynamodb_table" ***
│
╵
/home/runner/work/terraform-examples/terraform-examples/aws/aws_dynamodb/table
Upon merging, I can add another module for creating an item in the table.