Container Service Deployment Version
Provides a resource to manage a deployment version for your Amazon Lightsail container service.
NOTE: The Amazon Lightsail container service must be enabled to create a deployment. NOTE: This resource allows you to manage an Amazon Lightsail container service deployment version but the provider cannot destroy it. Removing this resource from your configuration will remove it from your statefile.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lightsail.ContainerServiceDeploymentVersion;
import com.pulumi.aws.lightsail.ContainerServiceDeploymentVersionArgs;
import com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionContainerArgs;
import com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointArgs;
import com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs;
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 example = new ContainerServiceDeploymentVersion("example", ContainerServiceDeploymentVersionArgs.builder()
.containers(ContainerServiceDeploymentVersionContainerArgs.builder()
.containerName("hello-world")
.image("amazon/amazon-lightsail:hello-world")
.commands()
.environment(Map.of("MY_ENVIRONMENT_VARIABLE", "my_value"))
.ports(Map.of("80", "HTTP"))
.build())
.publicEndpoint(ContainerServiceDeploymentVersionPublicEndpointArgs.builder()
.containerName("hello-world")
.containerPort(80)
.healthCheck(ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs.builder()
.healthyThreshold(2)
.unhealthyThreshold(2)
.timeoutSeconds(2)
.intervalSeconds(5)
.path("/")
.successCodes("200-499")
.build())
.build())
.serviceName(aws_lightsail_container_service.example().name())
.build());
}
}
Import
Lightsail Container Service Deployment Version can be imported using the service_name
and version
separated by a slash (/
), e.g.,
$ pulumi import aws:lightsail/containerServiceDeploymentVersion:ContainerServiceDeploymentVersion example container-service-1/1
Properties
A set of configuration blocks that describe the settings of the containers that will be launched on the container service. Maximum of 53. Detailed below.
A configuration block that describes the settings of the public endpoint for the container service. Detailed below.
The name for the container service.