Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Resource:] azurerm_cdn_frontdoor_custom_domain_association - rework associations with azurerm_cdn_frontdoor_route #18600

Merged
merged 61 commits into from
Oct 14, 2022
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
46e2144
Initial check-in...
WodansSon Sep 30, 2022
fcb98e0
Churn while I work out the logic...
WodansSon Oct 1, 2022
bfb6235
So close...
WodansSon Oct 3, 2022
d17d5cc
Fix lint error...
WodansSon Oct 3, 2022
f8d3b0d
Fix case sensitivity and move toward association
WodansSon Oct 5, 2022
aa144c7
Merge branch 'main' into b_frontdoor_custom_domains
WodansSon Oct 5, 2022
9aaf01e
Merge branch 'main' of https://github.com/hashicorp/terraform-provide…
WodansSon Oct 6, 2022
6ad1250
Almost there... total redesign...
WodansSon Oct 6, 2022
3736a07
Done... now write test cases...
WodansSon Oct 7, 2022
a435800
Last of the case insensitive fix...
WodansSon Oct 7, 2022
f6bb268
Add nil checks to helper functions
WodansSon Oct 7, 2022
2ccf477
Fix race condition with route resource
WodansSon Oct 7, 2022
fc960fe
Add note to docs for route race condition
WodansSon Oct 8, 2022
1342d3c
Add third route to example
WodansSon Oct 8, 2022
4e6ee62
Fix lint error
WodansSon Oct 8, 2022
6113701
terrafmt
WodansSon Oct 8, 2022
f57c8a4
Fix up some loose ends and test cases
WodansSon Oct 9, 2022
e2bc53c
Fix comment spacing
WodansSon Oct 9, 2022
a64c107
Terrafmt test
WodansSon Oct 9, 2022
e46d4c7
Remove import check for association
WodansSon Oct 10, 2022
bed92ba
last minute changes
WodansSon Oct 10, 2022
9042993
Remove associate_with_cdn_frontdoor_route_id
WodansSon Oct 11, 2022
c3341da
remove validation from read func
WodansSon Oct 11, 2022
e128c68
refactor disable link resource
WodansSon Oct 12, 2022
2dc3833
Update nil error message
WodansSon Oct 12, 2022
87ef090
fix typo in var name
WodansSon Oct 12, 2022
fd01df8
Update website/docs/r/cdn_frontdoor_route_disable_link_to_default_dom…
WodansSon Oct 12, 2022
367c149
Update website/docs/r/cdn_frontdoor_route.html.markdown
WodansSon Oct 12, 2022
df9d442
Update website/docs/r/cdn_frontdoor_custom_domain_association.html.ma…
WodansSon Oct 12, 2022
84a11f9
Update website/docs/r/cdn_frontdoor_custom_domain_association.html.ma…
WodansSon Oct 12, 2022
ab0845e
Update internal/services/cdn/cdn_frontdoor_custom_domain_association_…
WodansSon Oct 13, 2022
a0d7881
Update internal/services/cdn/cdn_frontdoor_custom_domain_association_…
WodansSon Oct 13, 2022
88e1d0b
Update internal/services/cdn/cdn_frontdoor_custom_domain_resource.go
WodansSon Oct 13, 2022
2d8a224
Update internal/services/cdn/cdn_frontdoor_custom_domain_resource.go
WodansSon Oct 13, 2022
b9c1245
Update internal/services/cdn/cdn_frontdoor_custom_domain_resource.go
WodansSon Oct 13, 2022
d0a0cfe
Update internal/services/cdn/cdn_frontdoor_custom_domain_resource.go
WodansSon Oct 13, 2022
b48f8f6
Update internal/services/cdn/cdn_frontdoor_custom_domain_resource.go
WodansSon Oct 13, 2022
ec1f6aa
Update internal/services/cdn/cdn_frontdoor_endpoint_resource.go
WodansSon Oct 13, 2022
1665107
Update internal/services/cdn/cdn_frontdoor_endpoint_resource.go
WodansSon Oct 13, 2022
d387a0e
Update internal/services/cdn/cdn_frontdoor_endpoint_resource.go
WodansSon Oct 13, 2022
f789e03
Update internal/services/cdn/cdn_frontdoor_endpoint_resource.go
WodansSon Oct 13, 2022
dcae3cf
Update internal/services/cdn/cdn_frontdoor_firewall_policy_resource.go
WodansSon Oct 13, 2022
0ac6010
Update internal/services/cdn/cdn_frontdoor_firewall_policy_resource.go
WodansSon Oct 13, 2022
8a0779a
Update internal/services/cdn/cdn_frontdoor_helpers.go
WodansSon Oct 13, 2022
acb73d0
Update internal/services/cdn/cdn_frontdoor_helpers.go
WodansSon Oct 13, 2022
7b8b1bf
Update internal/services/cdn/cdn_frontdoor_helpers.go
WodansSon Oct 13, 2022
04caf16
Update internal/services/cdn/cdn_frontdoor_helpers.go
WodansSon Oct 13, 2022
954f74c
Update internal/services/cdn/cdn_frontdoor_helpers.go
WodansSon Oct 13, 2022
89cdf25
Update internal/services/cdn/cdn_frontdoor_helpers.go
WodansSon Oct 13, 2022
6f0bad3
Update internal/services/cdn/cdn_frontdoor_helpers.go
WodansSon Oct 13, 2022
3f87506
Update internal/services/cdn/cdn_frontdoor_origin_group_resource.go
WodansSon Oct 13, 2022
bf212b3
Update internal/services/cdn/cdn_frontdoor_origin_group_resource.go
WodansSon Oct 13, 2022
7c26b1c
Update internal/services/cdn/cdn_frontdoor_origin_group_resource.go
WodansSon Oct 13, 2022
c213b05
Update website/docs/r/cdn_frontdoor_custom_domain_association.html.ma…
WodansSon Oct 13, 2022
e18037e
remove all Insensitively from resource
WodansSon Oct 13, 2022
dc44953
Update website/docs/r/cdn_frontdoor_custom_domain_association.html.ma…
WodansSon Oct 13, 2022
1a281aa
Address PR comments
WodansSon Oct 13, 2022
6163ae6
Merge branch 'b_frontdoor_custom_domains' of https://github.com/hashi…
WodansSon Oct 13, 2022
ba54943
Fix frontmatter issue with doc
WodansSon Oct 13, 2022
fa1939f
Remove extra space from H1
WodansSon Oct 13, 2022
0572a38
remove friendly parse function
WodansSon Oct 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lint error
  • Loading branch information
