CloudFrontInvalidationSchema
Hierarchy
- BaseResourceSchema
- CloudFrontInvalidationSchema
Index
Properties
inheritedlocalResourceId
The ID the resource was created with, unique within its scope.
inheritedparents
The resources this one is built on top of.
properties
Input properties.
properties.awsAccountId- The AWS account id.properties.contentVersion- What the distribution is currently serving. It is not read by the call; it is the whole trigger. Octo re-runs this resource when this value moves, and does nothing when it does not, so whoever owns the content decides when an invalidation happens by deciding what this says. A digest over the published files is the usual answer.properties.paths- The paths to drop, e.g./*. AWS bills per path beyond the first thousand a month, and/*counts as one.
Type declaration
awsAccountId: string
contentVersion: string
paths: string[]
inheritedresourceId
The ID of the resource, unique across the infrastructure: its localResourceId, followed by a hash
of its scope when it has one.
response
Saved response.
response.InvalidationId- The id AWS assigned the invalidation that ran.
Type declaration
optionalInvalidationId?: string
inheritedscope
The contexts of the models the resource is placed under, derived from where the node creating it sits in the model graph. Octo sets it; a resource created outside a model action has none.
inheritedtags
The tags applied to the resource.
Type declaration
[key string]: string
The
CloudFrontInvalidationSchemaclass is the schema for theCloudFrontInvalidationresource, which drops what CloudFront's edge locations are holding for a distribution.Terraform provisions no part of it. There is no managed resource in the AWS provider for an invalidation, because an invalidation is not a thing that exists - it is a call that runs and finishes. So this is an external resource: octo issues
CreateInvalidationitself, through theocto run-actioncallback terraform makes mid-apply.It exists because the alternative is silent. A distribution serving a bucket caches an object for as long as its cache policy says, which for
Managed-CachingOptimizedis a day, and an S3 object carries noCache-Controlof its own. Without this, uploading a new version of a site reports success and changes nothing a visitor can see until the next day.Resources/CloudFrontInvalidation
parents - The distribution whose edge caches are dropped, and the bucket whose files they hold, so the invalidation runs after the upload.
resourceId - The resource id is of format
cloudfront-invalidation-<distribution-name>-<bucket-name>.