aws-ia / terraform-aws-mendix-private-cloud

This AWS Partner Solution uses Terraform to deploy a Mendix infrastructure in the AWS Cloud.
Apache License 2.0
12 stars 14 forks source link

init terraform-mendix-private-cloud project #1

Closed geoffreyme closed 1 year ago

tbulding commented 1 year ago

Please follow the instructions outlined in the readme.md file in the main branch of this repo. They include details for setting up the terratests necessary to validate the module.

geoffreyme commented 1 year ago

Hello @tbulding, thanks for your feedback. I moved the go.mod and go.sum files into the test directory and updated the architecture diagram based on Bruno's feedback. The test/examples_basic_test.go file is already testing the whole module :

go test -run TestExamplesBasicTest -timeout 60m
TestExamplesBasicTest 2022-12-12T21:34:27+01:00 test_structure.go:130: Copied terraform folder ../examples/basic to /var/folders/_d/xfc6vm5n525_4b7wvlyhw6_40000gp/T/TestExamplesBasicTest583836906/terraform-mendix-private-cloud/examples/basic
TestExamplesBasicTest 2022-12-12T21:34:27+01:00 retry.go:91: terraform [init -upgrade=false -backend-config=backend=local]
[...]
TestExamplesBasicTest 2022-12-12T22:19:41+01:00 logger.go:66: Destroy complete! Resources: 7 destroyed.
TestExamplesBasicTest 2022-12-12T22:19:41+01:00 logger.go:66:
PASS
ok      github.com/aws-ia/terraform-mendix-private-cloud    2714.959s

Does the sub-mobules (container-registry, databases...) also need to be tested separately?

I can see that the Over Status Checks is still Queued.

Thank you.

Geoffrey.

tbulding commented 1 year ago

Hello @geoffreymersch the test failed right away. Error: Invalid validation error message │ │ on variables.tf line 22, in variable "s3_bucket_name": │ 22: error_message = "Incorrect S3 bucket naming rules https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html"

I suspect your environment has some elements preconfigured.

geoffreyme commented 1 year ago

@tbulding I removed the variable validation. Is there a way to see the aws-ia-ci check output or reproduce it somewhere? Right now the check is still in a Queued — Waiting to run this check... state but I don't know why.

tbulding commented 1 year ago

Hello @geoffreymersch, it looks like the CODEOWNERS file is missing in the PR, Can you please restore it from the Main branch. I know the precommit checks will look at that and may hang.

geoffreyme commented 1 year ago

Hello @tbulding I added the file.

geoffreyme commented 1 year ago

Hello,

My fork has been deleted, I will recreate a new PR.

Geoffrey