Inconsistent import behavior with `aws.ecs.Cluster`
See original GitHub issueWhen importing an existing cluster from my infrastructure, the only way to successfully do so has been using the name as the import key. For example if I have a cluster called MyCluster
the construction of the cluster would look like this:
const existingCluster = new aws.ecs.Cluster(
'pulumi-resource-name',
{
name: 'MyCluster'
},
{
import: 'MyCluster',
parent: this,
protect: true
}
);
I am then putting this cluster in a crosswalk Cluster.
However, every time after importing the cluster this way, Pulumi tries to replace the cluster when a service is added to it. To fix this (after creating the stack), I changed the import key to be import: arnForMyCluster
. Now when I got to deploy a new stack, that import statement is failing with the message.
Preview failed: refreshing urn:pulumi:staging::loop-lxp::loop-lxp:ecs:cluster$aws:ecs/cluster:Cluster::loop-lxp-cluster-existing-resource: error reading ECS Cluster (arn:aws:ecs:us-east-1:**account_id**:cluster/arn:aws:ecs:us-east-1:**account_id**::cluster/Loop): InvalidParameterException: Unsupported resource type: cluster
In opening this issue, I ultimately have two questions.
- What is the correct way to import a cluster? Is it with the cluster name or its arn?
- If it is with the cluster name, how can I keep that import statement with the cluster name consistent so new stack can be made, but not have pulumi try to recreate the cluster on every service change. I understand that might be a better issue to open up in crosswalk, but considering that its the non crosswalk import that is failing and being replaced, I figured I would start here.
Thanks for your assistance!
Package/runtime versions:
"node": 12.8.1,
"@pulumi/aws": "^2.0.0",
"@pulumi/awsx": "^0.20.0",
"@pulumi/pulumi": "^2.0.0",
"aws-sdk": "^2.667.0",
"typescript": "3.8.3"
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Troubleshoot common errors with API calls in Amazon ECS
This error occurs when the ECS service that's being updated isn't active. Verify that the ECS service that's being updated is present in...
Read more >Terraform Gotchas And How We Work Around Them - Heap
A few examples from the AWS world: an EC2 instance is a resource with attributes like the machine type, boot image, availability zone,...
Read more >Technical Notes 101 - QRadar 101 - IBM
This script performs a version check on all managed hosts' ECS and ECS_INGRESS. ... This behavior normally indicates a CEP that's being imported...
Read more >Configure SSL for External HTTP Traffic to and from Tableau ...
Additional configuration information for Tableau Server cluster environments · Configure the external load balancer for SSL passthrough. · Make sure the SSL ...
Read more >Best practices for building containers | Cloud Architecture Center
While this behavior is usually a good thing that makes builds go ... that you can use to enforce the use of security...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can import an existing ECS Cluster into Crosswalk:
Here’s the full snippet:
I believe the questions raised here have been addressed. We also now support
pulumi import
which can be used in these cases. If there area any issues you are still seeing, please do open a new issue.