Configure services programmatically using ops.json
ops.json
file allows you to declaratively define configuration for your services.
In your service configuration ops.json
, you can define
ops.json
file to your Github repositoryops.json
ops.json
configuration.ops.json
. LocalOps will provision these resources and ensure they are
active & enabled for your service to use.
ops.json
, write a key called dependencies
and fill up your dependency in the following format.
id
)id
), the resource will be deleted and replaced by any other new one.
prefix
)attachmentsbucket-23490823940
. If you change prefix string, the resource will be deleted and replaced by any
other new one.
exports
)ATTACHMENTS_BUCKET_ARN
and pass ARN of the new S3
bucket to it. So that in your code, you can use it like:
skip_preview
)true
.
preview_only
)true
.
ops.json
when the service is being
deployed.
id
is seen for the first time, it is provisioned.id
is missing, it is deleted automatically during the next service
deployment .ops.json
. For example, you can add
files/objects to the S3 bucket you defined in ops.json
(see above), for example:
ops.json
, LocalOps automatically generates necessary IAM permissions and add them as
policies in the pre-conigured IAM role. Your code can just access the resources defined in ops.json
by name and all
calls made will be authenticated calls by default.
For example, for the S3 bucket defined in ops.json
, LocalOps automatically adds the following necessary IAM
permissions in the pre-configured IAM role.
ops.json
. We plan to grow this list to cover other services in
AWS. Please get in touch with us at help@localops.co if you need anything specific.
ops.json
.
cron
key in ops.json
and add any number of scheduled hits by giving
https://<host>/path
.ops.json
example: