Skip to content

Commit

Permalink
Merge of #6181
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Apr 9, 2024
2 parents 11f898b + 2953762 commit 84790c5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
18 changes: 11 additions & 7 deletions docs/docs/04-standard-library/cloud/domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The `cloud.Domain` resource represents a domain configuration in the cloud.
bring cloud;

let domain = new cloud.Domain(
domain: "www.example.com",
domainName: "www.example.com",
);

new cloud.Website(path: "./site", domain: domain);
Expand All @@ -42,14 +42,18 @@ Note that domain data is not persisted between simulator runs.

The AWS implementation of `cloud.Domain` requires certain platform-specific values such as the `hostedZoneId` and either `iamCertificate` or `acmCertificateArn` to be provided.

To provide these values, there are two options. You can either pass the values in the command line or you can provide a YAML file with the configurations.
To provide these values, there are two options. You can either pass the values in the command line or you can provide a TOML file with the configurations:

This YAML file should contain the data as shown in the example below:
```
wing compile -t tf-aws main.w --value root/Default/Default/Domain/acmCertificateArn=arn:aws:acm:us-east-1:111111111111:certificate/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee --value root/Default/Default/Domain/hostedZoneId=Z0111111111111111111F
```

Alternatively, create a `wing.toml` file in your project directory:

```yaml
root/Default/Default/cloud.Domain:
hostedZoneId: Z0XXXXXXXXXXXXXXXXXXF
acmCertificateArn: arn:aws:acm:us-east-1:111111111111:certificate/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
```toml
[root.Default.Default.Domain]
hostedZoneId = "Z0XXXXXXXXXXXXXXXXXXF"
acmCertificateArn = "arn:aws:acm:us-east-1:111111111111:certificate/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
```

### Azure (`tf-azure`)
Expand Down
18 changes: 11 additions & 7 deletions libs/wingsdk/src/cloud/domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The `cloud.Domain` resource represents a domain configuration in the cloud.
bring cloud;

let domain = new cloud.Domain(
domain: "www.example.com",
domainName: "www.example.com",
);

new cloud.Website(path: "./site", domain: domain);
Expand All @@ -42,14 +42,18 @@ Note that domain data is not persisted between simulator runs.

The AWS implementation of `cloud.Domain` requires certain platform-specific values such as the `hostedZoneId` and either `iamCertificate` or `acmCertificateArn` to be provided.

To provide these values, there are two options. You can either pass the values in the command line or you can provide a YAML file with the configurations.
To provide these values, there are two options. You can either pass the values in the command line or you can provide a TOML file with the configurations:

This YAML file should contain the data as shown in the example below:
```
wing compile -t tf-aws main.w --value root/Default/Default/Domain/acmCertificateArn=arn:aws:acm:us-east-1:111111111111:certificate/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee --value root/Default/Default/Domain/hostedZoneId=Z0111111111111111111F
```

Alternatively, create a `wing.toml` file in your project directory:

```yaml
root/Default/Default/cloud.Domain:
hostedZoneId: Z0XXXXXXXXXXXXXXXXXXF
acmCertificateArn: arn:aws:acm:us-east-1:111111111111:certificate/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
```toml
[root.Default.Default.Domain]
hostedZoneId = "Z0XXXXXXXXXXXXXXXXXXF"
acmCertificateArn = "arn:aws:acm:us-east-1:111111111111:certificate/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
```

### Azure (`tf-azure`)
Expand Down

0 comments on commit 84790c5

Please sign in to comment.