CDK Pipelines: Circular dependency on initial CDK Deploy for python #18854
Labels
@aws-cdk/pipelines
CDK Pipelines library
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
What is the problem?
getting the following error message when trying to deploy initial cdk pipeline using python
Circular dependency between resources: [PipelineBuildSynthCdkBuildProject6BEFA8E6, PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290, PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C, PipelineSourceterryobotdevopsWebhookResource38D875D7, Pipeline9850B417]
Reproduction Steps
i have removed account information from the code
app.py file
#!/usr/bin/env python3
import os
import aws_cdk as cdk
from infrastructure.vpc_stack import VPC
from infrastructure.infrastructure_pipeline import InfrastructurePipeline
from constructs import Construct
AWS Environment specification
Account class
env_stg = cdk.Environment(account="accountnumber", region="us-east-1")
env_prd = cdk.Environment(account="accountnumber", region="us-east-1")
Application entrypoint
app = cdk.App()
infrastructure_stack = InfrastructurePipeline(app, "TAPP-Infrastructure-Pipeline", description = f"CDK Pipeline for TAPP {env_name}")
app.synth()
pipeline stack
import aws_cdk as cdk
from infrastructure.vpc_stack import VPC
from aws_cdk import Stack, Stage
from aws_cdk.pipelines import(
CodePipeline as codepipeline,
CodePipelineSource as codepipelinesource,
ShellStep as shellstep
)
from constructs import Construct
class InfrastructurePipeline(Stack):
What did you expect to happen?
i am execting deployment of a cdk pipeline but i get the following error message
What actually happened?
i get the following error message when i deploy the stack
Infrastructure-Pipeline failed: Error [ValidationError]: Circular dependency between resources: [PipelineBuildSynthCdkBuildProject6BEFA8E6, PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290, PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C, PipelineSourceterryobotdevopsWebhookResource38D875D7, Pipeline9850B417]
at Request.extractError (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/protocol/query.js:50:29)
at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:38:9)
at Request. (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:688:12)
at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
code: 'ValidationError',
time: 2022-02-07T11:05:53.490Z,
requestId: '7dc7f937-3049-408a-b746-c2250f014224',
statusCode: 400,
retryable: false,
retryDelay: 575.0968943234187
}
Circular dependency between resources: [PipelineBuildSynthCdkBuildProject6BEFA8E6, PipelineBuildSynthCodePipelineActionRoleDefaultPolicy92C90290, PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C, PipelineSourceterryobotdevopsWebhookResource38D875D7, Pipeline9850B417]
CDK CLI Version
2.8.0 (build 8a5eb49)
Framework Version
No response
Node.js Version
v16.13.2
OS
mac os 12.1
Language
Python
Language Version
3.9.5
Other information
cdk is creating dependencies for initial deploy state
The text was updated successfully, but these errors were encountered: