# StackMigrate

> Resource StackMigrate in pulumi-portainer.

<!-- Generated from the pulumi-portainer SDK. -->

Resource StackMigrate in pulumi-portainer.

Pulumi type: `portainer:index/stackMigrate:StackMigrate`.

`name` is the Pulumi resource name. Nested object fields are documented under that object. They are not arguments of this resource.

## Example

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

```ts
import * as portainer from "pulumi-portainer"

const resource = new portainer.StackMigrate("stackMigrate", {
  stackId: 0,
  targetEndpointId: 0,
})
```

## Arguments

| Property           | Type     | Required | Description                                                                                             |
| ------------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------- |
| `endpointId`       | `number` | no       | Optional source environment (endpoint) identifier. Required for stacks created before Portainer 1.18.0. |
| `stackId`          | `number` | yes      | Stack identifier to migrate.                                                                            |
| `stackMigrateId`   | `string` | no       |                                                                                                         |
| `stackName`        | `string` | no       | New name for the stack after migration. If not set, the original name is kept.                          |
| `swarmId`          | `string` | no       | Swarm cluster identifier (required when migrating to a Swarm environment).                              |
| `targetEndpointId` | `number` | yes      | Target environment (endpoint) identifier to migrate the stack to.                                       |

## Outputs

Computed outputs are produced by the provider. They are not constructor arguments.

| Property           | Type     | Computed | Description                                                                                             |
| ------------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------- |
| `endpointId`       | `number` | no       | Optional source environment (endpoint) identifier. Required for stacks created before Portainer 1.18.0. |
| `stackId`          | `number` | no       | Stack identifier to migrate.                                                                            |
| `stackMigrateId`   | `string` | no       |                                                                                                         |
| `stackName`        | `string` | no       | New name for the stack after migration. If not set, the original name is kept.                          |
| `swarmId`          | `string` | no       | Swarm cluster identifier (required when migrating to a Swarm environment).                              |
| `targetEndpointId` | `number` | no       | Target environment (endpoint) identifier to migrate the stack to.                                       |
