terraform-provider-aws icon indicating copy to clipboard operation
terraform-provider-aws copied to clipboard

aws_config_configuration_aggregator -> "Error: Provider produced inconsistent result after apply"

Open tankcdr opened this issue 4 years ago • 2 comments

Terraform CLI and Terraform AWS Provider Version

` Terraform v0.14.2

  • provider registry.terraform.io/hashicorp/aws v3.24.1

`

Affected Resource(s)

aws_config_configuration_aggregator

Terraform Configuration Files

file: _config_org_aggregation.tf `resource "aws_config_configuration_aggregator" "organization-config" { count = var.config_org_aggregation_accounts == null ? 0 : 1 name = "${var.account_friendly_name}-org-config-aggregator"

account_aggregation_source { account_ids = var.config_org_aggregation_accounts all_regions = true } }`

file: modules.tf `module "infosec_onboarding" { source = "../../modules/onboarding"

baseline_tags = var.baseline_tags account_friendly_name = var.onboarding_account_friendly_name config_snapshot_delivery_frequency = var.onboarding_config_snapshot_delivery_frequency config_storage_bucket_name = var.onboarding_config_storage_bucket_name config_org_aggregation_accounts = var.onboarding_config_org_aggregation_accounts }`

file: terraform.tfvars ########################################### ################# Onboarding Module parameters ########################################### onboarding_account_friendly_name = "a name" ########################################### ################### AWS-Config parameters onboarding_config_org_aggregation_accounts = ["account1", "account2", "account3", "account4"] onboarding_config_storage_bucket_name = "com-someorganization-config-logs" onboarding_config_snapshot_delivery_frequency = "TwentyFour_Hours"

Debug Output

`module.infosec_onboarding.aws_config_configuration_aggregator.organization-config[0]: Creating...

Error: Provider produced inconsistent result after apply

When applying changes to module.infosec_onboarding.aws_config_configuration_aggregator.organization-config[0], provider "registry.terraform.io/hashicorp/aws" produced an unexpected new value: Root resource was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own issue tracker.`

Expected Behavior

The AWS Config aggregator would be created and terraform would not give an error.

Actual Behavior

The AWS Config aggregator is created, but terraform gives an error.

Steps to Reproduce

  1. terraform apply

tankcdr avatar Jan 15 '21 20:01 tankcdr

Related to https://github.com/hashicorp/terraform-provider-aws/issues/16796 for returning a better error message.

bflad avatar Mar 03 '21 21:03 bflad

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

github-actions[bot] avatar Feb 22 '23 17:02 github-actions[bot]

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Apr 25 '23 02:04 github-actions[bot]