Hi there. I'm trying to import a Fargate ECS servi...
# aws
p
Hi there. I'm trying to import a Fargate ECS service into a stack. The stack is written in typescript and has been used to successfully deploy a similar service in a separate cluster. I'm now trying to import existing infra into a different stack using the same code. I note that there is an import section at the bottom of each docs page for the aws provider e.g. https://www.pulumi.com/registry/packages/aws/api-docs/ecs/service/#import but there is no such section at the bottom (or anywhere else I can see) for the aws-native docs. e.g. https://www.pulumi.com/registry/packages/aws-native/api-docs/ecs/service/#package-details I have managed to import some infra with the aws-native provider by using the eaxmples from the aws provider and some common sense e.g.
pulumi import --provider urn:pulumi:test-ecs-influxdb::infra-ecs-influxdb::pulumi:providers:aws-native::test-ecs-influxdb-nativeProvider -s test-ecs-influxdb aws:alb:ListenerRule test-influxdb arn:aws:elasticloadbalancing:us-east-1:####:listener-rule/app/Test/###/###
worked as expected but when I try to import the service with
pulumi import --provider urn:pulumi:test-ecs-influxdb::infra-ecs-influxdb::pulumi:providers:aws-native::test-ecs-influxdb-nativeProvider -s test-ecs-influxdb aws-native:ecs:Service influxdb Test/InfluxD
It gives me an error:
Copy code
Diagnostics:
  aws-native:ecs:Service (influxdb):
    error: Preview failed: operation error CloudControl: GetResource, https response error StatusCode: 400, RequestID: ###, api error ValidationException: Identifier Test/InfluxDB is not valid for identifier [/properties/ServiceArn, /properties/Cluster]
I have tried some varitions on the theme using the arn and providing an array as the error seems to suggest but just get variations of the same error. Can anyone point me in the right direction please?