For instance, to implement a Blue/Green deployment pipeline with CodeDeploy on AWS ECS, I first use Pulumi to provision Load Balancer, Listeners and Target Groups (among other resources). But after I supply the Listeners to create the DeploymentConfig on CodeDeploy, the Blue/Green deployment controller will manipulate the Listeners on each deployment.
At this point, if I run pulumi preview
again, it shows that the Listeners have diverged (due to a new deployment) and Pulumi will attempt to "fix" that, conflicting with the deployment controller.
The only solution I see so far is to use pulumi state delete
to make Pulumi stop tracking those resources, but it doesn't seems like the right way to go.
What is the proper way to handle resources that are first create by Pulumi but afterwards managed elsewhere?