Skip to content

The following resource(s) failed to create: [ModuleRefreshSchedule]. "] Error in data collection lab stack

0

I tried to create the data collection lab. for that i use the terrafrom resource aws_cloudformation_stack and deployed the stack in the mnagement accounts. They are working fine. #Data_collection resource "aws_cloudformation_stack" "data_collection_mgmt_account" { name = "cid-data-collection-data-read-permissions-stack" provider = aws.master_nonprod_account template_url = "https://aws-managed-cost-intelligence-dashboards.s3.amazonaws.com/cfn/data-collection/deploy-data-read-permissions.yaml" capabilities = ["CAPABILITY_IAM", "CAPABILITY_NAMED_IAM"] parameters = { DataCollectionAccountID = var.global_values.destination_account_id OrganizationalUnitIds = "" AllowModuleReadInMgmt = "yes"

IncludeBackupModule = "no"
IncludeBudgetsModule = "no"
IncludeComputeOptimizerModule = "no"
IncludeCostAnomalyModule = "no"
IncludeSupportCasesModule =  "no"
IncludeECSChargebackModule = "no"
IncludeHealthEventsModule = "no"
IncludeInventoryCollectorModule = "no"
IncludeRDSUtilizationModule = "no"
IncludeRightsizingModule = "no"
IncludeTAModule = "yes"
IncludeTransitGatewayModule = "no"
IncludeLicenseManagerModule = "no"
IncludeServiceQuotasModule = "no"

} }

(i removed some values in above but it worked fine.)

But when i try to create the using the following

resource "aws_cloudformation_stack" "data_collection_destination_account" { name = "cid-data-collection-stack" provider = aws.destination_account depends_on = [ aws_cloudformation_stack.data_collection_mgmt_account,

] capabilities = ["CAPABILITY_NAMED_IAM", "CAPABILITY_IAM","CAPABILITY_AUTO_EXPAND"] template_url = "https://aws-managed-cost-intelligence-dashboards.s3.amazonaws.com/cfn/data-collection/deploy-data-collection.yaml" parameters = { ManagementAccountID = "" RegionsInScope = ""

IncludeBackupModule = "no"
IncludeBudgetsModule = "no"
IncludeComputeOptimizerModule = "no"
IncludeCostAnomalyModule = "no"
IncludeSupportCasesModule =  "no"
IncludeECSChargebackModule = "no"
IncludeHealthEventsModule = "no"
IncludeInventoryCollectorModule = "no"
IncludeRDSUtilizationModule = "no"
IncludeRightsizingModule = "no"
IncludeTAModule = "yes"
IncludeTransitGatewayModule = "no"
IncludeLicenseManagerModule = "no"
IncludeServiceQuotasModule = "no"
}

}

Vlaues are gived for parameters it gives a error Enter image description here

1 Answer
0

The error you're encountering when trying to create the data collection lab using Terraform is likely related to a CloudFormation stack deployment issue. Based on the information provided, there are a few potential causes and solutions to consider:

  1. QuickSight Availability: Ensure that QuickSight is available and supported in the region where you're trying to create the resource. The "Unrecognized resource types" error can occur when attempting to create a resource in a region where it's not supported.

  2. Template Version: Make sure you're using the latest released template for deployment. You can try using the template from the following S3 bucket: https://aws-managed-cost-intelligence-dashboards.s3.amazonaws.com/cfn/cid-cfn.yml

  3. Permissions: Verify that you have the necessary permissions in both the management account and the data collection account. In the management account, you need access to AWS CloudFormation, AWS Cost & Usage Reports, AWS IAM, AWS Lambda, and Amazon S3. In the data collection account, you should have permissions for Amazon Athena, AWS CloudFormation, AWS Directory Service, Amazon EventBridge, AWS Glue, AWS IAM, AWS Lambda, Amazon QuickSight, and Amazon S3.

  4. S3 Bucket Access: Ensure that your IAM role has the required permissions to access the AWS-managed S3 bucket containing the necessary resources for deployment.

  5. Deployment Order: Make sure you're deploying the stacks in the correct order. The management account stack should be deployed before the data collection account stack.

  6. Parameter Values: Double-check that all required parameters are correctly specified in your Terraform configuration, including the ManagementAccountID and RegionsInScope.

If the issue persists after addressing these points, you may need to delete the stack and redeploy from the beginning. Additionally, consider using the -parallelism=1 option with Terraform to avoid potential concurrent modification issues when creating IAM roles.
Sources
Cloud intelligence dashboard not deploying from cloud formation. Unrecognized resource types: [AWS::QuickSight::DataSource] | AWS re:Post
Cost Intelligence Dashboard (CID) deployment error - access to the AWS-managed s3 bucket that has the required Lambda layer is being denied | AWS re:Post
Create IAM role causes ConcurrentModification error | AWS re:Post

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.