Image Import
Import a copy of your local on-premise file to ECS, and appear as a custom replacement in the corresponding domain.
NOTE: You must upload the image file to the object storage OSS in advance. NOTE: The region where the image is imported must be the same region as the OSS bucket where the image file is uploaded. NOTE: Available in 1.69.0+.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.ImageImport;
import com.pulumi.alicloud.ecs.ImageImportArgs;
import com.pulumi.alicloud.ecs.inputs.ImageImportDiskDeviceMappingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var this_ = new ImageImport("this", ImageImportArgs.builder()
.architecture("x86_64")
.description("test import image")
.diskDeviceMappings(ImageImportDiskDeviceMappingArgs.builder()
.diskImageSize(5)
.ossBucket("testimportimage")
.ossObject("root.img")
.build())
.imageName("test-import-image")
.licenseType("Auto")
.osType("linux")
.platform("Ubuntu")
.build());
}
}
Content copied to clipboard
Attributes Reference0
The following attributes are exported:
id
- ID of the image.
Import
image can be imported using the id, e.g.
$ pulumi import alicloud:ecs/imageImport:ImageImport default m-uf66871ape***yg1q***
Content copied to clipboard
Properties
Link copied to clipboard
The operating system distribution. Default value: Others Linux. More valid values refer to ImportImage OpenAPI. NOTE: It's default value is Ubuntu before version 1.197.0.