Skip to content

Commit deaeaa3

Browse files
committed
docs: updated readme file
1 parent db686be commit deaeaa3

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

README.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,48 @@
22

33
Terraform Provider using the [Microsoft IIS Administration](https://docs.microsoft.com/en-us/IIS-Administration/) API.
44

5-
## Usage
5+
# Usage
6+
7+
## Setup
8+
69
```hcl
710
provider "iis" {
811
access_key = "your access key"
912
host = "https://localhost:55539"
1013
}
14+
```
15+
16+
## Application pools
1117

18+
```hcl
1219
resource "iis_application_pool" "name" {
1320
name = "AppPool" // Name of the Application Pool
1421
}
22+
```
23+
24+
## Directories
1525

16-
resource "iis_application" "name" {
17-
physical_path = "%systemdrive%\\inetpub\\your_app" // Path on the server to your web app
18-
application_pool = "${iis_application_pool.name.id}"
19-
path = "YourApp" // Path for URL access
20-
website = "${data.iis_website.default.ids[0]}" // id for the website is required
26+
```hcl
27+
resource "iis_file" "name" {
28+
name = "name.of.your.directory"
29+
physical_path = "%systemdrive%\\inetpub\\your_app" // full path to directory
30+
type = "directory" // can also be "file"
31+
parent = "parent_id" // id of the parent folder
2132
}
33+
```
34+
35+
## Websites
2236

23-
data "iis_website" "default" {}
24-
```
37+
```hcl
38+
data "iis_website" "website-domain-com" {
39+
name = "website.domain.com"
40+
physical_path = "%systemdrive%\\inetpub\\your_app" // full path to website folder
41+
application_pool = iis_application_pool.name.id
42+
binding {
43+
protocol = "http"
44+
port = 80
45+
ip_address = "*"
46+
hostname = "website.domain.com"
47+
}
48+
}
49+
```

0 commit comments

Comments
 (0)