-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from truefoundry/db-s3-iam-optional-install
Db s3 iam optional install
- Loading branch information
Showing
11 changed files
with
106 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
output "truefoundry_db_id" { | ||
value = aws_db_instance.truefoundry_db.id | ||
value = var.truefoundry_db_enabled ? aws_db_instance.truefoundry_db[0].id : "" | ||
} | ||
|
||
output "truefoundry_db_endpoint" { | ||
value = aws_db_instance.truefoundry_db.endpoint | ||
value = var.truefoundry_db_enabled ? aws_db_instance.truefoundry_db[0].endpoint : "" | ||
} | ||
|
||
output "truefoundry_db_address" { | ||
value = aws_db_instance.truefoundry_db.address | ||
value = var.truefoundry_db_enabled ? aws_db_instance.truefoundry_db[0].address : "" | ||
} | ||
|
||
output "truefoundry_db_port" { | ||
value = aws_db_instance.truefoundry_db.port | ||
value = var.truefoundry_db_enabled ? aws_db_instance.truefoundry_db[0].port : 0 | ||
} | ||
|
||
output "truefoundry_db_database_name" { | ||
value = aws_db_instance.truefoundry_db.db_name | ||
value = var.truefoundry_db_enabled ? aws_db_instance.truefoundry_db[0].db_name : "" | ||
} | ||
|
||
output "truefoundry_db_engine" { | ||
value = aws_db_instance.truefoundry_db.engine | ||
value = var.truefoundry_db_enabled ? aws_db_instance.truefoundry_db[0].engine : "" | ||
} | ||
|
||
output "truefoundry_db_username" { | ||
value = aws_db_instance.truefoundry_db.username | ||
value = var.truefoundry_db_enabled ? aws_db_instance.truefoundry_db[0].username : "" | ||
} | ||
|
||
output "truefoundry_db_password" { | ||
value = aws_db_instance.truefoundry_db.password | ||
value = var.truefoundry_db_enabled ? aws_db_instance.truefoundry_db[0].password : "" | ||
sensitive = true | ||
} | ||
|
||
output "truefoundry_bucket_id" { | ||
value = module.truefoundry_bucket.s3_bucket_id | ||
value = var.truefoundry_s3_enabled ? module.truefoundry_bucket[0].s3_bucket_id : "" | ||
} | ||
|
||
output "truefoundry_iam_role_arn" { | ||
value = module.truefoundry_oidc_iam.iam_role_arn | ||
value = var.truefoundry_iam_role_enabled ? module.truefoundry_oidc_iam[0].iam_role_arn : "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# terraform-aws-truefoundry-control-plane | ||
This guide will help you to migrate your terraform code across versions. Keeping your terraform state to the latest version is always recommeneded | ||
|
||
## Upgrade 0.3.x to 0.4.x | ||
1. Ensure you have migrated to the latest version of `0.3.x` which is `0.3.10` | ||
2. Run a plan with `0.4.0` by executing `terraform plan` or `terragrunt plan` | ||
3. Run the following command to perform the resource moving | ||
```shell | ||
# running state move of IAM role | ||
terragrunt state mv module.truefoundry_oidc_iam.aws_iam_role.this[0] module.truefoundry_oidc_iam[0].aws_iam_role.this[0] | ||
|
||
# running a for loop to move the related policies | ||
for i in {0..5} | ||
do | ||
echo "Doing this for resource $i" | ||
terragrunt state mv module.truefoundry_oidc_iam.aws_iam_role_policy_attachment.custom[$i] module.truefoundry_oidc_iam[0].aws_iam_role_policy_attachment.custom[$i] | ||
echo "Resource $i is moved" | ||
done | ||
|
||
terragrunt state mv module.truefoundry_bucket.aws_s3_bucket.this[0] module.truefoundry_bucket[0].aws_s3_bucket.this[0] | ||
terragrunt state mv module.truefoundry_bucket.aws_s3_bucket_cors_configuration.this[0] module.truefoundry_bucket[0].aws_s3_bucket_cors_configuration.this[0] | ||
terragrunt state mv module.truefoundry_bucket.aws_s3_bucket_intelligent_tiering_configuration.this module.truefoundry_bucket[0].aws_s3_bucket_intelligent_tiering_configuration.this | ||
terragrunt state mv module.truefoundry_bucket.aws_s3_bucket_lifecycle_configuration.this[0] module.truefoundry_bucket[0].aws_s3_bucket_lifecycle_configuration.this[0] | ||
terragrunt state mv module.truefoundry_bucket.aws_s3_bucket_policy.this[0] module.truefoundry_bucket[0].aws_s3_bucket_policy.this[0] | ||
terragrunt state mv module.truefoundry_bucket.aws_s3_bucket_public_access_block.this[0] module.truefoundry_bucket[0].aws_s3_bucket_public_access_block.this[0] | ||
terragrunt state mv module.truefoundry_bucket.aws_s3_bucket_server_side_encryption_configuration.this[0] module.truefoundry_bucket[0].aws_s3_bucket_server_side_encryption_configuration.this[0] | ||
terragrunt state mv module.truefoundry_bucket.aws_s3_bucket_versioning.this[0] module.truefoundry_bucket[0].aws_s3_bucket_versioning.this[0] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters