Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data "i3_definitions" "all" {
- infrastructure = "dynamodb"
- component = "wbs"
- }
- locals {
- defns = data.i3_definitions.all.definitions
- }
- resource "i3_common" "common" {
- key = data.repliconi3_definitions.all.key
- }
- data "i3_config" "key_arn_config" {
- for_each = local.defns
- definition_key = each.key
- common_id = i3_common.common.id
- config_key = "kmsKeyArn"
- default_value = "arn:aws:kms"
- }
- resource "local_file" "my_table" {
- for_each = local.defns
- filename = "./MyTable-${each.value}"
- content = data.i3_config.key_arn_config[each.key].value
- }
- resource "i3_setting" "test_setting" {
- for_each = local.defns
- definition_key = each.key
- common_id = i3_common.common.id
- setting_key = "MyDynamoTableName"
- setting_value = local_file.my_table[each.key].filename
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement