Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial deployment #1

Merged
merged 1 commit into from
Jan 18, 2024
Merged

initial deployment #1

merged 1 commit into from
Jan 18, 2024

Conversation

johnricords
Copy link
Contributor

No description provided.

Copy link
Member

@lorengordon lorengordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start! It's pretty much there, but let's get some default values in there using optional(), and fix up the test.

LICENSE Outdated Show resolved Hide resolved
maint.tf Outdated Show resolved Hide resolved
maint.tf Outdated Show resolved Hide resolved
maint.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
tests/create_all/main.tf Outdated Show resolved Hide resolved
tests/create_all/main.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
Comment on lines 1 to 2
module "state_bucket" {
source = "git::https://github.com/plus3it/terraform-aws-tardigrade-s3-bucket.git?ref=5.0.0"
Copy link
Member

@lorengordon lorengordon Dec 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't testing this module at all. It's just invoking the remote s3 module. Every test config should, at least once, invoke this module using a local relative path... source = "../../"

@johnricords johnricords force-pushed the initial branch 2 times, most recently from 2283036 to 946f0b7 Compare December 28, 2023 14:09
main.tf Outdated
Comment on lines 60 to 70
resource "aws_dynamodb_table" "this" {
name = var.backend_config.dynamodb_table.name
deletion_protection_enabled = var.backend_config.dynamodb_table.deletion_protection_enabled
billing_mode = var.backend_config.dynamodb_table.billing_mode
}
Copy link
Member

@lorengordon lorengordon Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some research and figured out the error. There are a couple more arguments that are required by the CreateTable API. Not sure why the terraform resource doesn't enforce this directly. Try this:

Suggested change
resource "aws_dynamodb_table" "this" {
name = var.backend_config.dynamodb_table.name
deletion_protection_enabled = var.backend_config.dynamodb_table.deletion_protection_enabled
billing_mode = var.backend_config.dynamodb_table.billing_mode
}
resource "aws_dynamodb_table" "this" {
name = var.backend_config.dynamodb_table.name
deletion_protection_enabled = var.backend_config.dynamodb_table.deletion_protection_enabled
billing_mode = var.backend_config.dynamodb_table.billing_mode
hash_key = "LockID"
attribute {
name = "LockID"
type = "S"
}
}

main.tf Outdated
name = var.backend_config.dynamodb_table.name
deletion_protection_enabled = var.backend_config.dynamodb_table.deletion_protection_enabled
billing_mode = var.backend_config.dynamodb_table.billing_mode
hash_key = "backend"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value here is critical. It must be LockID.

Suggested change
hash_key = "backend"
hash_key = "LockID"

main.tf Outdated
hash_key = "backend"

attribute {
name = "backend"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same...

Suggested change
name = "backend"
name = "LockID"

@johnricords johnricords merged commit 4ea700d into plus3it:main Jan 18, 2024
5 checks passed
@johnricords johnricords deleted the initial branch January 18, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants