-
Notifications
You must be signed in to change notification settings - Fork 10
/
image_subscription.tf
37 lines (30 loc) · 1.58 KB
/
image_subscription.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#Get Image Agreement
resource "oci_core_app_catalog_listing_resource_version_agreement" "mp_image_agreement" {
count = local.mp_subscription_enabled
listing_id = local.listing_id
listing_resource_version = local.listing_resource_version
}
#Accept Terms and Subscribe to the image, placing the image in a particular compartment
resource "oci_core_app_catalog_subscription" "mp_image_subscription" {
count = local.mp_subscription_enabled
compartment_id = var.compartment_ocid
eula_link = oci_core_app_catalog_listing_resource_version_agreement.mp_image_agreement[0].eula_link
listing_id = oci_core_app_catalog_listing_resource_version_agreement.mp_image_agreement[0].listing_id
listing_resource_version = oci_core_app_catalog_listing_resource_version_agreement.mp_image_agreement[0].listing_resource_version
oracle_terms_of_use_link = oci_core_app_catalog_listing_resource_version_agreement.mp_image_agreement[0].oracle_terms_of_use_link
signature = oci_core_app_catalog_listing_resource_version_agreement.mp_image_agreement[0].signature
time_retrieved = oci_core_app_catalog_listing_resource_version_agreement.mp_image_agreement[0].time_retrieved
timeouts {
create = "20m"
}
}
# Gets the partner image subscription
data "oci_core_app_catalog_subscriptions" "mp_image_subscription" {
count = local.mp_subscription_enabled
compartment_id = var.compartment_ocid
listing_id = local.listing_id
filter {
name = "listing_resource_version"
values = [local.listing_resource_version]
}
}