Service
Import
Example Assuming you created a service
as follows #!/bin/bash docker service create --name foo -p 8080:80 nginx prints th ID 4pcphbxkfn2rffhbhe6czytgi you provide the definition for the resource as follows terraform resource "docker_service" "foo" {
name = "foo" task_spec { container_spec { image = "nginx" } } endpoint_spec { ports { target_port = "80" published_port = "8080" } } } then the import command is as follows #!/bin/bash
$ pulumi import docker:index/service:Service foo 4pcphbxkfn2rffhbhe6czytgi
Content copied to clipboard