File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ module "datadog" {
174174| [ terraform_data.external_id] ( https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/resources/data ) | resource |
175175| [ time_rotating.access_key] ( https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/rotating ) | resource |
176176| [ time_sleep.wait_datadog_forwarder] ( https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep ) | resource |
177+ | [ time_static.access_key] ( https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/static ) | resource |
177178| [ archive_file.rds_enhanced_monitoring] ( https://registry.terraform.io/providers/hashicorp/archive/latest/docs/data-sources/file ) | data source |
178179| [ aws_caller_identity.current] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity ) | data source |
179180| [ aws_iam_policy_document.assume] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document ) | data source |
Original file line number Diff line number Diff line change @@ -111,14 +111,20 @@ resource "time_rotating" "access_key" {
111111 rotation_days = var. access_key_rotation_days
112112}
113113
114+ resource "time_static" "access_key" {
115+ count = var. access_method == " user" ? 1 : 0
116+
117+ rfc3339 = time_rotating. access_key [0 ]. rfc3339
118+ }
119+
114120resource "aws_iam_access_key" "datadog" {
115121 count = var. access_method == " user" ? 1 : 0
116122
117123 user = aws_iam_user. datadog [0 ]. name
118124
119125 lifecycle {
120126 create_before_destroy = true
121- replace_triggered_by = [time_rotating . access_key [0 ]]
127+ replace_triggered_by = [time_static . access_key [0 ]]
122128 }
123129}
124130
You can’t perform that action at this time.
0 commit comments