WodansSon committed Oct 8, 2022
commit 4e6ee628e8ad03e2143bf38310838a45b2f0ea3e
25 changes: 21 additions & 4 deletions website/docs/r/cdn_frontdoor_route.html.markdown
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ description: |-

Manages a CDN FrontDoor Route.

-> **RECOMMENDATION:** If your CDN FrontDoor deployment contains multiple CDN FrontDoor Route resources it is advised that you should daisy chain a `depends_on` meta-argument to each of the CDN FrontDoor Route resources to avoid the various service code race conditions that arise while moving CDN FrontDoor Custom Domains across multiple CDN FrontDoor Routes. Please see the `Daisy Chain Depends_On Example` below for more details.
-> **RECOMMENDATION:** If your CDN FrontDoor deployment contains multiple CDN FrontDoor Route resources it is advised that you should daisy chain a `depends_on` meta-argument to each of the CDN FrontDoor Route resources to avoid the various service code race conditions that arise while moving CDN FrontDoor Custom Domains across multiple CDN FrontDoor Routes. Keep in mind that the `depends_on` daisy chain will not guard against all potential race conditions depending on how you moving your CDN FrontDoor Custom Domains across your CDN FrontDoor Route resources, but it will alleviate a vast majority of the issues that may occur. Please see the `Daisy Chain Depends_On Example` below for more details.

## Example Usage

@@ -118,17 +118,34 @@ resource "azurerm_cdn_frontdoor_custom_domain_association" "fabrikam" {

```hcl
resource "azurerm_cdn_frontdoor_route" "first" {
...
name = "example-route-one"
cdn_frontdoor_endpoint_id = azurerm_cdn_frontdoor_endpoint.example.id
cdn_frontdoor_origin_group_id = azurerm_cdn_frontdoor_origin_group.example.id
cdn_frontdoor_origin_ids = [azurerm_cdn_frontdoor_origin.example.id]
cdn_frontdoor_rule_set_ids = [azurerm_cdn_frontdoor_rule_set.example.id]
enabled = true
}

resource "azurerm_cdn_frontdoor_route" "second" {
depends_on = [azurerm_cdn_frontdoor_route.first]
...

name = "example-route-two"
cdn_frontdoor_endpoint_id = azurerm_cdn_frontdoor_endpoint.example.id
cdn_frontdoor_origin_group_id = azurerm_cdn_frontdoor_origin_group.example.id
cdn_frontdoor_origin_ids = [azurerm_cdn_frontdoor_origin.example.id]
cdn_frontdoor_rule_set_ids = [azurerm_cdn_frontdoor_rule_set.example.id]
enabled = true
}

resource "azurerm_cdn_frontdoor_route" "third" {
depends_on = [azurerm_cdn_frontdoor_route.first, azurerm_cdn_frontdoor_route.second]
...

name = "example-route-three"
cdn_frontdoor_endpoint_id = azurerm_cdn_frontdoor_endpoint.example.id
cdn_frontdoor_origin_group_id = azurerm_cdn_frontdoor_origin_group.example.id
cdn_frontdoor_origin_ids = [azurerm_cdn_frontdoor_origin.example.id]
cdn_frontdoor_rule_set_ids = [azurerm_cdn_frontdoor_rule_set.example.id]
enabled = true
}
```