Exercises
5 Ex Resources

Exercise #1

New File

Create a terraform file named security.tf with an akamai_appsec_configuration resource and an akamai_appsec_security_policy resource

Configure

Configure the akamai_appsec_security_policy resource to get its config_id from the data.akamai_appsec_configuration.

Apply

Run a terraform apply

Reconfigure

Duplicate the policy resouce and make the necessary modifications to create a new policy.

Apply

Run another terraform apply

Destroy

Run a terraform destroy. What happens?

Re-Apply

Re-apply your terraform code to recreate your resources as we may need them later on.

Commit

Commit your changes and push them to GitHub.

Exercise #2

New File

Create a terraform file named property.tf with the following resources:

  • CP Code: use the resource akamai_cp_code to create a new CP code with the name, contract_id, group_id, product_id arguments
  • Edge Hostname: use the resource akamai_edge_hostname to create a new Edge Hostname using the required arguments according to the Akamai provider documentation.
  • Property: use the resource akamai_property to create a new property using the required arguments according to the Akamai provider documentation.

Configure

Observe you'll need to configure hostnames, rules and rule_format for the akamai_property too.

ℹ️

Hint: check the data.akamai_property_rules_builder data source in Techdocs.

Apply

Run another terraform apply

Commit

Commit your changes and push them to GitHub.