Ensure the values in variables.tf
are correct, generate token for API-authentication(myToken
for example) and just apply terraform:
terraform apply --var authorization_token=myToken
You can find value of the OUTPUT_BASE_URL
-variable in outputs as base_url
. For your convince you can export it as an environment variable:
$ export OUTPUT_BASE_URL="{{ base_url }}"
curl $OUTPUT_BASE_URL/objects \
-H "Authorization: myToken"
curl $OUTPUT_BASE_URL/objects -X PUT \
-H "Content-Type: application/json" -H "Authorization: myToken" \
-d '{"Data":"new data2"}'
and wait about 5-10 minutes
curl $OUTPUT_BASE_URL/objects/{objectID} \
-H "Authorization: myToken"
Do not forget to replace /
to %2F
in objectID.
curl $OUTPUT_BASE_URL/objects/{objectID} -X DELETE \
-H "Authorization: myToken"
Do not forget to replace /
to %2F
in objectID.
- Authentication token is statically defined
- Big delay from
terraform apply
to working service - Terraform state is not located in S3-bucket
- Not optimal IAM-permissions in multiple places