-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
162 changed files
with
3,725 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/hashicorp/terraform/builtin/provisioners/chef" | ||
"github.com/hashicorp/terraform/plugin" | ||
"github.com/hashicorp/terraform/terraform" | ||
) | ||
|
||
func main() { | ||
plugin.Serve(&plugin.ServeOpts{ | ||
ProvisionerFunc: func() terraform.ResourceProvisioner { | ||
return new(chef.ResourceProvisioner) | ||
}, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package aws | ||
|
||
// This list is copied from | ||
// http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints | ||
// It currently cannot be generated from the API json. | ||
var hostedZoneIDsMap = map[string]string{ | ||
"us-east-1": "Z3AQBSTGFYJSTF", | ||
"us-west-2": "Z3BJ6K6RIION7M", | ||
"us-west-1": "Z2F56UZL2M1ACD", | ||
"eu-west-1": "Z1BKCTXD74EZPE", | ||
"central-1": "Z21DNDUVLTQW6Q", | ||
"ap-southeast-1": "Z3O0J2DXBE1FTB", | ||
"ap-southeast-2": "Z1WCIGYICN2BYD", | ||
"ap-northeast-1": "Z2M4EHUR26P7ZW", | ||
"sa-east-1": "Z7KQH4QJS55SO", | ||
"us-gov-west-1": "Z31GFT0UA1I2HV", | ||
} | ||
|
||
// Returns the hosted zone ID for an S3 website endpoint region. This can be | ||
// used as input to the aws_route53_record resource's zone_id argument. | ||
func HostedZoneIDForRegion(region string) string { | ||
return hostedZoneIDsMap[region] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package aws | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestHostedZoneIDForRegion(t *testing.T) { | ||
if r := HostedZoneIDForRegion("us-east-1"); r != "Z3AQBSTGFYJSTF" { | ||
t.Fatalf("bad: %s", r) | ||
} | ||
if r := HostedZoneIDForRegion("ap-southeast-2"); r != "Z1WCIGYICN2BYD" { | ||
t.Fatalf("bad: %s", r) | ||
} | ||
|
||
// Bad input should be empty string | ||
if r := HostedZoneIDForRegion("not-a-region"); r != "" { | ||
t.Fatalf("bad: %s", r) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.