> **Page index:** https://km.oslo.systems/llms.txt lists every page on this site, with a link to its Markdown version.

# IaC repository setup

Set up the infrastructure for a new application in your IaC repository.

## Step 1: Add package

repo-iac/environments/dev/

```
ok pkg add app app-hello-world
```

Update `package-config.yml` to enable the components you need. You can use the following configuration to set up a minimal application running on **Nginx** with an internet-facing address:

repo-iac/environments/dev/app-hello-world/package-config.yml

```
# Attribute reference:
# https://github.com/oslokommune/golden-path-boilerplate/blob/main/boilerplate/terraform/app/boilerplate.yml
StackName: "app-hello-world"
app-data.StackName: "app-hello-world-data"

AppName: "hello-world" # TODO: Set this to the name of your application
AppEcsExec: false
AppReadOnlyRootFileSystem: false

ExampleImage:
  Enable: false
Ecr:
  Enable: false
ServiceConnect:
  Enable: true
AlbHostRouting:
  Enable: true
  Internal: false
  Subdomain:
    Enable: true
    TargetGroupTargetStickiness: false
DatabaseConnectivity:
  Enable: false
DailyShutdown:
  Enable: false
DeploymentPipelineV2:
  Enable: true
TelemetryCollection:
  Enable: false
  AutoInstrumentation:
    Enable: false
    Runtime: java
```

## Step 2: Install the package

repo-iac/environments/dev/app-hello-world/

```
ok pkg install
```

## Step 3: Add app to `cicd-common`

Add your application repository to `config_override.tf`:

repo-iac/environments/dev/cicd-common/config\_override.tf

```
locals {
  trusted_repositories = [
    # ...
    {
      name = "<repo-name>" # (1)!
      type = "app"
    }
  ]
}
```

1. Replace `<repo-name>` with the name of your application repository, for example `hello-world`.

## Step 4: Push

Push the code to `main`/`master`.

## Next steps

The "Terraform apply" GitHub Actions workflow launches an ECS service, but it has no container image to deploy. To do that, follow the application setup in the next guide: [Set up CI/CD for `dev`](<https://km.oslo.systems/application/container/set-up-cicd-for-dev/index.md>)
