Skip to content

The signature in oci_marketplace_accepted_agreement is time based #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion OracleSolaris_OCI/Launch_Solaris_with_Terraform/image.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,18 @@ data "oci_core_app_catalog_listing_resource_version" "solaris_catalog_listing" {

# Retrieve any agreements needed, which match the listing found above.
data "oci_marketplace_listing_package_agreements" "solaris_list_pkg_agreements" {

depends_on = [ time_rotating.signature_refresh_period ]

listing_id = data.oci_marketplace_listing.solaris_latest.id
package_version = data.oci_marketplace_listing.solaris_latest.default_package_version
}


# the signatures in the package agreements are time based an will expire,
# so we need to re-read the package listing once a while to replace the stale values from terraform.tfstate
resource "time_rotating" "signature_refresh_period" {
rotation_days = 7
}

# Some OCI resources can only be used after you accept the terms and conditions. For the purposes
# of automation, that acceptance is implemented as an "accepted agreement". Within the Terraform
Expand Down