Skip to content
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

The signature in oci_marketplace_accepted_agreement is time based #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pezinek
Copy link
Member

@pezinek pezinek commented Sep 26, 2024

The terraform plan example for creating solaris VM's from OCI Marketplace has following flaw:

The signatures in oci_marketplace_accepted_agreement are time based and expire over time, so that
if you have Solaris VM's running for quite some time already and then decide to update the terraform plan
and do subsequent "tofu apply" the update crashes with error message like this one:

module.worker.oci_marketplace_accepted_agreement.accepted_terms_of_service: Creating...
│ Error: 400-InvalidParameter, Expired signature for agreement (58993510) in listing (61750333) and version (11.4.71)
│ Suggestion: Please update the parameter(s) in the Terraform config as per error message Expired signature for agreement (58993510) in listing (61750333) and version (11.4.71)
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/marketplace_accepted_agreement 
│ API Reference: https://docs.oracle.com/iaas/api/#/en/marketplace/20181001/AcceptedAgreement/CreateAcceptedAgreement 
│ Request Target: POST https://marketplace.us-phoenix-1.oci.oraclecloud.com/20181001/acceptedAgreements 
│ Provider version: 5.39.0, released on 2024-04-24. This provider is 22 Update(s) behind to current. 
│ Service: Marketplace Accepted Agreement 
│ Operation Name: CreateAcceptedAgreement 
│ OPC request ID: 731401d55231b822c02e4aa8ad929a23/29F1C30E12A9901DBABCFEF1DE78E28F/3E2055F1792FA6FA8B067148D8F9E3BB 
│ 
│ 
│   with module.worker.oci_marketplace_accepted_agreement.accepted_terms_of_service,
│   on ../oci_marketplace_host/marketplace.tf line 88, in resource "oci_marketplace_accepted_agreement" "accepted_terms_of_service":
│   88: resource "oci_marketplace_accepted_agreement" "accepted_terms_of_service" {
│ 

this pull request is trying to resolve that problem by forcing refresh of the package listings cached in terraform.tfstate that are older than 7 days, with fresh ones that do contain recently generated signatures.

…nd subsequent `tofu apply` on existing resources crashes with: "Error: 400-InvalidParameter, Expired signature for agreement (XXX) in listing (XXX) and version (XXX)"
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant