oci_devops_deploy_stage

This resource provides the Deploy Stage resource in Oracle Cloud Infrastructure Devops service.

Creates a new deployment stage.

Example Usage

resource "oci_devops_deploy_stage" "test_deploy_stage" {
	#Required
	deploy_pipeline_id = oci_devops_deploy_pipeline.test_deploy_pipeline.id
	deploy_stage_predecessor_collection {
		#Required
		items {
			#Required
			id = var.deploy_stage_deploy_stage_predecessor_collection_items_id
		}
	}
	deploy_stage_type = var.deploy_stage_deploy_stage_type

	#Optional
	approval_policy {
		#Required
		approval_policy_type = var.deploy_stage_approval_policy_approval_policy_type
		number_of_approvals_required = var.deploy_stage_approval_policy_number_of_approvals_required
	}
	are_hooks_enabled = var.deploy_stage_are_hooks_enabled
	blue_backend_ips {

		#Optional
		items = var.deploy_stage_blue_backend_ips_items
	}
	blue_green_strategy {
		#Required
		ingress_name = var.deploy_stage_blue_green_strategy_ingress_name
		namespace_a = var.deploy_stage_blue_green_strategy_namespace_a
		namespace_b = var.deploy_stage_blue_green_strategy_namespace_b
		strategy_type = var.deploy_stage_blue_green_strategy_strategy_type
	}
	canary_strategy {
		#Required
		ingress_name = var.deploy_stage_canary_strategy_ingress_name
		namespace = var.deploy_stage_canary_strategy_namespace
		strategy_type = var.deploy_stage_canary_strategy_strategy_type
	}
	command_spec_deploy_artifact_id = oci_devops_deploy_artifact.test_deploy_artifact.id
	compute_instance_group_blue_green_deployment_deploy_stage_id = oci_devops_deploy_stage.test_deploy_stage.id
	compute_instance_group_canary_deploy_stage_id = oci_devops_deploy_stage.test_deploy_stage.id
	compute_instance_group_canary_traffic_shift_deploy_stage_id = oci_devops_deploy_stage.test_deploy_stage.id
	compute_instance_group_deploy_environment_id = oci_devops_deploy_environment.test_deploy_environment.id
	config = var.deploy_stage_config
	container_config {
		#Required
		container_config_type = var.deploy_stage_container_config_container_config_type
		network_channel {
			#Required
			network_channel_type = var.deploy_stage_container_config_network_channel_network_channel_type
			subnet_id = oci_core_subnet.test_subnet.id

			#Optional
			nsg_ids = var.deploy_stage_container_config_network_channel_nsg_ids
		}
		shape_config {
			#Required
			ocpus = var.deploy_stage_container_config_shape_config_ocpus

			#Optional
			memory_in_gbs = var.deploy_stage_container_config_shape_config_memory_in_gbs
		}
		shape_name = oci_core_shape.test_shape.name

		#Optional
		availability_domain = var.deploy_stage_container_config_availability_domain
		compartment_id = var.compartment_id
	}
	defined_tags = {"foo-namespace.bar-key"= "value"}
	deploy_artifact_id = oci_devops_deploy_artifact.test_deploy_artifact.id
	deploy_artifact_ids = var.deploy_stage_deploy_artifact_ids
	deploy_environment_id_a = var.deploy_stage_deploy_environment_id_a
	deploy_environment_id_b = var.deploy_stage_deploy_environment_id_b
	deployment_spec_deploy_artifact_id = oci_devops_deploy_artifact.test_deploy_artifact.id
	description = var.deploy_stage_description
	display_name = var.deploy_stage_display_name
	docker_image_deploy_artifact_id = oci_devops_deploy_artifact.test_deploy_artifact.id
	failure_policy {
		#Required
		policy_type = var.deploy_stage_failure_policy_policy_type

		#Optional
		failure_count = var.deploy_stage_failure_policy_failure_count
		failure_percentage = var.deploy_stage_failure_policy_failure_percentage
	}
	freeform_tags = {"bar-key"= "value"}
	function_deploy_environment_id = oci_devops_deploy_environment.test_deploy_environment.id
	function_timeout_in_seconds = var.deploy_stage_function_timeout_in_seconds
	green_backend_ips {

		#Optional
		items = var.deploy_stage_green_backend_ips_items
	}
	helm_chart_deploy_artifact_id = oci_devops_deploy_artifact.test_deploy_artifact.id
	helm_command_artifact_ids = var.deploy_stage_helm_command_artifact_ids
	is_async = var.deploy_stage_is_async
	is_debug_enabled = var.deploy_stage_is_debug_enabled
	is_force_enabled = var.deploy_stage_is_force_enabled
	is_uninstall_on_stage_delete = var.deploy_stage_is_uninstall_on_stage_delete
	is_validation_enabled = var.deploy_stage_is_validation_enabled
	kubernetes_manifest_deploy_artifact_ids = var.deploy_stage_kubernetes_manifest_deploy_artifact_ids
	load_balancer_config {

		#Optional
		backend_port = var.deploy_stage_load_balancer_config_backend_port
		listener_name = oci_load_balancer_listener.test_listener.name
		load_balancer_id = oci_load_balancer_load_balancer.test_load_balancer.id
	}
	max_history = var.deploy_stage_max_history
	max_memory_in_mbs = var.deploy_stage_max_memory_in_mbs
	namespace = var.deploy_stage_namespace
	oke_blue_green_deploy_stage_id = oci_devops_deploy_stage.test_deploy_stage.id
	oke_canary_deploy_stage_id = oci_devops_deploy_stage.test_deploy_stage.id
	oke_canary_traffic_shift_deploy_stage_id = oci_devops_deploy_stage.test_deploy_stage.id
	oke_cluster_deploy_environment_id = oci_devops_deploy_environment.test_deploy_environment.id
	production_load_balancer_config {

		#Optional
		backend_port = var.deploy_stage_production_load_balancer_config_backend_port
		listener_name = oci_load_balancer_listener.test_listener.name
		load_balancer_id = oci_load_balancer_load_balancer.test_load_balancer.id
	}
	purpose = var.deploy_stage_purpose
	release_name = var.deploy_stage_release_name
	rollback_policy {

		#Optional
		policy_type = var.deploy_stage_rollback_policy_policy_type
	}
	rollout_policy {
		#Required
		policy_type = var.deploy_stage_rollout_policy_policy_type

		#Optional
		batch_count = var.deploy_stage_rollout_policy_batch_count
		batch_delay_in_seconds = var.deploy_stage_rollout_policy_batch_delay_in_seconds
		batch_percentage = var.deploy_stage_rollout_policy_batch_percentage
		ramp_limit_percent = var.deploy_stage_rollout_policy_ramp_limit_percent
	}
	set_string {

		#Optional
		items {

			#Optional
			name = var.deploy_stage_set_string_items_name
			value = var.deploy_stage_set_string_items_value
		}
	}
	set_values {

		#Optional
		items {

			#Optional
			name = var.deploy_stage_set_values_items_name
			value = var.deploy_stage_set_values_items_value
		}
	}
	should_cleanup_on_fail = var.deploy_stage_should_cleanup_on_fail
	should_not_wait = var.deploy_stage_should_not_wait
	should_reset_values = var.deploy_stage_should_reset_values
	should_reuse_values = var.deploy_stage_should_reuse_values
	should_skip_crds = var.deploy_stage_should_skip_crds
	should_skip_render_subchart_notes = var.deploy_stage_should_skip_render_subchart_notes
	test_load_balancer_config {

		#Optional
		backend_port = var.deploy_stage_test_load_balancer_config_backend_port
		listener_name = oci_load_balancer_listener.test_listener.name
		load_balancer_id = oci_load_balancer_load_balancer.test_load_balancer.id
	}
	timeout_in_seconds = var.deploy_stage_timeout_in_seconds
	traffic_shift_target = var.deploy_stage_traffic_shift_target
	values_artifact_ids = var.deploy_stage_values_artifact_ids
	wait_criteria {
		#Required
		wait_duration = var.deploy_stage_wait_criteria_wait_duration
		wait_type = var.deploy_stage_wait_criteria_wait_type
	}
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Deploy Stage * update - (Defaults to 20 minutes), when updating the Deploy Stage * delete - (Defaults to 20 minutes), when destroying the Deploy Stage

Import

DeployStages can be imported using the id, e.g.

$ terraform import oci_devops_deploy_stage.test_deploy_stage "id"