oci_osp_gateway_subscription

This resource provides the Subscription resource in Oracle Cloud Infrastructure Osp Gateway service.

Update plan of the subscription.

Example Usage

resource "oci_osp_gateway_subscription" "test_subscription" {
	#Required
	compartment_id = var.compartment_id
	email = var.subscription_email
	osp_home_region = var.subscription_osp_home_region
	subscription {
		#Required
		subscription_plan_number = var.subscription_subscription_subscription_plan_number

		#Optional
		account_type = var.subscription_subscription_account_type
		bill_to_cust_account_id = oci_osp_gateway_bill_to_cust_account.test_bill_to_cust_account.id
		billing_address {

			#Optional
			address_key = var.subscription_subscription_billing_address_address_key
			city = var.subscription_subscription_billing_address_city
			company_name = var.subscription_subscription_billing_address_company_name
			contributor_class = var.subscription_subscription_billing_address_contributor_class
			country = var.subscription_subscription_billing_address_country
			county = var.subscription_subscription_billing_address_county
			department_name = var.subscription_subscription_billing_address_department_name
			email_address = var.subscription_subscription_billing_address_email_address
			first_name = var.subscription_subscription_billing_address_first_name
			internal_number = var.subscription_subscription_billing_address_internal_number
			job_title = var.subscription_subscription_billing_address_job_title
			last_name = var.subscription_subscription_billing_address_last_name
			line1 = var.subscription_subscription_billing_address_line1
			line2 = var.subscription_subscription_billing_address_line2
			line3 = var.subscription_subscription_billing_address_line3
			line4 = var.subscription_subscription_billing_address_line4
			middle_name = var.subscription_subscription_billing_address_middle_name
			municipal_inscription = var.subscription_subscription_billing_address_municipal_inscription
			phone_country_code = var.subscription_subscription_billing_address_phone_country_code
			phone_number = var.subscription_subscription_billing_address_phone_number
			postal_code = var.subscription_subscription_billing_address_postal_code
			province = var.subscription_subscription_billing_address_province
			state = var.subscription_subscription_billing_address_state
			state_inscription = var.subscription_subscription_billing_address_state_inscription
			street_name = var.subscription_subscription_billing_address_street_name
			street_number = var.subscription_subscription_billing_address_street_number
		}
		currency_code = var.subscription_subscription_currency_code
		gsi_org_code = var.subscription_subscription_gsi_org_code
		id = var.subscription_subscription_id
		is_intent_to_pay = var.subscription_subscription_is_intent_to_pay
		language_code = var.subscription_subscription_language_code
		organization_id = oci_osp_gateway_organization.test_organization.id
		payment_gateway {

			#Optional
			merchant_defined_data {

				#Optional
				cloud_account_name = var.subscription_subscription_payment_gateway_merchant_defined_data_cloud_account_name
				promo_type = var.subscription_subscription_payment_gateway_merchant_defined_data_promo_type
			}
		}
		payment_options {
			#Required
			payment_method = var.subscription_subscription_payment_options_payment_method

			#Optional
			credit_card_type = var.subscription_subscription_payment_options_credit_card_type
			email_address = var.subscription_subscription_payment_options_email_address
			ext_billing_agreement_id = oci_osp_gateway_ext_billing_agreement.test_ext_billing_agreement.id
			first_name = var.subscription_subscription_payment_options_first_name
			last_digits = var.subscription_subscription_payment_options_last_digits
			last_name = var.subscription_subscription_payment_options_last_name
			name_on_card = var.subscription_subscription_payment_options_name_on_card
			time_expiration = var.subscription_subscription_payment_options_time_expiration
			wallet_instrument_id = oci_osp_gateway_wallet_instrument.test_wallet_instrument.id
			wallet_transaction_id = oci_osp_gateway_wallet_transaction.test_wallet_transaction.id
		}
		plan_type = var.subscription_subscription_plan_type
		ship_to_cust_acct_role_id = oci_osp_gateway_ship_to_cust_acct_role.test_ship_to_cust_acct_role.id
		ship_to_cust_acct_site_id = oci_osp_gateway_ship_to_cust_acct_site.test_ship_to_cust_acct_site.id
		tax_info {

			#Optional
			no_tax_reason_code = var.subscription_subscription_tax_info_no_tax_reason_code
			no_tax_reason_code_details = var.subscription_subscription_tax_info_no_tax_reason_code_details
			tax_cnpj = var.subscription_subscription_tax_info_tax_cnpj
			tax_payer_id = oci_osp_gateway_tax_payer.test_tax_payer.id
			tax_reg_number = var.subscription_subscription_tax_info_tax_reg_number
		}
		time_personal_to_corporate_conv = var.subscription_subscription_time_personal_to_corporate_conv
		time_plan_upgrade = var.subscription_subscription_time_plan_upgrade
		time_start = var.subscription_subscription_time_start
		upgrade_state = var.subscription_subscription_upgrade_state
		upgrade_state_details = var.subscription_subscription_upgrade_state_details
	}
	subscription_id = oci_osp_gateway_subscription.test_subscription.id
}

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 Subscription * update - (Defaults to 20 minutes), when updating the Subscription * delete - (Defaults to 20 minutes), when destroying the Subscription

Import

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

$ terraform import oci_osp_gateway_subscription.test_subscription "subscriptions/{subscriptionId}/compartmentId/{compartmentId}/ospHomeRegion/{ospHomeRegion}"