old Inkdrop Documentation
  • Getting Started
    • 🚀Getting Started
  • FAQ
    • 📃FAQ
  • Core Concepts
    • 🧱Resource
    • 🔗Connector
    • 📦Wrapper
    • 📋Sidebar
    • 👩‍💻Code and Deployment
    • ⚙️Overriding Properties with the Codebox
  • Ressources
    • S3 Bucket
    • Lambda Functions
    • IAM Roles
    • API Endpoint
    • Fargate
    • Dynamo DB
    • RDS
    • SQS
    • SNS
  • Custom Code
    • Validating your cloud architecture
Powered by GitBook
On this page
  • Introduction to the Codebox
  • Overriding Default Values
  • Adding New Properties
  1. Core Concepts

Overriding Properties with the Codebox

PreviousCode and DeploymentNextS3 Bucket

Last updated 1 year ago

The codebox in the sidebar allows you to view and edit the Terraform code that is automatically generated for each resource. This is useful for overriding default property values set by the platform.

Introduction to the Codebox

The codebox displays the Terraform configuration for the specific resource you have selected. It contains the properties and values that determine the behavior of that resource.

By default, many property values are prepopulated based on best practices. But the codebox allows you to directly edit these defaults.

Overriding Default Values

For example, the SNS resource has a default Delivery Retry Attempts set to 3.

To override this, you can update the value directly in the codebox:

resource "aws_sns_topic" "mysnstopic" {

  # Other properties  

  delivery_policy = jsonencode({
    "http" : {
      "numRetries": 10, # Overriding default 3 retry attempts
    }  
  })

  # Other properties

}

The change takes effect instantly, no need to save. The architecture diagram does not change since this edits an internal property.

Adding New Properties

You can also add completely new properties that don't exist in the default configuration.

For example, adding KMS encryption:

resource "aws_sns_topic" "mysnstopic" {

  # Other properties    

  kms_master_key_id = "alias/my-key"

  # Other properties  

}

The codebox allows full flexibility to customize the Terraform beyond the built-in properties.

⚙️
Empty codebox in the sidebar