From b908fc54dccbdacaa3a45f6971d82bc0a5e999ff Mon Sep 17 00:00:00 2001 From: Nic Jackson Date: Thu, 6 Apr 2017 09:19:37 +0100 Subject: [PATCH 01/72] Updated provider documentation to highlight limitations of interpolation syntax --- website/source/docs/configuration/providers.html.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/source/docs/configuration/providers.html.md b/website/source/docs/configuration/providers.html.md index a5a060d8c..d849ae0e1 100644 --- a/website/source/docs/configuration/providers.html.md +++ b/website/source/docs/configuration/providers.html.md @@ -117,3 +117,14 @@ KEY { CONFIG } ``` + +## Interpolation +Providers support [interpolation syntax](/docs/configuration/interpolation.html) allowing dynamic configuration at run time. + +``` +provider "aws" { + region = "${var.aws_region}" +} +``` + +Only [variables](/docs/configuration/variables) and [remote state](/docs/state/remote.html) are supported, it is not possible to use the output from a resource, module or data source in the interpolation syntax for a provider. From 059a1b2c0f3340d89053a9e0ac6fa4a97c9178ec Mon Sep 17 00:00:00 2001 From: Joern Barthel Date: Thu, 6 Apr 2017 13:14:09 +0200 Subject: [PATCH 02/72] Added chomp interpolation function. --- config/interpolate_funcs.go | 12 +++++++++ config/interpolate_funcs_test.go | 26 +++++++++++++++++++ .../docs/configuration/interpolation.html.md | 2 ++ 3 files changed, 40 insertions(+) diff --git a/config/interpolate_funcs.go b/config/interpolate_funcs.go index cc09e384c..f70fbdec6 100644 --- a/config/interpolate_funcs.go +++ b/config/interpolate_funcs.go @@ -58,6 +58,7 @@ func Funcs() map[string]ast.Function { "base64encode": interpolationFuncBase64Encode(), "base64sha256": interpolationFuncBase64Sha256(), "ceil": interpolationFuncCeil(), + "chomp": interpolationFuncChomp(), "cidrhost": interpolationFuncCidrHost(), "cidrnetmask": interpolationFuncCidrNetmask(), "cidrsubnet": interpolationFuncCidrSubnet(), @@ -459,6 +460,17 @@ func interpolationFuncCeil() ast.Function { } } +// interpolationFuncChomp removes trailing newlines from the given string +func interpolationFuncChomp() ast.Function { + return ast.Function{ + ArgTypes: []ast.Type{ast.TypeString}, + ReturnType: ast.TypeString, + Callback: func(args []interface{}) (interface{}, error) { + return strings.TrimRight(args[0].(string), "\n"), nil + }, + } +} + // interpolationFuncFloorreturns returns the greatest integer value less than or equal to the argument func interpolationFuncFloor() ast.Function { return ast.Function{ diff --git a/config/interpolate_funcs_test.go b/config/interpolate_funcs_test.go index 04e85a6d5..6c430add1 100644 --- a/config/interpolate_funcs_test.go +++ b/config/interpolate_funcs_test.go @@ -370,6 +370,32 @@ func TestInterpolateFuncCeil(t *testing.T) { }) } +func TestInterpolateFuncChomp(t *testing.T) { + testFunction(t, testFunctionConfig{ + Cases: []testFunctionCase{ + { + `${chomp()}`, + nil, + true, + }, + + { + `${chomp("hello world")}`, + "hello world", + false, + }, + + { + `${chomp("goodbye\ncruel\nworld\n")}`, + `goodbye +cruel +world`, + false, + }, + }, + }) +} + func TestInterpolateFuncMap(t *testing.T) { testFunction(t, testFunctionConfig{ Cases: []testFunctionCase{ diff --git a/website/source/docs/configuration/interpolation.html.md b/website/source/docs/configuration/interpolation.html.md index 709261585..b7eb15032 100644 --- a/website/source/docs/configuration/interpolation.html.md +++ b/website/source/docs/configuration/interpolation.html.md @@ -156,6 +156,8 @@ The supported built-in functions are: * `ceil(float)` - Returns the least integer value greater than or equal to the argument. + * `chomp(string)` - Removes trailing newlines from the given string. + * `cidrhost(iprange, hostnum)` - Takes an IP address range in CIDR notation and creates an IP address with the given host number. For example, `cidrhost("10.0.0.0/8", 2)` returns `10.0.0.2`. From 9622b49c457ed3cf72689c78ab94352e1e8e0e89 Mon Sep 17 00:00:00 2001 From: Joern Barthel Date: Fri, 7 Apr 2017 10:41:55 +0200 Subject: [PATCH 03/72] Support for Windows newlines. --- config/interpolate_funcs.go | 3 ++- config/interpolate_funcs_test.go | 36 ++++++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/config/interpolate_funcs.go b/config/interpolate_funcs.go index f70fbdec6..bc2c49f45 100644 --- a/config/interpolate_funcs.go +++ b/config/interpolate_funcs.go @@ -462,11 +462,12 @@ func interpolationFuncCeil() ast.Function { // interpolationFuncChomp removes trailing newlines from the given string func interpolationFuncChomp() ast.Function { + newlines := regexp.MustCompile(`(?:\r\n?|\n)*\z`) return ast.Function{ ArgTypes: []ast.Type{ast.TypeString}, ReturnType: ast.TypeString, Callback: func(args []interface{}) (interface{}, error) { - return strings.TrimRight(args[0].(string), "\n"), nil + return newlines.ReplaceAllString(args[0].(string), ""), nil }, } } diff --git a/config/interpolate_funcs_test.go b/config/interpolate_funcs_test.go index 6c430add1..78816b6dd 100644 --- a/config/interpolate_funcs_test.go +++ b/config/interpolate_funcs_test.go @@ -386,10 +386,38 @@ func TestInterpolateFuncChomp(t *testing.T) { }, { - `${chomp("goodbye\ncruel\nworld\n")}`, - `goodbye -cruel -world`, + fmt.Sprintf(`${chomp("%s")}`, "goodbye\ncruel\nworld"), + "goodbye\ncruel\nworld", + false, + }, + + { + fmt.Sprintf(`${chomp("%s")}`, "goodbye\r\nwindows\r\nworld"), + "goodbye\r\nwindows\r\nworld", + false, + }, + + { + fmt.Sprintf(`${chomp("%s")}`, "goodbye\ncruel\nworld\n"), + "goodbye\ncruel\nworld", + false, + }, + + { + fmt.Sprintf(`${chomp("%s")}`, "goodbye\ncruel\nworld\n\n\n\n"), + "goodbye\ncruel\nworld", + false, + }, + + { + fmt.Sprintf(`${chomp("%s")}`, "goodbye\r\nwindows\r\nworld\r\n"), + "goodbye\r\nwindows\r\nworld", + false, + }, + + { + fmt.Sprintf(`${chomp("%s")}`, "goodbye\r\nwindows\r\nworld\r\n\r\n\r\n\r\n"), + "goodbye\r\nwindows\r\nworld", false, }, }, From cde1df8af7080f595934cb8563580a4015b46cad Mon Sep 17 00:00:00 2001 From: Nic Jackson Date: Fri, 7 Apr 2017 10:07:23 +0100 Subject: [PATCH 04/72] Updated copy --- website/source/docs/configuration/providers.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/configuration/providers.html.md b/website/source/docs/configuration/providers.html.md index d849ae0e1..55b5e0ddc 100644 --- a/website/source/docs/configuration/providers.html.md +++ b/website/source/docs/configuration/providers.html.md @@ -127,4 +127,4 @@ provider "aws" { } ``` -Only [variables](/docs/configuration/variables) and [remote state](/docs/state/remote.html) are supported, it is not possible to use the output from a resource, module or data source in the interpolation syntax for a provider. +~> **NOTE:** Only [variables](/docs/configuration/variables) and [remote state](/docs/state/remote.html) are supported at this point, it is not currently possible to use the output from a resource, module or data source in the interpolation syntax for a provider. From c0d6cedee6f4bcf82de8fa873ed9bcd8b2fd402e Mon Sep 17 00:00:00 2001 From: Nic Jackson Date: Fri, 7 Apr 2017 10:26:30 +0100 Subject: [PATCH 05/72] Updated documentation with comments from @sethvargo and @radeksimko --- website/source/docs/configuration/providers.html.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/source/docs/configuration/providers.html.md b/website/source/docs/configuration/providers.html.md index af1737ddd..0b277a912 100644 --- a/website/source/docs/configuration/providers.html.md +++ b/website/source/docs/configuration/providers.html.md @@ -118,10 +118,10 @@ KEY { ## Interpolation Providers support [interpolation syntax](/docs/configuration/interpolation.html) allowing dynamic configuration at run time. -``` +```hcl provider "aws" { - region = "${var.aws_region}" + region = "${var.aws_region}" } ``` -~> **NOTE:** Only [variables](/docs/configuration/variables) and [remote state](/docs/state/remote.html) are supported at this point, it is not currently possible to use the output from a resource, module or data source in the interpolation syntax for a provider. +-> **NOTE:** Because providers are one of the first things loaded when Terraform parses the graph, it is not possible to use the output from modules or resources as inputs to the provider. At this time, only [variables](/docs/configuration/variables.html) and [data sources](/docs/configuration/data-sources.html), including [remote state](/docs/providers/terraform/d/remote_state.html) may be used in an interpolation inside a provider stanza. From 8f7171fc7603055d7210d9bb338b448a70474041 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 7 Apr 2017 12:29:24 +0100 Subject: [PATCH 06/72] provider/aws: Raise timeout for deleting APIG REST API (#13414) --- builtin/providers/aws/resource_aws_api_gateway_rest_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_api_gateway_rest_api.go b/builtin/providers/aws/resource_aws_api_gateway_rest_api.go index db2cd6eaa..02d84ded4 100644 --- a/builtin/providers/aws/resource_aws_api_gateway_rest_api.go +++ b/builtin/providers/aws/resource_aws_api_gateway_rest_api.go @@ -172,7 +172,7 @@ func resourceAwsApiGatewayRestApiDelete(d *schema.ResourceData, meta interface{} conn := meta.(*AWSClient).apigateway log.Printf("[DEBUG] Deleting API Gateway: %s", d.Id()) - return resource.Retry(5*time.Minute, func() *resource.RetryError { + return resource.Retry(10*time.Minute, func() *resource.RetryError { _, err := conn.DeleteRestApi(&apigateway.DeleteRestApiInput{ RestApiId: aws.String(d.Id()), }) From 0010a14f7586dfb602a159ce6892f41ce69c265a Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 7 Apr 2017 12:30:09 +0100 Subject: [PATCH 07/72] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9be92c79e..591eceb71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ BUG FIXES: * provider/aws: Increase subnet deletion timeout [GH-13356] * provider/aws: Increase launch_configuration creation timeout [GH-13357] * provider/aws: Increase Beanstalk env 'ready' timeout [GH-13359] + * provider/aws: Raise timeout for deleting APIG REST API [GH-13414] * provider/aws: Recreate opsworks_stack on change of service_role_arn [GH-13325] * provider/aws: Fix KMS Key reading with Exists method [GH-13348] * provider/azurerm: Network Security Group - ignoring protocol casing at Import time [GH-13153] From a4768eb9f9796d4ba4548eebe03568547011b479 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 7 Apr 2017 12:30:30 +0100 Subject: [PATCH 08/72] provider/aws: Raise timeout for attaching/detaching VPN GW (#13457) --- builtin/providers/aws/resource_aws_vpn_gateway.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_vpn_gateway.go b/builtin/providers/aws/resource_aws_vpn_gateway.go index 89c7bea88..19be0e324 100644 --- a/builtin/providers/aws/resource_aws_vpn_gateway.go +++ b/builtin/providers/aws/resource_aws_vpn_gateway.go @@ -205,7 +205,7 @@ func resourceAwsVpnGatewayAttach(d *schema.ResourceData, meta interface{}) error Pending: []string{"detached", "attaching"}, Target: []string{"attached"}, Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id(), "available"), - Timeout: 1 * time.Minute, + Timeout: 5 * time.Minute, } if _, err := stateConf.WaitForState(); err != nil { return fmt.Errorf( @@ -266,7 +266,7 @@ func resourceAwsVpnGatewayDetach(d *schema.ResourceData, meta interface{}) error Pending: []string{"attached", "detaching", "available"}, Target: []string{"detached"}, Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id(), "detached"), - Timeout: 1 * time.Minute, + Timeout: 5 * time.Minute, } if _, err := stateConf.WaitForState(); err != nil { return fmt.Errorf( From 7451166ae7f959b4dfa8a46eff3217d5af8e172f Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 7 Apr 2017 12:31:01 +0100 Subject: [PATCH 09/72] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 591eceb71..9926af80c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ BUG FIXES: * provider/aws: Increase launch_configuration creation timeout [GH-13357] * provider/aws: Increase Beanstalk env 'ready' timeout [GH-13359] * provider/aws: Raise timeout for deleting APIG REST API [GH-13414] + * provider/aws: Raise timeout for attaching/detaching VPN Gateway [GH-13457] * provider/aws: Recreate opsworks_stack on change of service_role_arn [GH-13325] * provider/aws: Fix KMS Key reading with Exists method [GH-13348] * provider/azurerm: Network Security Group - ignoring protocol casing at Import time [GH-13153] From cfd410105553cc75811510af26baadd96171a6e0 Mon Sep 17 00:00:00 2001 From: Joe Topjian Date: Fri, 7 Apr 2017 06:13:08 -0600 Subject: [PATCH 10/72] provider/openstack: Add SOFT_DELETED to delete status (#13444) This commit allows clean deletion of instances that have a status of SOFT_DELETED. --- .../openstack/resource_openstack_compute_instance_v2.go | 2 +- .../resource_openstack_compute_instance_v2_test.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go index 5a60b55c5..028b6fb57 100644 --- a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go @@ -919,7 +919,7 @@ func resourceComputeInstanceV2Delete(d *schema.ResourceData, meta interface{}) e stateConf := &resource.StateChangeConf{ Pending: []string{"ACTIVE", "SHUTOFF"}, - Target: []string{"DELETED"}, + Target: []string{"DELETED", "SOFT_DELETED"}, Refresh: ServerV2StateRefreshFunc(computeClient, d.Id()), Timeout: d.Timeout(schema.TimeoutDelete), Delay: 10 * time.Second, diff --git a/builtin/providers/openstack/resource_openstack_compute_instance_v2_test.go b/builtin/providers/openstack/resource_openstack_compute_instance_v2_test.go index cf43ee4bb..affc17d6f 100644 --- a/builtin/providers/openstack/resource_openstack_compute_instance_v2_test.go +++ b/builtin/providers/openstack/resource_openstack_compute_instance_v2_test.go @@ -678,9 +678,11 @@ func testAccCheckComputeV2InstanceDestroy(s *terraform.State) error { continue } - _, err := servers.Get(computeClient, rs.Primary.ID).Extract() + server, err := servers.Get(computeClient, rs.Primary.ID).Extract() if err == nil { - return fmt.Errorf("Instance still exists") + if server.Status != "SOFT_DELETED" { + return fmt.Errorf("Instance still exists") + } } } From 16a3e8bb301cbc66fccb15d59a2650c7c612f191 Mon Sep 17 00:00:00 2001 From: Paul Stack Date: Fri, 7 Apr 2017 15:15:10 +0300 Subject: [PATCH 11/72] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9926af80c..bcddb2e62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ BUG FIXES: * provider/azurerm: Fix crash when importing Local Network Gateways [GH-13261] * provider/bitbucket: Fixed issue where provider would fail with an "EOF" error on some operations [GH-13390] * provider/openstack: Refresh volume_attachment from state if NotFound [GH-13342] + * provider/openstack: Add SOFT_DELETED to delete status [GH-13444] * provider/profitbricks: Changed output type of ips variable of ip_block ProfitBricks resource [GH-13290] ## 0.9.2 (March 28, 2017) From afb8bb27e8cc4d2b205523b7d311de086b4dad13 Mon Sep 17 00:00:00 2001 From: Gavin Williams Date: Fri, 7 Apr 2017 13:15:31 +0100 Subject: [PATCH 12/72] provider/openstack: Add support for 'value_specs' options to (#13380) `openstack_compute_servergroup_v2` Refactor to use common `types.go` and `MapValueSpecs function`. Added supporting website documentation. --- .../resource_openstack_compute_servergroup_v2.go | 15 ++++++++++++--- builtin/providers/openstack/types.go | 13 +++++++++++++ .../r/compute_servergroup_v2.html.markdown | 2 ++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/builtin/providers/openstack/resource_openstack_compute_servergroup_v2.go b/builtin/providers/openstack/resource_openstack_compute_servergroup_v2.go index 5616ef9a9..70b31eec6 100644 --- a/builtin/providers/openstack/resource_openstack_compute_servergroup_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_servergroup_v2.go @@ -41,6 +41,11 @@ func resourceComputeServerGroupV2() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "value_specs": &schema.Schema{ + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + }, }, } } @@ -52,10 +57,14 @@ func resourceComputeServerGroupV2Create(d *schema.ResourceData, meta interface{} return fmt.Errorf("Error creating OpenStack compute client: %s", err) } - createOpts := &servergroups.CreateOpts{ - Name: d.Get("name").(string), - Policies: resourceServerGroupPoliciesV2(d), + createOpts := ServerGroupCreateOpts{ + servergroups.CreateOpts{ + Name: d.Get("name").(string), + Policies: resourceServerGroupPoliciesV2(d), + }, + MapValueSpecs(d), } + log.Printf("[DEBUG] Create Options: %#v", createOpts) newSG, err := servergroups.Create(computeClient, createOpts).Extract() if err != nil { diff --git a/builtin/providers/openstack/types.go b/builtin/providers/openstack/types.go index e2d19304c..9c6a4f67e 100644 --- a/builtin/providers/openstack/types.go +++ b/builtin/providers/openstack/types.go @@ -10,6 +10,7 @@ import ( "strings" "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/keypairs" + "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/servergroups" "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/fwaas/firewalls" "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/fwaas/policies" "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/fwaas/rules" @@ -250,6 +251,18 @@ func (opts RuleCreateOpts) ToRuleCreateMap() (map[string]interface{}, error) { return b, nil } +// ServerGroupCreateOpts represents the attributes used when creating a new router. +type ServerGroupCreateOpts struct { + servergroups.CreateOpts + ValueSpecs map[string]string `json:"value_specs,omitempty"` +} + +// ToServerGroupCreateMap casts a CreateOpts struct to a map. +// It overrides routers.ToServerGroupCreateMap to add the ValueSpecs field. +func (opts ServerGroupCreateOpts) ToServerGroupCreateMap() (map[string]interface{}, error) { + return BuildRequest(opts, "server_group") +} + // SubnetCreateOpts represents the attributes used when creating a new subnet. type SubnetCreateOpts struct { subnets.CreateOpts diff --git a/website/source/docs/providers/openstack/r/compute_servergroup_v2.html.markdown b/website/source/docs/providers/openstack/r/compute_servergroup_v2.html.markdown index a3d714a3b..340d5ed48 100644 --- a/website/source/docs/providers/openstack/r/compute_servergroup_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/compute_servergroup_v2.html.markdown @@ -35,6 +35,8 @@ The following arguments are supported: the Policies section for more information. Changing this creates a new server group. +* `value_specs` - (Optional) Map of additional options. + ## Policies * `affinity` - All instances/servers launched in this group will be hosted on From 84fca9ec83ce4bccb6d68785a98c0da9a57c4c94 Mon Sep 17 00:00:00 2001 From: Paul Stack Date: Fri, 7 Apr 2017 15:16:13 +0300 Subject: [PATCH 13/72] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcddb2e62..810f1f80c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ IMPROVEMENTS: * provider/cloudstack: Do not force a new resource when updating `cloudstack_loadbalancer_rule` members [GH-11786] * provider/github: Handle the case when issue labels already exist [GH-13182] * provider/google: Mark `google_container_cluster`'s `client_key` & `password` inside `master_auth` as sensitive [GH-13148] + * provider/openstack: Add support for 'value_specs' options to `openstack_compute_servergroup_v2` [GH-13380] * provider/triton: Move to joyent/triton-go [GH-13225] BUG FIXES: From 2c9c4f347578e93927f8441f82210122e3289f10 Mon Sep 17 00:00:00 2001 From: Paul Stack Date: Fri, 7 Apr 2017 16:14:31 +0300 Subject: [PATCH 14/72] Bump Statuscake deps to support TriggerRate (#13387) --- vendor/github.com/DreamItGetIT/statuscake/responses.go | 2 ++ vendor/vendor.json | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vendor/github.com/DreamItGetIT/statuscake/responses.go b/vendor/github.com/DreamItGetIT/statuscake/responses.go index 88affa0be..9297e4301 100644 --- a/vendor/github.com/DreamItGetIT/statuscake/responses.go +++ b/vendor/github.com/DreamItGetIT/statuscake/responses.go @@ -43,6 +43,7 @@ type detailResponse struct { ProcessingOn string `json:"ProcessingOn"` DownTimes int `json:"DownTimes,string"` Sensitive bool `json:"Sensitive"` + TriggerRate int `json:"string,TriggerRate"` } func (d *detailResponse) test() *Test { @@ -64,5 +65,6 @@ func (d *detailResponse) test() *Test { FindString: d.FindString, DoNotFind: d.DoNotFind, Port: d.Port, + TriggerRate: d.TriggerRate, } } diff --git a/vendor/vendor.json b/vendor/vendor.json index 7b007d414..cfbc3656c 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -375,10 +375,10 @@ "revision": "edd0930276e7f1a5f2cf3e7835b5dc42a3217669" }, { - "checksumSHA1": "oHtkxzPF9DIWqua2uA5MiVFRq+Q=", + "checksumSHA1": "jtSV16UIYcS+MTy2bor1Nd+6tM8=", "path": "github.com/DreamItGetIT/statuscake", - "revision": "93fe653ce590267167708b20d7f49e0cc7021d99", - "revisionTime": "2017-02-15T23:13:05Z" + "revision": "2eaa583e3badecb05ab0e963ed19f3d7f1a23273", + "revisionTime": "2017-04-07T12:51:49Z" }, { "checksumSHA1": "nomT+8bvze/Qmc0tK0r0mwgHV6M=", From 805612c38cd92b03738991767b7620ed4ac350d1 Mon Sep 17 00:00:00 2001 From: Paul Stack Date: Fri, 7 Apr 2017 17:02:39 +0300 Subject: [PATCH 15/72] provider/aws: Remove deprecated endpoints from Provider introduction (#13461) Fixes: #13450 --- .../docs/providers/aws/index.html.markdown | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/source/docs/providers/aws/index.html.markdown b/website/source/docs/providers/aws/index.html.markdown index 4cb1c0ce9..8f2d344b4 100644 --- a/website/source/docs/providers/aws/index.html.markdown +++ b/website/source/docs/providers/aws/index.html.markdown @@ -176,14 +176,6 @@ The following arguments are supported in the `provider` block: * `insecure` - (Optional) Explicitly allow the provider to perform "insecure" SSL requests. If omitted, default value is `false`. -* `dynamodb_endpoint` - (Optional) Use this to override the default endpoint - URL constructed from the `region`. It's typically used to connect to - `dynamodb-local`. - -* `kinesis_endpoint` - (Optional) Use this to override the default endpoint - URL constructed from the `region`. It's typically used to connect to - `kinesalite`. - * `skip_credentials_validation` - (Optional) Skip the credentials validation via the STS API. Useful for AWS API implementations that do not have STS available or implemented. @@ -238,6 +230,14 @@ in excess of those allowed by the access policy of the role that is being assume Nested `endpoints` block supports the following: +* `dynamodb` - (Optional) Use this to override the default endpoint + URL constructed from the `region`. It's typically used to connect to + `dynamodb-local`. + +* `kinesis` - (Optional) Use this to override the default endpoint + URL constructed from the `region`. It's typically used to connect to + `kinesalite`. + * `iam` - (Optional) Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom IAM endpoints. From 0334fb0341e3f3e807231bb745f8dd5febf81642 Mon Sep 17 00:00:00 2001 From: Clint Date: Fri, 7 Apr 2017 09:10:29 -0500 Subject: [PATCH 16/72] providers/aws: Update ElasticTranscoderPreset to have default for MaxFrameRate (#13422) --- builtin/providers/aws/resource_aws_elastic_transcoder_preset.go | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/providers/aws/resource_aws_elastic_transcoder_preset.go b/builtin/providers/aws/resource_aws_elastic_transcoder_preset.go index 0f7c76e98..72639fedf 100644 --- a/builtin/providers/aws/resource_aws_elastic_transcoder_preset.go +++ b/builtin/providers/aws/resource_aws_elastic_transcoder_preset.go @@ -213,6 +213,7 @@ func resourceAwsElasticTranscoderPreset() *schema.Resource { "max_frame_rate": &schema.Schema{ Type: schema.TypeString, Optional: true, + Default: "30", ForceNew: true, }, "max_height": &schema.Schema{ From 80b29dbd64218a365396444960320dbd4102b35c Mon Sep 17 00:00:00 2001 From: Clint Date: Fri, 7 Apr 2017 09:10:56 -0500 Subject: [PATCH 17/72] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 810f1f80c..26b1f7924 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ IMPROVEMENTS: * provider/aws: Add support for treat_missing_data to cloudwatch_metric_alarm [GH-13358] * provider/aws: Add support for evaluate_low_sample_count_percentiles to cloudwatch_metric_alarm [GH-13371] * provider/aws: Fix `aws_s3_bucket` drift detection of logging options [GH-13281] + * providers/aws: Update ElasticTranscoderPreset to have default for MaxFrameRate [GH-13422] * provider/bitbucket: Improved error handling [GH-13390] * provider/cloudstack: Do not force a new resource when updating `cloudstack_loadbalancer_rule` members [GH-11786] * provider/github: Handle the case when issue labels already exist [GH-13182] From f2a2c28163f3e169d1367f4e5efff926f23d9ae2 Mon Sep 17 00:00:00 2001 From: Paul Stack Date: Fri, 7 Apr 2017 17:26:16 +0300 Subject: [PATCH 18/72] provider/aws: Bump SDK to 1.8.10 (#13459) --- vendor/github.com/aws/aws-sdk-go/CHANGELOG.md | 13 + .../aws/aws-sdk-go/CHANGELOG_PENDING.md | 2 +- .../aws/aws-sdk-go/aws/request/handlers.go | 7 +- .../aws/aws-sdk-go/aws/request/request.go | 20 +- .../aws/aws-sdk-go/aws/request/retryer.go | 26 +- .../aws/request/timeout_read_closer.go | 94 +++ .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/elasticache/api.go | 356 +++++++++- .../aws-sdk-go/service/elasticache/errors.go | 20 +- .../aws/aws-sdk-go/service/elbv2/api.go | 75 ++- .../aws/aws-sdk-go/service/elbv2/errors.go | 2 +- .../service/kinesis/customizations.go | 22 + vendor/vendor.json | 636 +++++++++--------- 13 files changed, 902 insertions(+), 373 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesis/customizations.go diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md index 698e38413..3cb311671 100644 --- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md @@ -1,3 +1,16 @@ +Release v1.8.10 (2017-04-06) +=== + +### Service Client Updates +* `service/elbv2`: Updates service documentation + +Release v1.8.9 (2017-04-05) +=== + +### Service Client Updates +* `service/elasticache`: Updates service API, documentation, paginators, and examples + * ElastiCache added support for testing the Elasticache Multi-AZ feature with Automatic Failover. + Release v1.8.8 (2017-04-04) === diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md index 5c517dca8..8a1927a39 100644 --- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md +++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md @@ -2,4 +2,4 @@ ### SDK Enhancements -### SDK Bugs +### SDK Bugs diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go index edf55384d..6c14336f6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go @@ -139,9 +139,14 @@ func (l *HandlerList) PushFrontNamed(n NamedHandler) { // Remove removes a NamedHandler n func (l *HandlerList) Remove(n NamedHandler) { + l.RemoveByName(n.Name) +} + +// RemoveByName removes a NamedHandler by name. +func (l *HandlerList) RemoveByName(name string) { for i := 0; i < len(l.list); i++ { m := l.list[i] - if m.Name == n.Name { + if m.Name == name { // Shift array preventing creating new arrays copy(l.list[i:], l.list[i+1:]) l.list[len(l.list)-1] = NamedHandler{} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go index ca9eac44e..1f131dfd3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go @@ -16,10 +16,20 @@ import ( "github.com/aws/aws-sdk-go/aws/client/metadata" ) -// CanceledErrorCode is the error code that will be returned by an -// API request that was canceled. Requests given a aws.Context may -// return this error when canceled. -const CanceledErrorCode = "RequestCanceled" +const ( + // ErrCodeSerialization is the serialization error code that is received + // during protocol unmarshaling. + ErrCodeSerialization = "SerializationError" + + // ErrCodeResponseTimeout is the connection timeout error that is recieved + // during body reads. + ErrCodeResponseTimeout = "ResponseTimeout" + + // CanceledErrorCode is the error code that will be returned by an + // API request that was canceled. Requests given a aws.Context may + // return this error when canceled. + CanceledErrorCode = "RequestCanceled" +) // A Request is the service request to be made. type Request struct { @@ -349,7 +359,7 @@ func (r *Request) ResetBody() { // Related golang/go#18257 l, err := computeBodyLength(r.Body) if err != nil { - r.Error = awserr.New("SerializationError", "failed to compute request body size", err) + r.Error = awserr.New(ErrCodeSerialization, "failed to compute request body size", err) return } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go index 1d5ad8c1d..632cd7099 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go @@ -1,6 +1,9 @@ package request import ( + "net" + "os" + "syscall" "time" "github.com/aws/aws-sdk-go/aws" @@ -28,6 +31,7 @@ func WithRetryer(cfg *aws.Config, retryer Retryer) *aws.Config { var retryableCodes = map[string]struct{}{ "RequestError": {}, "RequestTimeout": {}, + ErrCodeResponseTimeout: {}, "RequestTimeoutException": {}, // Glacier's flavor of RequestTimeout } @@ -69,12 +73,32 @@ func isCodeExpiredCreds(code string) bool { return ok } +func isSerializationErrorRetryable(err error) bool { + if err == nil { + return false + } + + if aerr, ok := err.(awserr.Error); ok { + return isCodeRetryable(aerr.Code()) + } + + if opErr, ok := err.(*net.OpError); ok { + if sysErr, ok := opErr.Err.(*os.SyscallError); ok { + return sysErr.Err == syscall.ECONNRESET + } + } + + return false +} + // IsErrorRetryable returns whether the error is retryable, based on its Code. // Returns false if the request has no Error set. func (r *Request) IsErrorRetryable() bool { if r.Error != nil { - if err, ok := r.Error.(awserr.Error); ok { + if err, ok := r.Error.(awserr.Error); ok && err.Code() != ErrCodeSerialization { return isCodeRetryable(err.Code()) + } else if ok { + return isSerializationErrorRetryable(err.OrigErr()) } } return false diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go new file mode 100644 index 000000000..09a44eb98 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go @@ -0,0 +1,94 @@ +package request + +import ( + "io" + "time" + + "github.com/aws/aws-sdk-go/aws/awserr" +) + +var timeoutErr = awserr.New( + ErrCodeResponseTimeout, + "read on body has reached the timeout limit", + nil, +) + +type readResult struct { + n int + err error +} + +// timeoutReadCloser will handle body reads that take too long. +// We will return a ErrReadTimeout error if a timeout occurs. +type timeoutReadCloser struct { + reader io.ReadCloser + duration time.Duration +} + +// Read will spin off a goroutine to call the reader's Read method. We will +// select on the timer's channel or the read's channel. Whoever completes first +// will be returned. +func (r *timeoutReadCloser) Read(b []byte) (int, error) { + timer := time.NewTimer(r.duration) + c := make(chan readResult, 1) + + go func() { + n, err := r.reader.Read(b) + timer.Stop() + c <- readResult{n: n, err: err} + }() + + select { + case data := <-c: + return data.n, data.err + case <-timer.C: + return 0, timeoutErr + } +} + +func (r *timeoutReadCloser) Close() error { + return r.reader.Close() +} + +const ( + // HandlerResponseTimeout is what we use to signify the name of the + // response timeout handler. + HandlerResponseTimeout = "ResponseTimeoutHandler" +) + +// adaptToResponseTimeoutError is a handler that will replace any top level error +// to a ErrCodeResponseTimeout, if its child is that. +func adaptToResponseTimeoutError(req *Request) { + if err, ok := req.Error.(awserr.Error); ok { + aerr, ok := err.OrigErr().(awserr.Error) + if ok && aerr.Code() == ErrCodeResponseTimeout { + req.Error = aerr + } + } +} + +// WithResponseReadTimeout is a request option that will wrap the body in a timeout read closer. +// This will allow for per read timeouts. If a timeout occurred, we will return the +// ErrCodeResponseTimeout. +// +// svc.PutObjectWithContext(ctx, params, request.WithTimeoutReadCloser(30 * time.Second) +func WithResponseReadTimeout(duration time.Duration) Option { + return func(r *Request) { + + var timeoutHandler = NamedHandler{ + HandlerResponseTimeout, + func(req *Request) { + req.HTTPResponse.Body = &timeoutReadCloser{ + reader: req.HTTPResponse.Body, + duration: duration, + } + }} + + // remove the handler so we are not stomping over any new durations. + r.Handlers.Send.RemoveByName(HandlerResponseTimeout) + r.Handlers.Send.PushBackNamed(timeoutHandler) + + r.Handlers.Unmarshal.PushBack(adaptToResponseTimeoutError) + r.Handlers.UnmarshalError.PushBack(adaptToResponseTimeoutError) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index f8531cf93..bf7714152 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.8.8" +const SDKVersion = "1.8.10" diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go index ee02a8089..f72386b36 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go @@ -58,7 +58,7 @@ func (c *ElastiCache) AddTagsToResourceRequest(input *AddTagsToResourceInput) (r // AddTagsToResource API operation for Amazon ElastiCache. // -// Adds up to 10 cost allocation tags to the named resource. A cost allocation +// Adds up to 50 cost allocation tags to the named resource. A cost allocation // tag is a key-value pair where the key and value are case-sensitive. You can // use cost allocation tags to categorize and track your AWS costs. // @@ -87,7 +87,7 @@ func (c *ElastiCache) AddTagsToResourceRequest(input *AddTagsToResourceInput) (r // * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" // The request cannot be processed because it would cause the resource to have // more than the allowed number of tags. The maximum number of tags permitted -// on a resource is 10. +// on a resource is 50. // // * ErrCodeInvalidARNFault "InvalidARN" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. @@ -477,7 +477,7 @@ func (c *ElastiCache) CreateCacheClusterRequest(input *CreateCacheClusterInput) // * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" // The request cannot be processed because it would cause the resource to have // more than the allowed number of tags. The maximum number of tags permitted -// on a resource is 10. +// on a resource is 50. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -552,8 +552,20 @@ func (c *ElastiCache) CreateCacheParameterGroupRequest(input *CreateCacheParamet // CreateCacheParameterGroup API operation for Amazon ElastiCache. // -// Creates a new cache parameter group. A cache parameter group is a collection -// of parameters that you apply to all of the nodes in a cache cluster. +// Creates a new Amazon ElastiCache cache parameter group. An ElastiCache cache +// parameter group is a collection of parameters and their values that are applied +// to all of the nodes in any cache cluster or replication group using the CacheParameterGroup. +// +// A newly created CacheParameterGroup is an exact duplicate of the default +// parameter group for the CacheParameterGroupFamily. To customize the newly +// created CacheParameterGroup you can change the values of specific parameters. +// For more information, see: +// +// * ModifyCacheParameterGroup (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyCacheParameterGroup.html) +// in the ElastiCache API Reference. +// +// * Parameters and Parameter Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/ParameterGroups.html) +// in the ElastiCache User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -855,7 +867,11 @@ func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGrou // When a Redis (cluster mode disabled) replication group has been successfully // created, you can add one or more read replicas to it, up to a total of 5 // read replicas. You cannot alter a Redis (cluster mode enabled) replication -// group after it has been created. +// group after it has been created. However, if you need to increase or decrease +// the number of node groups (console: shards), you can avail yourself of ElastiCache +// for Redis' enhanced backup and restore. For more information, see Restoring +// From a Backup with Cluster Resizing (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/backups-restoring.html) +// in the ElastiCache User Guide. // // This operation is valid for Redis only. // @@ -910,7 +926,7 @@ func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGrou // * ErrCodeTagQuotaPerResourceExceeded "TagQuotaPerResourceExceeded" // The request cannot be processed because it would cause the resource to have // more than the allowed number of tags. The maximum number of tags permitted -// on a resource is 10. +// on a resource is 50. // // * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" // The request cannot be processed because it would exceed the maximum of 15 @@ -1724,15 +1740,15 @@ func (c *ElastiCache) DescribeCacheClustersRequest(input *DescribeCacheClustersI // identifier is specified, or about a specific cache cluster if a cache cluster // identifier is supplied. // -// By default, abbreviated information about the cache clusters are returned. -// You can use the optional ShowDetails flag to retrieve detailed information +// By default, abbreviated information about the cache clusters is returned. +// You can use the optional ShowCacheNodeInfo flag to retrieve detailed information // about the cache nodes associated with the cache clusters. These details include // the DNS address and port for the cache node endpoint. // -// If the cluster is in the CREATING state, only cluster-level information is +// If the cluster is in the creating state, only cluster-level information is // displayed until all of the nodes are successfully provisioned. // -// If the cluster is in the DELETING state, only cluster-level information is +// If the cluster is in the deleting state, only cluster-level information is // displayed. // // If cache nodes are currently being added to the cache cluster, node endpoint @@ -3543,7 +3559,7 @@ func (c *ElastiCache) ListTagsForResourceRequest(input *ListTagsForResourceInput // optional. You can use cost allocation tags to categorize and track your AWS // costs. // -// You can have a maximum of 10 cost allocation tags on an ElastiCache resource. +// You can have a maximum of 50 cost allocation tags on an ElastiCache resource. // For more information, see Using Cost Allocation Tags in Amazon ElastiCache // (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/BestPractices.html). // @@ -4477,6 +4493,151 @@ func (c *ElastiCache) RevokeCacheSecurityGroupIngressWithContext(ctx aws.Context return out, req.Send() } +const opTestFailover = "TestFailover" + +// TestFailoverRequest generates a "aws/request.Request" representing the +// client's request for the TestFailover operation. The "output" return +// value can be used to capture response data after the request's "Send" method +// is called. +// +// See TestFailover for usage and error information. +// +// Creating a request object using this method should be used when you want to inject +// custom logic into the request's lifecycle using a custom handler, or if you want to +// access properties on the request object before or after sending the request. If +// you just want the service response, call the TestFailover method directly +// instead. +// +// Note: You must call the "Send" method on the returned request object in order +// to execute the request. +// +// // Example sending a request using the TestFailoverRequest method. +// req, resp := client.TestFailoverRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TestFailover +func (c *ElastiCache) TestFailoverRequest(input *TestFailoverInput) (req *request.Request, output *TestFailoverOutput) { + op := &request.Operation{ + Name: opTestFailover, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TestFailoverInput{} + } + + output = &TestFailoverOutput{} + req = c.newRequest(op, input, output) + return +} + +// TestFailover API operation for Amazon ElastiCache. +// +// Represents the input of a TestFailover operation which test automatic failover +// on a specified node group (called shard in the console) in a replication +// group (called cluster in the console). +// +// Note the following +// +// * A customer can use this operation to test automatic failover on up to +// 5 shards (called node groups in the ElastiCache API and AWS CLI) in any +// rolling 24-hour period. +// +// * If calling this operation on shards in different clusters (called replication +// groups in the API and CLI), the calls can be made concurrently. +// +// * If calling this operation multiple times on different shards in the +// same Redis (cluster mode enabled) replication group, the first node replacement +// must complete before a subsequent call can be made. +// +// * To determine whether the node replacement is complete you can check +// Events using the Amazon ElastiCache console, the AWS CLI, or the ElastiCache +// API. Look for the following automatic failover related events, listed +// here in order of occurrance: +// +// Replication group message: Test Failover API called for node group +// +// Cache cluster message: Failover from master node to replica +// node completed +// +// Replication group message: Failover from master node to +// replica node completed +// +// Cache cluster message: Recovering cache nodes +// +// Cache cluster message: Finished recovery for cache nodes +// +// For more information see: +// +// Viewing ElastiCache Events (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/ECEvents.Viewing.html) +// in the ElastiCache User Guide +// +// DescribeEvents (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DescribeEvents.html) +// in the ElastiCache API Reference +// +// Also see, Testing Multi-AZ with Automatic Failover (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoFailover.html#auto-failover-test) +// in the ElastiCache User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation TestFailover for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAPICallRateForCustomerExceededFault "APICallRateForCustomerExceeded" +// The customer has exceeded the allowed rate of API calls. +// +// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" +// The requested cache cluster is not in the available state. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeNodeGroupNotFoundFault "NodeGroupNotFoundFault" +// The node group specified by the NodeGroupId parameter could not be found. +// Please verify that the node group exists and that you spelled the NodeGroupId +// value correctly. +// +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeTestFailoverNotAvailableFault "TestFailoverNotAvailableFault" +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TestFailover +func (c *ElastiCache) TestFailover(input *TestFailoverInput) (*TestFailoverOutput, error) { + req, out := c.TestFailoverRequest(input) + return out, req.Send() +} + +// TestFailoverWithContext is the same as TestFailover with the addition of +// the ability to pass a context and additional request options. +// +// See TestFailover for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) TestFailoverWithContext(ctx aws.Context, input *TestFailoverInput, opts ...request.Option) (*TestFailoverOutput, error) { + req, out := c.TestFailoverRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // Represents the input of an AddTagsToResource operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/AddTagsToResourceMessage type AddTagsToResourceInput struct { @@ -4739,8 +4900,11 @@ type CacheCluster struct { // library. ClientDownloadLandingPage *string `type:"string"` - // Represents the information required for client programs to connect to a cache - // node. + // Represents a Memcached cluster endpoint which, if Automatic Discovery is + // enabled on the cluster, can be used by an application to connect to any node + // in the cluster. The configuration endpoint will always have .cfg in it. + // + // Example: mem-3.9dvc4r.cfg.usw2.cache.amazonaws.com:11211 ConfigurationEndpoint *Endpoint `type:"structure"` // The name of the cache engine (memcached or redis) to be used for this cache @@ -6507,8 +6671,8 @@ type CreateReplicationGroupInput struct { // ReplicaCount. // // If you're creating a Redis (cluster mode disabled) or a Redis (cluster mode - // enabled) replication group, you can use this parameter to configure one node - // group (shard) or you can omit this parameter. + // enabled) replication group, you can use this parameter to individually configure + // each node group (shard), or you can omit this parameter. NodeGroupConfiguration []*NodeGroupConfiguration `locationNameList:"NodeGroupConfiguration" type:"list"` // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service @@ -6522,7 +6686,10 @@ type CreateReplicationGroupInput struct { // This parameter is not used if there is more than one node group (shard). // You should use ReplicasPerNodeGroup instead. // - // If Multi-AZ is enabled, the value of this parameter must be at least 2. + // If AutomaticFailoverEnabled is true, the value of this parameter must be + // at least 2. If AutomaticFailoverEnabled is false you can omit this parameter + // (it will default to 1), or you can explicitly set it to a value between 2 + // and 6. // // The maximum permitted value for NumCacheClusters is 6 (primary plus 5 replicas). NumCacheClusters *int64 `type:"integer"` @@ -6620,9 +6787,11 @@ type CreateReplicationGroupInput struct { // A list of Amazon Resource Names (ARN) that uniquely identify the Redis RDB // snapshot files stored in Amazon S3. The snapshot files are used to populate - // the replication group. The Amazon S3 object name in the ARN cannot contain - // any commas. The list must match the number of node groups (shards) in the - // replication group, which means you cannot repartition. + // the new replication group. The Amazon S3 object name in the ARN cannot contain + // any commas. The new replication group will have the number of node groups + // (console: shards) specified by the parameter NumNodeGroups or the number + // of node groups configured by NodeGroupConfiguration regardless of the number + // of ARNs specified here. // // This parameter is only valid if the Engine parameter is redis. // @@ -7376,6 +7545,11 @@ type DescribeCacheClustersInput struct { // Constraints: minimum 20; maximum 100. MaxRecords *int64 `type:"integer"` + // An optional flag that can be included in the DescribeCacheCluster request + // to show only nodes (API/CLI: clusters) that are not members of a replication + // group. In practice, this mean Memcached and single node Redis clusters. + ShowCacheClustersNotInReplicationGroups *bool `type:"boolean"` + // An optional flag that can be included in the DescribeCacheCluster request // to retrieve information about the individual cache nodes. ShowCacheNodeInfo *bool `type:"boolean"` @@ -7409,6 +7583,12 @@ func (s *DescribeCacheClustersInput) SetMaxRecords(v int64) *DescribeCacheCluste return s } +// SetShowCacheClustersNotInReplicationGroups sets the ShowCacheClustersNotInReplicationGroups field's value. +func (s *DescribeCacheClustersInput) SetShowCacheClustersNotInReplicationGroups(v bool) *DescribeCacheClustersInput { + s.ShowCacheClustersNotInReplicationGroups = &v + return s +} + // SetShowCacheNodeInfo sets the ShowCacheNodeInfo field's value. func (s *DescribeCacheClustersInput) SetShowCacheNodeInfo(v bool) *DescribeCacheClustersInput { s.ShowCacheNodeInfo = &v @@ -8052,11 +8232,13 @@ func (s *DescribeEngineDefaultParametersOutput) SetEngineDefaults(v *EngineDefau type DescribeEventsInput struct { _ struct{} `type:"structure"` - // The number of minutes' worth of events to retrieve. + // The number of minutes worth of events to retrieve. Duration *int64 `type:"integer"` // The end of the time interval for which to retrieve events, specified in ISO // 8601 format. + // + // Example: 2017-03-30T07:03:49.555Z EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` // An optional marker returned from a prior request. Use this marker for pagination @@ -8083,6 +8265,8 @@ type DescribeEventsInput struct { // The beginning of the time interval to retrieve events for, specified in ISO // 8601 format. + // + // Example: 2017-03-30T07:03:49.555Z StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` } @@ -8977,10 +9161,18 @@ func (s *ListAllowedNodeTypeModificationsInput) SetReplicationGroupId(v string) return s } +// Represents the allowed node types you can use to modify your cache cluster +// or replication group. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/AllowedNodeTypeModificationsMessage type ListAllowedNodeTypeModificationsOutput struct { _ struct{} `type:"structure"` + // A string list, each element of which specifies a cache node type which you + // can use to scale your cache cluster or replication group. + // + // When scaling up a Redis cluster or replication group using ModifyCacheCluster + // or ModifyReplicationGroup, use a value from this list for the CacheNodeType + // parameter. ScaleUpModifications []*string `type:"list"` } @@ -9649,6 +9841,9 @@ type ModifyReplicationGroupInput struct { // and create it anew with the earlier engine version. EngineVersion *string `type:"string"` + // The name of the Node Group (called shard in the console). + NodeGroupId *string `type:"string"` + // The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications // are sent. // @@ -9794,6 +9989,12 @@ func (s *ModifyReplicationGroupInput) SetEngineVersion(v string) *ModifyReplicat return s } +// SetNodeGroupId sets the NodeGroupId field's value. +func (s *ModifyReplicationGroupInput) SetNodeGroupId(v string) *ModifyReplicationGroupInput { + s.NodeGroupId = &v + return s +} + // SetNotificationTopicArn sets the NotificationTopicArn field's value. func (s *ModifyReplicationGroupInput) SetNotificationTopicArn(v string) *ModifyReplicationGroupInput { s.NotificationTopicArn = &v @@ -9964,8 +10165,8 @@ type NodeGroupConfiguration struct { // The number of read replica nodes in this node group (shard). ReplicaCount *int64 `type:"integer"` - // A string that specifies the keyspaces as a series of comma separated values. - // Keyspaces are 0 to 16,383. The string is in the format startkey-endkey. + // A string that specifies the keyspace for a particular node group. Keyspaces + // range from 0 to 16,383. The string is in the format startkey-endkey. // // Example: "0-3999" Slots *string `type:"string"` @@ -10661,6 +10862,17 @@ type ReplicationGroup struct { // Redis (cluster mode enabled): T1 node types. AutomaticFailover *string `type:"string" enum:"AutomaticFailoverStatus"` + // The name of the compute and memory capacity node type for each node in the + // replication group. + CacheNodeType *string `type:"string"` + + // A flag indicating whether or not this replication group is cluster enabled; + // i.e., whether its data can be partitioned across multiple shards (API/CLI: + // node groups). + // + // Valid values: true | false + ClusterEnabled *bool `type:"boolean"` + // The configuration endpoint for this replicaiton group. Use the configuration // endpoint to connect to this replication group. ConfigurationEndpoint *Endpoint `type:"structure"` @@ -10727,6 +10939,18 @@ func (s *ReplicationGroup) SetAutomaticFailover(v string) *ReplicationGroup { return s } +// SetCacheNodeType sets the CacheNodeType field's value. +func (s *ReplicationGroup) SetCacheNodeType(v string) *ReplicationGroup { + s.CacheNodeType = &v + return s +} + +// SetClusterEnabled sets the ClusterEnabled field's value. +func (s *ReplicationGroup) SetClusterEnabled(v bool) *ReplicationGroup { + s.ClusterEnabled = &v + return s +} + // SetConfigurationEndpoint sets the ConfigurationEndpoint field's value. func (s *ReplicationGroup) SetConfigurationEndpoint(v *Endpoint) *ReplicationGroup { s.ConfigurationEndpoint = v @@ -11681,10 +11905,10 @@ func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { type Tag struct { _ struct{} `type:"structure"` - // The key for the tag. + // The key for the tag. May not be null. Key *string `type:"string"` - // The tag's value. May not be null. + // The tag's value. May be null. Value *string `type:"string"` } @@ -11710,7 +11934,7 @@ func (s *Tag) SetValue(v string) *Tag { return s } -// Represents the output from the AddTagsToResource, ListTagsOnResource, and +// Represents the output from the AddTagsToResource, ListTagsForResource, and // RemoveTagsFromResource operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TagListMessage type TagListMessage struct { @@ -11736,6 +11960,86 @@ func (s *TagListMessage) SetTagList(v []*Tag) *TagListMessage { return s } +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TestFailoverMessage +type TestFailoverInput struct { + _ struct{} `type:"structure"` + + // The name of the node group (called shard in the console) in this replication + // group on which automatic failover is to be tested. You may test automatic + // failover on up to 5 node groups in any rolling 24-hour period. + // + // NodeGroupId is a required field + NodeGroupId *string `type:"string" required:"true"` + + // The name of the replication group (console: cluster) whose automatic failover + // is being tested by this operation. + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s TestFailoverInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestFailoverInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TestFailoverInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TestFailoverInput"} + if s.NodeGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("NodeGroupId")) + } + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNodeGroupId sets the NodeGroupId field's value. +func (s *TestFailoverInput) SetNodeGroupId(v string) *TestFailoverInput { + s.NodeGroupId = &v + return s +} + +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *TestFailoverInput) SetReplicationGroupId(v string) *TestFailoverInput { + s.ReplicationGroupId = &v + return s +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TestFailoverResult +type TestFailoverOutput struct { + _ struct{} `type:"structure"` + + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s TestFailoverOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestFailoverOutput) GoString() string { + return s.String() +} + +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *TestFailoverOutput) SetReplicationGroup(v *ReplicationGroup) *TestFailoverOutput { + s.ReplicationGroup = v + return s +} + const ( // AZModeSingleAz is a AZMode enum value AZModeSingleAz = "single-az" diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go index 9ad0e8ad2..668d6c52b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go @@ -4,6 +4,12 @@ package elasticache const ( + // ErrCodeAPICallRateForCustomerExceededFault for service response error code + // "APICallRateForCustomerExceeded". + // + // The customer has exceeded the allowed rate of API calls. + ErrCodeAPICallRateForCustomerExceededFault = "APICallRateForCustomerExceeded" + // ErrCodeAuthorizationAlreadyExistsFault for service response error code // "AuthorizationAlreadyExists". // @@ -180,6 +186,14 @@ const ( // The VPC network is in an invalid state. ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" + // ErrCodeNodeGroupNotFoundFault for service response error code + // "NodeGroupNotFoundFault". + // + // The node group specified by the NodeGroupId parameter could not be found. + // Please verify that the node group exists and that you spelled the NodeGroupId + // value correctly. + ErrCodeNodeGroupNotFoundFault = "NodeGroupNotFoundFault" + // ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault for service response error code // "NodeGroupsPerReplicationGroupQuotaExceeded". // @@ -288,6 +302,10 @@ const ( // // The request cannot be processed because it would cause the resource to have // more than the allowed number of tags. The maximum number of tags permitted - // on a resource is 10. + // on a resource is 50. ErrCodeTagQuotaPerResourceExceeded = "TagQuotaPerResourceExceeded" + + // ErrCodeTestFailoverNotAvailableFault for service response error code + // "TestFailoverNotAvailableFault". + ErrCodeTestFailoverNotAvailableFault = "TestFailoverNotAvailableFault" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go index 33c5f08eb..5a83828b2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go @@ -303,7 +303,7 @@ func (c *ELBV2) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req * // // Returned Error Codes: // * ErrCodeDuplicateLoadBalancerNameException "DuplicateLoadBalancerName" -// A load balancer with the specified name already exists for this account. +// A load balancer with the specified name already exists. // // * ErrCodeTooManyLoadBalancersException "TooManyLoadBalancers" // You've reached the limit on the number of load balancers for your AWS account. @@ -1477,7 +1477,8 @@ func (c *ELBV2) DescribeSSLPoliciesRequest(input *DescribeSSLPoliciesInput) (req // // Describes the specified policies or all policies used for SSL negotiation. // -// Note that the only supported policy at this time is ELBSecurityPolicy-2015-05. +// For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) +// in the Application Load Balancers Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1557,7 +1558,8 @@ func (c *ELBV2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Requ // DescribeTags API operation for Elastic Load Balancing. // -// Describes the tags for the specified resources. +// Describes the tags for the specified resources. You can describe the tags +// for one or more Application Load Balancers and target groups. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1964,7 +1966,7 @@ func (c *ELBV2) ModifyListenerRequest(input *ModifyListenerInput) (req *request. // Any properties that you do not specify retain their current values. However, // changing the protocol from HTTPS to HTTP removes the security policy and // SSL certificate properties. If you change the protocol from HTTP to HTTPS, -// you must add the security policy. +// you must add the security policy and server certificate. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3304,7 +3306,7 @@ type CreateLoadBalancerInput struct { // The name of the load balancer. // - // This name must be unique within your AWS account, can have a maximum of 32 + // This name must be unique per region per account, can have a maximum of 32 // characters, must contain only alphanumeric characters or hyphens, and must // not begin or end with a hyphen. // @@ -3446,10 +3448,25 @@ type CreateRuleInput struct { // Actions is a required field Actions []*Action `type:"list" required:"true"` - // A condition. Each condition has the field path-pattern and specifies one - // path pattern. A path pattern is case sensitive, can be up to 128 characters - // in length, and can contain any of the following characters. Note that you - // can include up to three wildcard characters in a path pattern. + // A condition. Each condition specifies a field name and a single value. + // + // If the field name is host-header, you can specify a single host name (for + // example, my.example.com). A host name is case insensitive, can be up to 128 + // characters in length, and can contain any of the following characters. Note + // that you can include up to three wildcard characters. + // + // * A-Z, a-z, 0-9 + // + // * - . + // + // * * (matches 0 or more characters) + // + // * ? (matches exactly 1 character) + // + // If the field name is path-pattern, you can specify a single path pattern. + // A path pattern is case sensitive, can be up to 128 characters in length, + // and can contain any of the following characters. Note that you can include + // up to three wildcard characters. // // * A-Z, a-z, 0-9 // @@ -3604,6 +3621,10 @@ type CreateTargetGroupInput struct { // The name of the target group. // + // This name must be unique per region per account, can have a maximum of 32 + // characters, must contain only alphanumeric characters or hyphens, and must + // not begin or end with a hyphen. + // // Name is a required field Name *string `type:"string" required:"true"` @@ -4240,7 +4261,8 @@ func (s *DescribeLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAt type DescribeLoadBalancersInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Names (ARN) of the load balancers. + // The Amazon Resource Names (ARN) of the load balancers. You can specify up + // to 20 load balancers in a single call. LoadBalancerArns []*string `type:"list"` // The marker for the next set of results. (You received this marker from a @@ -5106,8 +5128,9 @@ func (s *LoadBalancerState) SetReason(v string) *LoadBalancerState { type Matcher struct { _ struct{} `type:"structure"` - // The HTTP codes. The default value is 200. You can specify multiple values - // (for example, "200,202") or a range of values (for example, "200-299"). + // The HTTP codes. You can specify values between 200 and 499. The default value + // is 200. You can specify multiple values (for example, "200,202") or a range + // of values (for example, "200-299"). // // HttpCode is a required field HttpCode *string `type:"string" required:"true"` @@ -5163,7 +5186,9 @@ type ModifyListenerInput struct { // The protocol for connections from clients to the load balancer. Protocol *string `type:"string" enum:"ProtocolEnum"` - // The security policy that defines which ciphers and protocols are supported. + // The security policy that defines which protocols and ciphers are supported. + // For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) + // in the Application Load Balancers Guide. SslPolicy *string `type:"string"` } @@ -5881,14 +5906,28 @@ func (s *Rule) SetRuleArn(v string) *Rule { type RuleCondition struct { _ struct{} `type:"structure"` - // The only possible value is path-pattern. + // The name of the field. The possible values are host-header and path-pattern. Field *string `type:"string"` - // The path pattern. You can specify a single path pattern. + // The condition value. // - // A path pattern is case sensitive, can be up to 128 characters in length, - // and can contain any of the following characters. Note that you can include - // up to three wildcard characters in a path pattern. + // If the field name is host-header, you can specify a single host name (for + // example, my.example.com). A host name is case insensitive, can be up to 128 + // characters in length, and can contain any of the following characters. Note + // that you can include up to three wildcard characters. + // + // * A-Z, a-z, 0-9 + // + // * - . + // + // * * (matches 0 or more characters) + // + // * ? (matches exactly 1 character) + // + // If the field name is path-pattern, you can specify a single path pattern + // (for example, /img/*). A path pattern is case sensitive, can be up to 128 + // characters in length, and can contain any of the following characters. Note + // that you can include up to three wildcard characters. // // * A-Z, a-z, 0-9 // diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go index 3d241e622..da661ba2c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go @@ -19,7 +19,7 @@ const ( // ErrCodeDuplicateLoadBalancerNameException for service response error code // "DuplicateLoadBalancerName". // - // A load balancer with the specified name already exists for this account. + // A load balancer with the specified name already exists. ErrCodeDuplicateLoadBalancerNameException = "DuplicateLoadBalancerName" // ErrCodeDuplicateTagKeysException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/customizations.go new file mode 100644 index 000000000..f618f0da6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/customizations.go @@ -0,0 +1,22 @@ +package kinesis + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws/request" +) + +var readDuration = 5 * time.Second + +func init() { + ops := []string{ + opGetRecords, + } + initRequest = func(r *request.Request) { + for _, operation := range ops { + if r.Operation.Name == operation { + r.ApplyOptions(request.WithResponseReadTimeout(readDuration)) + } + } + } +} diff --git a/vendor/vendor.json b/vendor/vendor.json index cfbc3656c..0136635a0 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -494,628 +494,628 @@ "revisionTime": "2017-01-23T00:46:44Z" }, { - "checksumSHA1": "YSO8t4sb+6eeyWkhGWZmhdrcT5w=", + "checksumSHA1": "wvNp7Z0aIf9CCLYtzXpcO90YWbg=", "path": "github.com/aws/aws-sdk-go", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { - "checksumSHA1": "7N25Nj1APtvRF3NElp7gNrHYJkE=", + "checksumSHA1": "FQz+RL20lsUYIpT2CNpYeyKn8Lg=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "iThCyNRL/oQFD9CF2SYgBGl+aww=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "0Gfk83qXYimO87ZoK1lL9+ifWHo=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "P7gt3PNk6bDOoTZ2N9QOonkaGWw=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "6cj/zsRmcxkE1TLS+v910GbQYg0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "l2O7P/kvovK2zxKhuFehFNXLk+Q=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "/EXbk/z2TWjWc1Hvb4QYs3Wmhb8=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "+yCOae0vRONrO27QiITkGWblOKk=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { - "checksumSHA1": "f5/e+cN80DRK0I2gqbZ0ikSJqhM=", + "checksumSHA1": "/L6UweKsmfyHTu01qrFD1ijzSbE=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "5pzA5afgeU1alfACFh8z2CDUMao=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "SvIsunO8D9MEKbetMENA4WRnyeE=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "wk7EyvDaHwb5qqoOP/4d3cV0708=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "1QmQ3FqV37w0Zi44qv8pA1GeR0A=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "O6hcK24yI6w7FA+g4Pbr+eQ7pys=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "ZqY5RWavBLWTo6j9xqdyBEaNFRk=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "Drt1JfLMa0DQEZLWrnMlTWaIcC8=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "VCTh+dEaqqhog5ncy/WTt9+/gFM=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "lZ1z4xAbT8euCzKoAsnEYic60VE=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "ZmojxECvjM6BeI752BPyZAmOhlo=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "H3h5AMX7c9oT50oovfJIfmkvoBg=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "3ykAVetHFs9T3YivIPvRyiNFdys=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "/d8U22aF2+qYhWYscPzClHTDCP4=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "n6v4S6jPpkHsS59Oj1EZPQIdRNg=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "QLEaEFA3V4n+ohwENEoWV+AXBj4=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "Vh3PtQEwIUabpoE7PsCZItUZuVc=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "aGx2atOHEXSowjXUQ3UoJ/t2LSI=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "Ez3+aU0QGRe4isLDFQuHNRyF3zA=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "+AjVMO3KUY7Wkh0vHRnJqRG8kGc=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "uTt6pA8eB+udA7tC8ElLbr2eeK4=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "sqppuUIMPMBOnTRVR4BhHAoaTrY=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "u6cK2krOuDqi8gy5V316FvH34t0=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "fK7MOfX/cV2DJ176+umySuuYh2s=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "gSm1lj0J4klQMw7jHE0fU/RV+4Y=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "SP6m/hn+Hj72wkgaAZ8NM/7s/18=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "2Su2xzCbUPbCdVkyWuXcmxAI2Rs=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "Y4Wg7dxPIU3W1dqN3vnpSLA1ChQ=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "2PIG7uhrvvDAjiNZINBVCgW/Uds=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "ClGPl4TLpf457zUeOEWyTvqBRjc=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "c6KWQtc1bRCFs/IuIe/jgZXalBw=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "4mBZS9FSCW73hcjj0CikPqpikag=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { - "checksumSHA1": "i1XF+NR9mzU/ftbzd2zoxl07x1A=", + "checksumSHA1": "P7GrpZV3eYQASV8Z+DeFuo9zbm4=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "DXs9Zpa2Db2adBjDi/EyFp6913E=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "dv1QkeLjDyUlMQkbnLjm6l0mJHo=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "ir6xGAYAwIdWKgk7BVHNQWvlA/g=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "sdFllfq+lllwyk0yMFmWzg+qs9Y=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { - "checksumSHA1": "ky/x/8q7MyKV495TI9wkMKXZFp0=", + "checksumSHA1": "oJQzYnuAHAhKAtAuinSPEeDsXoU=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "tLfj5mQiTOOhWdeU6hL5PYRAEP0=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "Yy7CkVZR1/vrcdMPWJmQMC2i5hk=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "tuoOAm2gCN2txnIq1jKbCHqeQQM=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "NoG5QpuGo3iLNk6DwwWsDCogfGY=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "5ElupFtEcDvKa1yXTh6nR9HijMU=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { - "checksumSHA1": "g36tdw9s90aUjSoUmpcLViHKQdI=", + "checksumSHA1": "Yzxk0tkTh2D9JP5I8gspLQLKu0U=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "zeEh/FDxM81fU3X2ftWU2Z++iQg=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "bHA5BLaVmAq8G5R40tv/X3HF5J0=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "GFXjkh1wWzohbefi1k0N+zbkmU4=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "AB2pSc+tsnoNxFg0fSMDn7rFZbM=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "5Br7nJBgOm6y67Z95CGZtOaxlFY=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "COvVop5UbeJ4P0cMu+0ekubPLtE=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "e/lUvi2TAO9hms6HOzpX61exefw=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "o7qpn0kxj43Ej/RwfCb9JbzfbfQ=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "/2UKYWNc/LRv+M/LQRpJqukcXzc=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "eUrUJOZg3sQHWyYKPRPO9OeN+a4=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "CVWvzoJ3YBvEI8TdQWlqUxOt9lk=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "bJ8g3OhBAkxM+QaFrQCD0L0eWY8=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "jzKBnso2Psx3CyS+0VR1BzvuccU=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "GPD+dDmDtseJFG8lB8aU58aszDg=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "SdsHiTUR9eRarThv/i7y6/rVyF4=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "w3+CyiPRk1WUFFmueIRZkgQuHH0=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "3a4119172097bf8725eb7c1b96b7957cfe2d92dc", - "revisionTime": "2017-04-04T17:58:04Z", - "version": "v1.8.8", - "versionExact": "v1.8.8" + "revision": "d643bdf04f2cc6f95424f9f4e69037a563fc0736", + "revisionTime": "2017-04-06T18:01:00Z", + "version": "v1.8.10", + "versionExact": "v1.8.10" }, { "checksumSHA1": "nqw2Qn5xUklssHTubS5HDvEL9L4=", From 488711afef59b76d5070b47e3c46d6df89f83887 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Sat, 8 Apr 2017 01:09:51 +1000 Subject: [PATCH 19/72] Add `name_prefix` to `aws_alb_target_group` (#13442) Adds the `name_prefix` parameter to the `aws_alb_target_group` resource. --- .../aws/resource_aws_alb_target_group.go | 32 +++++---- .../aws/resource_aws_alb_target_group_test.go | 65 +++++++++++++++++++ builtin/providers/aws/validators.go | 16 +++++ .../aws/r/alb_target_group.html.markdown | 3 +- 4 files changed, 104 insertions(+), 12 deletions(-) diff --git a/builtin/providers/aws/resource_aws_alb_target_group.go b/builtin/providers/aws/resource_aws_alb_target_group.go index 9412198d4..cd4256839 100644 --- a/builtin/providers/aws/resource_aws_alb_target_group.go +++ b/builtin/providers/aws/resource_aws_alb_target_group.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -37,10 +38,18 @@ func resourceAwsAlbTargetGroup() *schema.Resource { }, "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateAwsAlbTargetGroupName, + }, + "name_prefix": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, - ValidateFunc: validateAwsAlbTargetGroupName, + ValidateFunc: validateAwsAlbTargetGroupNamePrefix, }, "port": { @@ -172,8 +181,17 @@ func resourceAwsAlbTargetGroup() *schema.Resource { func resourceAwsAlbTargetGroupCreate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn + var groupName string + if v, ok := d.GetOk("name"); ok { + groupName = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + groupName = resource.PrefixedUniqueId(v.(string)) + } else { + groupName = resource.PrefixedUniqueId("tf-") + } + params := &elbv2.CreateTargetGroupInput{ - Name: aws.String(d.Get("name").(string)), + Name: aws.String(groupName), Port: aws.Int64(int64(d.Get("port").(int))), Protocol: aws.String(d.Get("protocol").(string)), VpcId: aws.String(d.Get("vpc_id").(string)), @@ -463,14 +481,6 @@ func validateAwsAlbTargetGroupHealthCheckProtocol(v interface{}, k string) (ws [ return } -func validateAwsAlbTargetGroupName(v interface{}, k string) (ws []string, errors []error) { - name := v.(string) - if len(name) > 32 { - errors = append(errors, fmt.Errorf("%q (%q) cannot be longer than '32' characters", k, name)) - } - return -} - func validateAwsAlbTargetGroupPort(v interface{}, k string) (ws []string, errors []error) { port := v.(int) if port < 1 || port > 65536 { diff --git a/builtin/providers/aws/resource_aws_alb_target_group_test.go b/builtin/providers/aws/resource_aws_alb_target_group_test.go index 7a67978a8..2045ffeb7 100644 --- a/builtin/providers/aws/resource_aws_alb_target_group_test.go +++ b/builtin/providers/aws/resource_aws_alb_target_group_test.go @@ -3,6 +3,7 @@ package aws import ( "errors" "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -85,6 +86,45 @@ func TestAccAWSALBTargetGroup_basic(t *testing.T) { }) } +func TestAccAWSALBTargetGroup_namePrefix(t *testing.T) { + var conf elbv2.TargetGroup + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_alb_target_group.test", + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSALBTargetGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSALBTargetGroupConfig_namePrefix, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSALBTargetGroupExists("aws_alb_target_group.test", &conf), + resource.TestMatchResourceAttr("aws_alb_target_group.test", "name", regexp.MustCompile("^tf-")), + ), + }, + }, + }) +} + +func TestAccAWSALBTargetGroup_generatedName(t *testing.T) { + var conf elbv2.TargetGroup + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_alb_target_group.test", + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSALBTargetGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSALBTargetGroupConfig_generatedName, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSALBTargetGroupExists("aws_alb_target_group.test", &conf), + ), + }, + }, + }) +} + func TestAccAWSALBTargetGroup_changeNameForceNew(t *testing.T) { var before, after elbv2.TargetGroup targetGroupNameBefore := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) @@ -715,3 +755,28 @@ resource "aws_vpc" "test" { } }`, targetGroupName, stickinessBlock) } + +const testAccAWSALBTargetGroupConfig_namePrefix = ` +resource "aws_alb_target_group" "test" { + name_prefix = "tf-" + port = 80 + protocol = "HTTP" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" +} +` + +const testAccAWSALBTargetGroupConfig_generatedName = ` +resource "aws_alb_target_group" "test" { + port = 80 + protocol = "HTTP" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" +} +` diff --git a/builtin/providers/aws/validators.go b/builtin/providers/aws/validators.go index 7ff0e6f38..b2f934646 100644 --- a/builtin/providers/aws/validators.go +++ b/builtin/providers/aws/validators.go @@ -1154,3 +1154,19 @@ func validateDbOptionGroupNamePrefix(v interface{}, k string) (ws []string, erro } return } + +func validateAwsAlbTargetGroupName(v interface{}, k string) (ws []string, errors []error) { + name := v.(string) + if len(name) > 32 { + errors = append(errors, fmt.Errorf("%q (%q) cannot be longer than '32' characters", k, name)) + } + return +} + +func validateAwsAlbTargetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { + name := v.(string) + if len(name) > 32 { + errors = append(errors, fmt.Errorf("%q (%q) cannot be longer than '6' characters", k, name)) + } + return +} diff --git a/website/source/docs/providers/aws/r/alb_target_group.html.markdown b/website/source/docs/providers/aws/r/alb_target_group.html.markdown index 02f06051d..afaa460ba 100644 --- a/website/source/docs/providers/aws/r/alb_target_group.html.markdown +++ b/website/source/docs/providers/aws/r/alb_target_group.html.markdown @@ -31,7 +31,8 @@ resource "aws_vpc" "main" { The following arguments are supported: -* `name` - (Required) The name of the target group. +* `name` - (Optional, Forces new resource) The name of the target group. If omitted, Terraform will assign a random, unique name. +* `name_prefix` - (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts with `name`. * `port` - (Required) The port on which targets receive traffic, unless overridden when registering a specific target. * `protocol` - (Required) The protocol to use for routing traffic to the targets. * `vpc_id` - (Required) The identifier of the VPC in which to create the target group. From 15346fdfcc0a69fe3e4a8c497c11feced24fe933 Mon Sep 17 00:00:00 2001 From: Paul Stack Date: Fri, 7 Apr 2017 18:10:55 +0300 Subject: [PATCH 20/72] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26b1f7924..f38e63588 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,8 @@ IMPROVEMENTS: * provider/aws: Add support for treat_missing_data to cloudwatch_metric_alarm [GH-13358] * provider/aws: Add support for evaluate_low_sample_count_percentiles to cloudwatch_metric_alarm [GH-13371] * provider/aws: Fix `aws_s3_bucket` drift detection of logging options [GH-13281] - * providers/aws: Update ElasticTranscoderPreset to have default for MaxFrameRate [GH-13422] + * provider/aws: Update ElasticTranscoderPreset to have default for MaxFrameRate [GH-13422] + * provider/aws: Add `name_prefix` to `aws_alb_target_group` [GH-13442] * provider/bitbucket: Improved error handling [GH-13390] * provider/cloudstack: Do not force a new resource when updating `cloudstack_loadbalancer_rule` members [GH-11786] * provider/github: Handle the case when issue labels already exist [GH-13182] From c44afc41791a5a7549dfc9834973d106964d785f Mon Sep 17 00:00:00 2001 From: Gauthier Wallet Date: Fri, 7 Apr 2017 17:13:00 +0200 Subject: [PATCH 21/72] provider/aws: Fix DynamoDB issues about GSIs indexes (#13256) * provider/aws: Fixed DynamoDB GSI update when using multiple indexes * provider/aws: Fixed DynamoDB GSI set hash function * Added DynamoDB table state migration --- .../aws/resource_aws_dynamodb_table.go | 19 +- .../resource_aws_dynamodb_table_migrate.go | 70 +++ .../aws/resource_aws_dynamodb_table_test.go | 504 +++++++++++++----- 3 files changed, 434 insertions(+), 159 deletions(-) create mode 100644 builtin/providers/aws/resource_aws_dynamodb_table_migrate.go diff --git a/builtin/providers/aws/resource_aws_dynamodb_table.go b/builtin/providers/aws/resource_aws_dynamodb_table.go index e0c63760d..fff6775c1 100644 --- a/builtin/providers/aws/resource_aws_dynamodb_table.go +++ b/builtin/providers/aws/resource_aws_dynamodb_table.go @@ -39,6 +39,9 @@ func resourceAwsDynamoDbTable() *schema.Resource { State: schema.ImportStatePassthrough, }, + SchemaVersion: 1, + MigrateState: resourceAwsDynamoDbTableMigrateState, + Schema: map[string]*schema.Schema{ "arn": { Type: schema.TypeString, @@ -157,15 +160,6 @@ func resourceAwsDynamoDbTable() *schema.Resource { }, }, }, - // GSI names are the uniqueness constraint - Set: func(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) - buf.WriteString(fmt.Sprintf("%d-", m["write_capacity"].(int))) - buf.WriteString(fmt.Sprintf("%d-", m["read_capacity"].(int))) - return hashcode.String(buf.String()) - }, }, "stream_enabled": { Type: schema.TypeBool, @@ -533,9 +527,8 @@ func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) er table := tableDescription.Table - updates := []*dynamodb.GlobalSecondaryIndexUpdate{} - for _, updatedgsidata := range gsiSet.List() { + updates := []*dynamodb.GlobalSecondaryIndexUpdate{} gsidata := updatedgsidata.(map[string]interface{}) gsiName := gsidata["name"].(string) gsiWriteCapacity := gsidata["write_capacity"].(int) @@ -584,6 +577,10 @@ func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) er log.Printf("[DEBUG] Error updating table: %s", err) return err } + + if err := waitForGSIToBeActive(d.Id(), gsiName, meta); err != nil { + return errwrap.Wrapf("Error waiting for Dynamo DB GSI to be active: {{err}}", err) + } } } } diff --git a/builtin/providers/aws/resource_aws_dynamodb_table_migrate.go b/builtin/providers/aws/resource_aws_dynamodb_table_migrate.go new file mode 100644 index 000000000..59865effc --- /dev/null +++ b/builtin/providers/aws/resource_aws_dynamodb_table_migrate.go @@ -0,0 +1,70 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/terraform" + "strings" +) + +func resourceAwsDynamoDbTableMigrateState( + v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { + switch v { + case 0: + log.Println("[INFO] Found AWS DynamoDB Table State v0; migrating to v1") + return migrateDynamoDBStateV0toV1(is) + default: + return is, fmt.Errorf("Unexpected schema version: %d", v) + } +} + +func migrateDynamoDBStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { + if is.Empty() { + log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") + return is, nil + } + + log.Printf("[DEBUG] DynamoDB Table Attributes before Migration: %#v", is.Attributes) + + prefix := "global_secondary_index" + entity := resourceAwsDynamoDbTable() + + // Read old keys + reader := &schema.MapFieldReader{ + Schema: entity.Schema, + Map: schema.BasicMapReader(is.Attributes), + } + result, err := reader.ReadField([]string{prefix}) + if err != nil { + return nil, err + } + + oldKeys, ok := result.Value.(*schema.Set) + if !ok { + return nil, fmt.Errorf("Got unexpected value from state: %#v", result.Value) + } + + // Delete old keys + for k := range is.Attributes { + if strings.HasPrefix(k, fmt.Sprintf("%s.", prefix)) { + delete(is.Attributes, k) + } + } + + // Write new keys + writer := schema.MapFieldWriter{ + Schema: entity.Schema, + } + if err := writer.WriteField([]string{prefix}, oldKeys); err != nil { + return is, err + } + for k, v := range writer.Map() { + is.Attributes[k] = v + } + + log.Printf("[DEBUG] DynamoDB Table Attributes after State Migration: %#v", is.Attributes) + + return is, nil +} diff --git a/builtin/providers/aws/resource_aws_dynamodb_table_test.go b/builtin/providers/aws/resource_aws_dynamodb_table_test.go index 4d5437f17..fba65851c 100644 --- a/builtin/providers/aws/resource_aws_dynamodb_table_test.go +++ b/builtin/providers/aws/resource_aws_dynamodb_table_test.go @@ -14,6 +14,8 @@ import ( ) func TestAccAWSDynamoDbTable_basic(t *testing.T) { + var conf dynamodb.DescribeTableOutput + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -22,7 +24,8 @@ func TestAccAWSDynamoDbTable_basic(t *testing.T) { { Config: testAccAWSDynamoDbConfigInitialState(), Check: resource.ComposeTestCheckFunc( - testAccCheckInitialAWSDynamoDbTableExists("aws_dynamodb_table.basic-dynamodb-table"), + testAccCheckInitialAWSDynamoDbTableExists("aws_dynamodb_table.basic-dynamodb-table", &conf), + testAccCheckInitialAWSDynamoDbTableConf("aws_dynamodb_table.basic-dynamodb-table"), ), }, { @@ -36,6 +39,8 @@ func TestAccAWSDynamoDbTable_basic(t *testing.T) { } func TestAccAWSDynamoDbTable_streamSpecification(t *testing.T) { + var conf dynamodb.DescribeTableOutput + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -44,7 +49,8 @@ func TestAccAWSDynamoDbTable_streamSpecification(t *testing.T) { { Config: testAccAWSDynamoDbConfigStreamSpecification(), Check: resource.ComposeTestCheckFunc( - testAccCheckInitialAWSDynamoDbTableExists("aws_dynamodb_table.basic-dynamodb-table"), + testAccCheckInitialAWSDynamoDbTableExists("aws_dynamodb_table.basic-dynamodb-table", &conf), + testAccCheckInitialAWSDynamoDbTableConf("aws_dynamodb_table.basic-dynamodb-table"), resource.TestCheckResourceAttr( "aws_dynamodb_table.basic-dynamodb-table", "stream_enabled", "true"), resource.TestCheckResourceAttr( @@ -56,6 +62,8 @@ func TestAccAWSDynamoDbTable_streamSpecification(t *testing.T) { } func TestAccAWSDynamoDbTable_tags(t *testing.T) { + var conf dynamodb.DescribeTableOutput + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -64,7 +72,8 @@ func TestAccAWSDynamoDbTable_tags(t *testing.T) { { Config: testAccAWSDynamoDbConfigTags(), Check: resource.ComposeTestCheckFunc( - testAccCheckInitialAWSDynamoDbTableExists("aws_dynamodb_table.basic-dynamodb-table"), + testAccCheckInitialAWSDynamoDbTableExists("aws_dynamodb_table.basic-dynamodb-table", &conf), + testAccCheckInitialAWSDynamoDbTableConf("aws_dynamodb_table.basic-dynamodb-table"), resource.TestCheckResourceAttr( "aws_dynamodb_table.basic-dynamodb-table", "tags.%", "3"), ), @@ -73,6 +82,32 @@ func TestAccAWSDynamoDbTable_tags(t *testing.T) { }) } +// https://github.com/hashicorp/terraform/issues/13243 +func TestAccAWSDynamoDbTable_gsiUpdate(t *testing.T) { + var conf dynamodb.DescribeTableOutput + name := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDynamoDbConfigGsiUpdate(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckInitialAWSDynamoDbTableExists("aws_dynamodb_table.test", &conf), + ), + }, + { + Config: testAccAWSDynamoDbConfigGsiUpdated(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckInitialAWSDynamoDbTableExists("aws_dynamodb_table.test", &conf), + ), + }, + }, + }) +} + func TestResourceAWSDynamoDbTableStreamViewType_validation(t *testing.T) { cases := []struct { Value string @@ -143,7 +178,37 @@ func testAccCheckAWSDynamoDbTableDestroy(s *terraform.State) error { return nil } -func testAccCheckInitialAWSDynamoDbTableExists(n string) resource.TestCheckFunc { +func testAccCheckInitialAWSDynamoDbTableExists(n string, table *dynamodb.DescribeTableOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + log.Printf("[DEBUG] Trying to create initial table state!") + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No DynamoDB table name specified!") + } + + conn := testAccProvider.Meta().(*AWSClient).dynamodbconn + + params := &dynamodb.DescribeTableInput{ + TableName: aws.String(rs.Primary.ID), + } + + resp, err := conn.DescribeTable(params) + + if err != nil { + return fmt.Errorf("[ERROR] Problem describing table '%s': %s", rs.Primary.ID, err) + } + + *table = *resp + + return nil + } +} + +func testAccCheckInitialAWSDynamoDbTableConf(n string) resource.TestCheckFunc { return func(s *terraform.State) error { log.Printf("[DEBUG] Trying to create initial table state!") rs, ok := s.RootModule().Resources[n] @@ -301,123 +366,141 @@ func dynamoDbAttributesToMap(attributes *[]*dynamodb.AttributeDefinition) map[st func testAccAWSDynamoDbConfigInitialState() string { return fmt.Sprintf(` resource "aws_dynamodb_table" "basic-dynamodb-table" { - name = "TerraformTestTable-%d" - read_capacity = 10 - write_capacity = 20 - hash_key = "TestTableHashKey" - range_key = "TestTableRangeKey" - attribute { - name = "TestTableHashKey" - type = "S" - } - attribute { - name = "TestTableRangeKey" - type = "S" - } - attribute { - name = "TestLSIRangeKey" - type = "N" - } - attribute { - name = "TestGSIRangeKey" - type = "S" - } - local_secondary_index { - name = "TestTableLSI" - range_key = "TestLSIRangeKey" - projection_type = "ALL" - } - global_secondary_index { - name = "InitialTestTableGSI" - hash_key = "TestTableHashKey" - range_key = "TestGSIRangeKey" - write_capacity = 10 - read_capacity = 10 - projection_type = "KEYS_ONLY" - } + name = "TerraformTestTable-%d" + read_capacity = 10 + write_capacity = 20 + hash_key = "TestTableHashKey" + range_key = "TestTableRangeKey" + + attribute { + name = "TestTableHashKey" + type = "S" + } + + attribute { + name = "TestTableRangeKey" + type = "S" + } + + attribute { + name = "TestLSIRangeKey" + type = "N" + } + + attribute { + name = "TestGSIRangeKey" + type = "S" + } + + local_secondary_index { + name = "TestTableLSI" + range_key = "TestLSIRangeKey" + projection_type = "ALL" + } + + global_secondary_index { + name = "InitialTestTableGSI" + hash_key = "TestTableHashKey" + range_key = "TestGSIRangeKey" + write_capacity = 10 + read_capacity = 10 + projection_type = "KEYS_ONLY" + } } `, acctest.RandInt()) } const testAccAWSDynamoDbConfigAddSecondaryGSI = ` resource "aws_dynamodb_table" "basic-dynamodb-table" { - name = "TerraformTestTable" - read_capacity = 20 - write_capacity = 20 - hash_key = "TestTableHashKey" - range_key = "TestTableRangeKey" - attribute { - name = "TestTableHashKey" - type = "S" - } - attribute { - name = "TestTableRangeKey" - type = "S" - } - attribute { - name = "TestLSIRangeKey" - type = "N" - } - attribute { - name = "ReplacementGSIRangeKey" - type = "N" - } - local_secondary_index { - name = "TestTableLSI" - range_key = "TestLSIRangeKey" - projection_type = "ALL" - } - global_secondary_index { - name = "ReplacementTestTableGSI" - hash_key = "TestTableHashKey" - range_key = "ReplacementGSIRangeKey" - write_capacity = 5 - read_capacity = 5 - projection_type = "INCLUDE" - non_key_attributes = ["TestNonKeyAttribute"] - } + name = "TerraformTestTable" + read_capacity = 20 + write_capacity = 20 + hash_key = "TestTableHashKey" + range_key = "TestTableRangeKey" + + attribute { + name = "TestTableHashKey" + type = "S" + } + + attribute { + name = "TestTableRangeKey" + type = "S" + } + + attribute { + name = "TestLSIRangeKey" + type = "N" + } + + attribute { + name = "ReplacementGSIRangeKey" + type = "N" + } + + local_secondary_index { + name = "TestTableLSI" + range_key = "TestLSIRangeKey" + projection_type = "ALL" + } + + global_secondary_index { + name = "ReplacementTestTableGSI" + hash_key = "TestTableHashKey" + range_key = "ReplacementGSIRangeKey" + write_capacity = 5 + read_capacity = 5 + projection_type = "INCLUDE" + non_key_attributes = ["TestNonKeyAttribute"] + } } ` func testAccAWSDynamoDbConfigStreamSpecification() string { return fmt.Sprintf(` resource "aws_dynamodb_table" "basic-dynamodb-table" { - name = "TerraformTestStreamTable-%d" - read_capacity = 10 - write_capacity = 20 - hash_key = "TestTableHashKey" - range_key = "TestTableRangeKey" - attribute { - name = "TestTableHashKey" - type = "S" - } - attribute { - name = "TestTableRangeKey" - type = "S" - } - attribute { - name = "TestLSIRangeKey" - type = "N" - } - attribute { - name = "TestGSIRangeKey" - type = "S" - } - local_secondary_index { - name = "TestTableLSI" - range_key = "TestLSIRangeKey" - projection_type = "ALL" - } - global_secondary_index { - name = "InitialTestTableGSI" - hash_key = "TestTableHashKey" - range_key = "TestGSIRangeKey" - write_capacity = 10 - read_capacity = 10 - projection_type = "KEYS_ONLY" - } - stream_enabled = true - stream_view_type = "KEYS_ONLY" + name = "TerraformTestStreamTable-%d" + read_capacity = 10 + write_capacity = 20 + hash_key = "TestTableHashKey" + range_key = "TestTableRangeKey" + + attribute { + name = "TestTableHashKey" + type = "S" + } + + attribute { + name = "TestTableRangeKey" + type = "S" + } + + attribute { + name = "TestLSIRangeKey" + type = "N" + } + + attribute { + name = "TestGSIRangeKey" + type = "S" + } + + local_secondary_index { + name = "TestTableLSI" + range_key = "TestLSIRangeKey" + projection_type = "ALL" + } + + global_secondary_index { + name = "InitialTestTableGSI" + hash_key = "TestTableHashKey" + range_key = "TestGSIRangeKey" + write_capacity = 10 + read_capacity = 10 + projection_type = "KEYS_ONLY" + } + stream_enabled = true + stream_view_type = "KEYS_ONLY" } `, acctest.RandInt()) } @@ -425,45 +508,170 @@ resource "aws_dynamodb_table" "basic-dynamodb-table" { func testAccAWSDynamoDbConfigTags() string { return fmt.Sprintf(` resource "aws_dynamodb_table" "basic-dynamodb-table" { - name = "TerraformTestTable-%d" - read_capacity = 10 - write_capacity = 20 - hash_key = "TestTableHashKey" - range_key = "TestTableRangeKey" - attribute { - name = "TestTableHashKey" - type = "S" - } - attribute { - name = "TestTableRangeKey" - type = "S" - } - attribute { - name = "TestLSIRangeKey" - type = "N" - } - attribute { - name = "TestGSIRangeKey" - type = "S" - } - local_secondary_index { - name = "TestTableLSI" - range_key = "TestLSIRangeKey" - projection_type = "ALL" - } - global_secondary_index { - name = "InitialTestTableGSI" - hash_key = "TestTableHashKey" - range_key = "TestGSIRangeKey" - write_capacity = 10 - read_capacity = 10 - projection_type = "KEYS_ONLY" - } - tags { - Name = "terraform-test-table-%d" - AccTest = "yes" - Testing = "absolutely" - } + name = "TerraformTestTable-%d" + read_capacity = 10 + write_capacity = 20 + hash_key = "TestTableHashKey" + range_key = "TestTableRangeKey" + + attribute { + name = "TestTableHashKey" + type = "S" + } + + attribute { + name = "TestTableRangeKey" + type = "S" + } + + attribute { + name = "TestLSIRangeKey" + type = "N" + } + + attribute { + name = "TestGSIRangeKey" + type = "S" + } + + local_secondary_index { + name = "TestTableLSI" + range_key = "TestLSIRangeKey" + projection_type = "ALL" + } + + global_secondary_index { + name = "InitialTestTableGSI" + hash_key = "TestTableHashKey" + range_key = "TestGSIRangeKey" + write_capacity = 10 + read_capacity = 10 + projection_type = "KEYS_ONLY" + } + + tags { + Name = "terraform-test-table-%d" + AccTest = "yes" + Testing = "absolutely" + } } `, acctest.RandInt(), acctest.RandInt()) } + +func testAccAWSDynamoDbConfigGsiUpdate(name string) string { + return fmt.Sprintf(` +variable "capacity" { + default = 10 +} + +resource "aws_dynamodb_table" "test" { + name = "tf-acc-test-%s" + read_capacity = "${var.capacity}" + write_capacity = "${var.capacity}" + hash_key = "id" + + attribute { + name = "id" + type = "S" + } + + attribute { + name = "att1" + type = "S" + } + + attribute { + name = "att2" + type = "S" + } + + attribute { + name = "att3" + type = "S" + } + + global_secondary_index { + name = "att1-index" + hash_key = "att1" + write_capacity = "${var.capacity}" + read_capacity = "${var.capacity}" + projection_type = "ALL" + } + + global_secondary_index { + name = "att2-index" + hash_key = "att2" + write_capacity = "${var.capacity}" + read_capacity = "${var.capacity}" + projection_type = "ALL" + } + + global_secondary_index { + name = "att3-index" + hash_key = "att3" + write_capacity = "${var.capacity}" + read_capacity = "${var.capacity}" + projection_type = "ALL" + } +} +`, name) +} + +func testAccAWSDynamoDbConfigGsiUpdated(name string) string { + return fmt.Sprintf(` +variable "capacity" { + default = 20 +} + +resource "aws_dynamodb_table" "test" { + name = "tf-acc-test-%s" + read_capacity = "${var.capacity}" + write_capacity = "${var.capacity}" + hash_key = "id" + + attribute { + name = "id" + type = "S" + } + + attribute { + name = "att1" + type = "S" + } + + attribute { + name = "att2" + type = "S" + } + + attribute { + name = "att3" + type = "S" + } + + global_secondary_index { + name = "att1-index" + hash_key = "att1" + write_capacity = "${var.capacity}" + read_capacity = "${var.capacity}" + projection_type = "ALL" + } + + global_secondary_index { + name = "att2-index" + hash_key = "att2" + write_capacity = "${var.capacity}" + read_capacity = "${var.capacity}" + projection_type = "ALL" + } + + global_secondary_index { + name = "att3-index" + hash_key = "att3" + write_capacity = "${var.capacity}" + read_capacity = "${var.capacity}" + projection_type = "ALL" + } +} +`, name) +} From 231c8a72978f98b267b7e2a584b89eb4d7eea1ed Mon Sep 17 00:00:00 2001 From: Clint Date: Fri, 7 Apr 2017 10:13:45 -0500 Subject: [PATCH 22/72] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f38e63588..14adf9f98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,7 @@ BUG FIXES: * provider/aws: Raise timeout for attaching/detaching VPN Gateway [GH-13457] * provider/aws: Recreate opsworks_stack on change of service_role_arn [GH-13325] * provider/aws: Fix KMS Key reading with Exists method [GH-13348] + * provider/aws: Fix DynamoDB issues about GSIs indexes [GH-13256] * provider/azurerm: Network Security Group - ignoring protocol casing at Import time [GH-13153] * provider/azurerm: Fix crash when importing Local Network Gateways [GH-13261] * provider/bitbucket: Fixed issue where provider would fail with an "EOF" error on some operations [GH-13390] From 1289082c28b5fe64bdb086da105c70f9520e1542 Mon Sep 17 00:00:00 2001 From: Clint Date: Fri, 7 Apr 2017 10:14:49 -0500 Subject: [PATCH 23/72] Move 2 AWS improvements to Fixes They're actually fixes --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14adf9f98..4b6528593 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,8 +35,6 @@ IMPROVEMENTS: * provider/aws: Migrate `aws_dms_*` resources away from AWS waiters [GH-13291] * provider/aws: Add support for treat_missing_data to cloudwatch_metric_alarm [GH-13358] * provider/aws: Add support for evaluate_low_sample_count_percentiles to cloudwatch_metric_alarm [GH-13371] - * provider/aws: Fix `aws_s3_bucket` drift detection of logging options [GH-13281] - * provider/aws: Update ElasticTranscoderPreset to have default for MaxFrameRate [GH-13422] * provider/aws: Add `name_prefix` to `aws_alb_target_group` [GH-13442] * provider/bitbucket: Improved error handling [GH-13390] * provider/cloudstack: Do not force a new resource when updating `cloudstack_loadbalancer_rule` members [GH-11786] @@ -74,6 +72,8 @@ BUG FIXES: * provider/aws: Recreate opsworks_stack on change of service_role_arn [GH-13325] * provider/aws: Fix KMS Key reading with Exists method [GH-13348] * provider/aws: Fix DynamoDB issues about GSIs indexes [GH-13256] + * provider/aws: Fix `aws_s3_bucket` drift detection of logging options [GH-13281] + * provider/aws: Update ElasticTranscoderPreset to have default for MaxFrameRate [GH-13422] * provider/azurerm: Network Security Group - ignoring protocol casing at Import time [GH-13153] * provider/azurerm: Fix crash when importing Local Network Gateways [GH-13261] * provider/bitbucket: Fixed issue where provider would fail with an "EOF" error on some operations [GH-13390] From a3ae38d1bbe5bde0f8ea2472b739d6fe29163bb2 Mon Sep 17 00:00:00 2001 From: Clint Date: Fri, 7 Apr 2017 10:54:28 -0500 Subject: [PATCH 24/72] docs: Update AWS Data Source docs to have HCL formatted examples (#13467) * docs: update AWS examples. Disntinguish between alb and alb listener datasource * more hcl highlighting * more hcl * fix missing end quote in docs * docs: finish updates to AWS data source highlights Also updates layout to distinguish some resources --- .../docs/providers/aws/d/acm_certificate.html.markdown | 2 +- website/source/docs/providers/aws/d/alb.html.markdown | 4 ++-- .../docs/providers/aws/d/alb_listener.html.markdown | 2 +- website/source/docs/providers/aws/d/ami.html.markdown | 2 +- .../providers/aws/d/autoscaling_groups.html.markdown | 2 +- .../providers/aws/d/availability_zone.html.markdown | 2 +- .../providers/aws/d/availability_zones.html.markdown | 2 +- .../docs/providers/aws/d/caller_identity.html.markdown | 2 +- .../providers/aws/d/canonical_user_id.html.markdown | 4 ++-- .../providers/aws/d/cloudformation_stack.html.markdown | 2 +- .../docs/providers/aws/d/db_instance.html.markdown | 2 +- .../docs/providers/aws/d/ebs_snapshot.html.markdown | 2 +- .../docs/providers/aws/d/ebs_volume.html.markdown | 2 +- .../docs/providers/aws/d/ecs_cluster.html.markdown | 2 +- .../aws/d/ecs_container_definition.html.markdown | 2 +- .../providers/aws/d/ecs_task_definition.html.markdown | 2 +- .../providers/aws/d/elb_hosted_zone_id.html.markdown | 2 +- .../providers/aws/d/elb_service_account.html.markdown | 2 +- .../providers/aws/d/iam_account_alias.html.markdown | 2 +- .../providers/aws/d/iam_policy_document.html.markdown | 4 ++-- .../source/docs/providers/aws/d/iam_role.html.markdown | 4 ++-- .../aws/d/iam_server_certificate.html.markdown | 2 +- .../source/docs/providers/aws/d/instance.html.markdown | 2 +- .../docs/providers/aws/d/ip_ranges.html.markdown | 2 +- .../docs/providers/aws/d/kms_secret.html.markdown | 2 +- .../docs/providers/aws/d/partition.html.markdown | 2 +- .../docs/providers/aws/d/prefix_list.html.markdown | 2 +- .../aws/d/redshift_service_account.html.markdown | 2 +- .../source/docs/providers/aws/d/region.html.markdown | 2 +- .../docs/providers/aws/d/route53_zone.html.markdown | 2 +- .../docs/providers/aws/d/route_table.html.markdown | 2 +- .../providers/aws/d/s3_bucket_object.html.markdown | 2 +- .../docs/providers/aws/d/security_group.html.markdown | 2 +- .../docs/providers/aws/d/sns_topic.html.markdown | 2 +- .../source/docs/providers/aws/d/subnet.html.markdown | 4 ++-- .../docs/providers/aws/d/subnet_ids.html.markdown | 2 +- website/source/docs/providers/aws/d/vpc.html.markdown | 4 ++-- .../docs/providers/aws/d/vpc_endpoint.html.markdown | 4 ++-- .../providers/aws/d/vpc_endpoint_service.html.markdown | 2 +- .../aws/d/vpc_peering_connection.html.markdown | 2 +- .../docs/providers/aws/d/vpn_gateway.html.markdown | 2 +- website/source/docs/providers/aws/index.html.markdown | 10 +++++----- website/source/layouts/aws.erb | 8 ++++---- 43 files changed, 57 insertions(+), 57 deletions(-) diff --git a/website/source/docs/providers/aws/d/acm_certificate.html.markdown b/website/source/docs/providers/aws/d/acm_certificate.html.markdown index cc4343603..c3dac5ff1 100644 --- a/website/source/docs/providers/aws/d/acm_certificate.html.markdown +++ b/website/source/docs/providers/aws/d/acm_certificate.html.markdown @@ -16,7 +16,7 @@ them by domain without having to hard code the ARNs as input. ## Example Usage -``` +```hcl data "aws_acm_certificate" "example" { domain = "tf.example.com" statuses = ["ISSUED"] diff --git a/website/source/docs/providers/aws/d/alb.html.markdown b/website/source/docs/providers/aws/d/alb.html.markdown index 2e5c086ef..32107f202 100644 --- a/website/source/docs/providers/aws/d/alb.html.markdown +++ b/website/source/docs/providers/aws/d/alb.html.markdown @@ -1,7 +1,7 @@ --- layout: "aws" page_title: "AWS: aws_alb" -sidebar_current: "docs-aws-datasource-alb" +sidebar_current: "docs-aws-datasource-alb-x" description: |- Provides an Application Load Balancer data source. --- @@ -16,7 +16,7 @@ with it, etc. ## Example Usage -``` +```hcl variable "alb_arn" { type = "string" default = "" diff --git a/website/source/docs/providers/aws/d/alb_listener.html.markdown b/website/source/docs/providers/aws/d/alb_listener.html.markdown index 379a495a6..8237a847c 100644 --- a/website/source/docs/providers/aws/d/alb_listener.html.markdown +++ b/website/source/docs/providers/aws/d/alb_listener.html.markdown @@ -16,7 +16,7 @@ information specific to the listener in question. ## Example Usage -``` +```hcl variable "listener_arn" { type = "string" } diff --git a/website/source/docs/providers/aws/d/ami.html.markdown b/website/source/docs/providers/aws/d/ami.html.markdown index b7384c460..a3dae6508 100644 --- a/website/source/docs/providers/aws/d/ami.html.markdown +++ b/website/source/docs/providers/aws/d/ami.html.markdown @@ -13,7 +13,7 @@ resources. ## Example Usage -``` +```hcl data "aws_ami" "nat_ami" { most_recent = true executable_users = ["self"] diff --git a/website/source/docs/providers/aws/d/autoscaling_groups.html.markdown b/website/source/docs/providers/aws/d/autoscaling_groups.html.markdown index f07a605ba..2acbdc2ab 100644 --- a/website/source/docs/providers/aws/d/autoscaling_groups.html.markdown +++ b/website/source/docs/providers/aws/d/autoscaling_groups.html.markdown @@ -13,7 +13,7 @@ ASGs within a specific region. This will allow you to pass a list of AutoScaling ## Example Usage -``` +```hcl data "aws_autoscaling_groups" "groups" {} resource "aws_autoscaling_notification" "slack_notifications" { diff --git a/website/source/docs/providers/aws/d/availability_zone.html.markdown b/website/source/docs/providers/aws/d/availability_zone.html.markdown index 0977e8e1a..00278f089 100644 --- a/website/source/docs/providers/aws/d/availability_zone.html.markdown +++ b/website/source/docs/providers/aws/d/availability_zone.html.markdown @@ -25,7 +25,7 @@ which provides a list of the available zones. The following example shows how this data source might be used to derive VPC and subnet CIDR prefixes systematically for an availability zone. -``` +```hcl variable "region_number" { # Arbitrary mapping of region name to number to use in # a VPC's CIDR prefix. diff --git a/website/source/docs/providers/aws/d/availability_zones.html.markdown b/website/source/docs/providers/aws/d/availability_zones.html.markdown index 99241ad61..648c144e5 100644 --- a/website/source/docs/providers/aws/d/availability_zones.html.markdown +++ b/website/source/docs/providers/aws/d/availability_zones.html.markdown @@ -17,7 +17,7 @@ which provides some details about a specific availability zone. ## Example Usage -``` +```hcl # Declare the data source data "aws_availability_zones" "available" {} diff --git a/website/source/docs/providers/aws/d/caller_identity.html.markdown b/website/source/docs/providers/aws/d/caller_identity.html.markdown index 5609a5b3f..2fa99106d 100644 --- a/website/source/docs/providers/aws/d/caller_identity.html.markdown +++ b/website/source/docs/providers/aws/d/caller_identity.html.markdown @@ -14,7 +14,7 @@ which Terraform is authorized. ## Example Usage -``` +```hcl data "aws_caller_identity" "current" {} output "account_id" { diff --git a/website/source/docs/providers/aws/d/canonical_user_id.html.markdown b/website/source/docs/providers/aws/d/canonical_user_id.html.markdown index 4d48e0987..69fbfbb9a 100644 --- a/website/source/docs/providers/aws/d/canonical_user_id.html.markdown +++ b/website/source/docs/providers/aws/d/canonical_user_id.html.markdown @@ -1,7 +1,7 @@ --- layout: "aws" page_title: "AWS: aws_canonical_user_id" -sidebar_current: "docs-aws-canonical-user-id" +sidebar_current: "docs-aws-datasource-canonical-user-id" description: |- Provides the canonical user ID for the AWS account associated with the provider connection to AWS. @@ -14,7 +14,7 @@ for the effective account in which Terraform is working. ## Example Usage -``` +```hcl data "aws_canonical_user_id" "current" {} output "canonical_user_id" { diff --git a/website/source/docs/providers/aws/d/cloudformation_stack.html.markdown b/website/source/docs/providers/aws/d/cloudformation_stack.html.markdown index 2073abbb0..6fa54d838 100644 --- a/website/source/docs/providers/aws/d/cloudformation_stack.html.markdown +++ b/website/source/docs/providers/aws/d/cloudformation_stack.html.markdown @@ -13,7 +13,7 @@ outputs and other useful data including the template body. ## Example Usage -``` +```hcl data "aws_cloudformation_stack" "network" { name = "my-network-stack" } diff --git a/website/source/docs/providers/aws/d/db_instance.html.markdown b/website/source/docs/providers/aws/d/db_instance.html.markdown index a1dc380ed..01cfec43f 100644 --- a/website/source/docs/providers/aws/d/db_instance.html.markdown +++ b/website/source/docs/providers/aws/d/db_instance.html.markdown @@ -12,7 +12,7 @@ Use this data source to get information about an RDS instance ## Example Usage -``` +```hcl data "aws_db_instance" "database" { db_instance_identifier = "my-test-database" } diff --git a/website/source/docs/providers/aws/d/ebs_snapshot.html.markdown b/website/source/docs/providers/aws/d/ebs_snapshot.html.markdown index f06825162..3afcb4047 100644 --- a/website/source/docs/providers/aws/d/ebs_snapshot.html.markdown +++ b/website/source/docs/providers/aws/d/ebs_snapshot.html.markdown @@ -12,7 +12,7 @@ Use this data source to get information about an EBS Snapshot for use when provi ## Example Usage -``` +```hcl data "aws_ebs_snapshot" "ebs_volume" { most_recent = true owners = ["self"] diff --git a/website/source/docs/providers/aws/d/ebs_volume.html.markdown b/website/source/docs/providers/aws/d/ebs_volume.html.markdown index cb9b18a09..ff1fd203a 100644 --- a/website/source/docs/providers/aws/d/ebs_volume.html.markdown +++ b/website/source/docs/providers/aws/d/ebs_volume.html.markdown @@ -13,7 +13,7 @@ resources. ## Example Usage -``` +```hcl data "aws_ebs_volume" "ebs_volume" { most_recent = true diff --git a/website/source/docs/providers/aws/d/ecs_cluster.html.markdown b/website/source/docs/providers/aws/d/ecs_cluster.html.markdown index 9e25f0937..3f6ff124b 100644 --- a/website/source/docs/providers/aws/d/ecs_cluster.html.markdown +++ b/website/source/docs/providers/aws/d/ecs_cluster.html.markdown @@ -13,7 +13,7 @@ cluster within an AWS ECS service. ## Example Usage -``` +```hcl data "aws_ecs_cluster" "ecs-mongo" { cluster_name = "ecs-mongo-production" } diff --git a/website/source/docs/providers/aws/d/ecs_container_definition.html.markdown b/website/source/docs/providers/aws/d/ecs_container_definition.html.markdown index 2722d87a6..420ed145e 100644 --- a/website/source/docs/providers/aws/d/ecs_container_definition.html.markdown +++ b/website/source/docs/providers/aws/d/ecs_container_definition.html.markdown @@ -13,7 +13,7 @@ a specific container within an AWS ECS service. ## Example Usage -``` +```hcl data "aws_ecs_container_definition" "ecs-mongo" { task_definition = "${aws_ecs_task_definition.mongo.id}" container_name = "mongodb" diff --git a/website/source/docs/providers/aws/d/ecs_task_definition.html.markdown b/website/source/docs/providers/aws/d/ecs_task_definition.html.markdown index 32f465120..4ff2fdb33 100644 --- a/website/source/docs/providers/aws/d/ecs_task_definition.html.markdown +++ b/website/source/docs/providers/aws/d/ecs_task_definition.html.markdown @@ -14,7 +14,7 @@ a specific AWS ECS task definition. ## Example Usage -``` +```hcl # Simply specify the family to find the latest ACTIVE revision in that family. data "aws_ecs_task_definition" "mongo" { task_definition = "${aws_ecs_task_definition.mongo.family}" diff --git a/website/source/docs/providers/aws/d/elb_hosted_zone_id.html.markdown b/website/source/docs/providers/aws/d/elb_hosted_zone_id.html.markdown index 02baaeeb5..ad2db7ca5 100644 --- a/website/source/docs/providers/aws/d/elb_hosted_zone_id.html.markdown +++ b/website/source/docs/providers/aws/d/elb_hosted_zone_id.html.markdown @@ -13,7 +13,7 @@ in a given region for the purpose of using in an AWS Route53 Alias. ## Example Usage -``` +```hcl data "aws_elb_hosted_zone_id" "main" {} resource "aws_route53_record" "www" { diff --git a/website/source/docs/providers/aws/d/elb_service_account.html.markdown b/website/source/docs/providers/aws/d/elb_service_account.html.markdown index e79d507f6..ca0d30304 100644 --- a/website/source/docs/providers/aws/d/elb_service_account.html.markdown +++ b/website/source/docs/providers/aws/d/elb_service_account.html.markdown @@ -13,7 +13,7 @@ in a given region for the purpose of whitelisting in S3 bucket policy. ## Example Usage -``` +```hcl data "aws_elb_service_account" "main" {} resource "aws_s3_bucket" "elb_logs" { diff --git a/website/source/docs/providers/aws/d/iam_account_alias.html.markdown b/website/source/docs/providers/aws/d/iam_account_alias.html.markdown index fdc037351..b664cba0e 100644 --- a/website/source/docs/providers/aws/d/iam_account_alias.html.markdown +++ b/website/source/docs/providers/aws/d/iam_account_alias.html.markdown @@ -14,7 +14,7 @@ for the effective account in which Terraform is working. ## Example Usage -``` +```hcl data "aws_iam_account_alias" "current" {} output "account_id" { diff --git a/website/source/docs/providers/aws/d/iam_policy_document.html.markdown b/website/source/docs/providers/aws/d/iam_policy_document.html.markdown index 6346d60d0..9c8f1b4ad 100644 --- a/website/source/docs/providers/aws/d/iam_policy_document.html.markdown +++ b/website/source/docs/providers/aws/d/iam_policy_document.html.markdown @@ -14,7 +14,7 @@ This is a data source which can be used to construct a JSON representation of an IAM policy document, for use with resources which expect policy documents, such as the `aws_iam_policy` resource. -``` +```hcl data "aws_iam_policy_document" "example" { statement { sid = "1" @@ -149,7 +149,7 @@ The following attribute is exported: Showing how you can use this as an assume role policy as well as showing how you can specify multiple principal blocks with different types. -``` +```hcl data "aws_iam_policy_document" "event_stream_bucket_role_assume_role_policy" { statement { actions = ["sts:AssumeRole"] diff --git a/website/source/docs/providers/aws/d/iam_role.html.markdown b/website/source/docs/providers/aws/d/iam_role.html.markdown index 253c1579c..2f149c4b8 100644 --- a/website/source/docs/providers/aws/d/iam_role.html.markdown +++ b/website/source/docs/providers/aws/d/iam_role.html.markdown @@ -1,6 +1,6 @@ --- layout: "aws" -page_title: "AWS: aws_iam_role +page_title: "AWS: aws_iam_role" sidebar_current: "docs-aws-datasource-iam-role" description: |- Get information on a Amazon IAM role @@ -14,7 +14,7 @@ properties without having to hard code ARNs as input. ## Example Usage -``` +```hcl data "aws_iam_role" "example" { role_name = "an_example_role_name" } diff --git a/website/source/docs/providers/aws/d/iam_server_certificate.html.markdown b/website/source/docs/providers/aws/d/iam_server_certificate.html.markdown index ab690dcf4..404d15457 100644 --- a/website/source/docs/providers/aws/d/iam_server_certificate.html.markdown +++ b/website/source/docs/providers/aws/d/iam_server_certificate.html.markdown @@ -12,7 +12,7 @@ Use this data source to lookup information about IAM Server Certificates. ## Example Usage -``` +```hcl data "aws_iam_server_certificate" "my-domain" { name_prefix = "my-domain.org" latest = true diff --git a/website/source/docs/providers/aws/d/instance.html.markdown b/website/source/docs/providers/aws/d/instance.html.markdown index 5657c87db..65f0a5edc 100644 --- a/website/source/docs/providers/aws/d/instance.html.markdown +++ b/website/source/docs/providers/aws/d/instance.html.markdown @@ -13,7 +13,7 @@ resources. ## Example Usage -``` +```hcl data "aws_instance" "foo" { instance_id = "i-instanceid" diff --git a/website/source/docs/providers/aws/d/ip_ranges.html.markdown b/website/source/docs/providers/aws/d/ip_ranges.html.markdown index f9b2c84a0..7d9d57a7a 100644 --- a/website/source/docs/providers/aws/d/ip_ranges.html.markdown +++ b/website/source/docs/providers/aws/d/ip_ranges.html.markdown @@ -12,7 +12,7 @@ Use this data source to get the [IP ranges][1] of various AWS products and servi ## Example Usage -``` +```hcl data "aws_ip_ranges" "european_ec2" { regions = ["eu-west-1", "eu-central-1"] services = ["ec2"] diff --git a/website/source/docs/providers/aws/d/kms_secret.html.markdown b/website/source/docs/providers/aws/d/kms_secret.html.markdown index 069c2fa45..cd81c7804 100644 --- a/website/source/docs/providers/aws/d/kms_secret.html.markdown +++ b/website/source/docs/providers/aws/d/kms_secret.html.markdown @@ -36,7 +36,7 @@ AQECAHgaPa0J8WadplGCqqVAr4HNvDaFSQ+NaiwIBhmm6qDSFwAAAGIwYAYJKoZIhvcNAQcGoFMwUQIB Now, take that output and add it to your resource definitions. -``` +```hcl data "aws_kms_secret" "db" { secret { name = "master_password" diff --git a/website/source/docs/providers/aws/d/partition.html.markdown b/website/source/docs/providers/aws/d/partition.html.markdown index bfd34bc21..a6efe5b4b 100644 --- a/website/source/docs/providers/aws/d/partition.html.markdown +++ b/website/source/docs/providers/aws/d/partition.html.markdown @@ -12,7 +12,7 @@ Use this data source to lookup current AWS partition in which Terraform is worki ## Example Usage -``` +```hcl data "aws_partition" "current" {} data "aws_iam_policy_document" "s3_policy" { diff --git a/website/source/docs/providers/aws/d/prefix_list.html.markdown b/website/source/docs/providers/aws/d/prefix_list.html.markdown index cd8953dcb..7dcd62129 100644 --- a/website/source/docs/providers/aws/d/prefix_list.html.markdown +++ b/website/source/docs/providers/aws/d/prefix_list.html.markdown @@ -18,7 +18,7 @@ rules. ## Example Usage -``` +```hcl resource "aws_vpc_endpoint" "private_s3" { vpc_id = "${aws_vpc.foo.id}" service_name = "com.amazonaws.us-west-2.s3" diff --git a/website/source/docs/providers/aws/d/redshift_service_account.html.markdown b/website/source/docs/providers/aws/d/redshift_service_account.html.markdown index 4783a76cc..815d676ba 100644 --- a/website/source/docs/providers/aws/d/redshift_service_account.html.markdown +++ b/website/source/docs/providers/aws/d/redshift_service_account.html.markdown @@ -13,7 +13,7 @@ in a given region for the purpose of allowing Redshift to store audit data in S3 ## Example Usage -``` +```hcl data "aws_redshift_service_account" "main" {} resource "aws_s3_bucket" "bucket" { diff --git a/website/source/docs/providers/aws/d/region.html.markdown b/website/source/docs/providers/aws/d/region.html.markdown index 4105639c0..949d727ca 100644 --- a/website/source/docs/providers/aws/d/region.html.markdown +++ b/website/source/docs/providers/aws/d/region.html.markdown @@ -20,7 +20,7 @@ which is inheriting an AWS provider configuration from its parent module. The following example shows how the resource might be used to obtain the name of the AWS region configured on the provider. -``` +```hcl data "aws_region" "current" { current = true } diff --git a/website/source/docs/providers/aws/d/route53_zone.html.markdown b/website/source/docs/providers/aws/d/route53_zone.html.markdown index c388afb56..9d43895f7 100644 --- a/website/source/docs/providers/aws/d/route53_zone.html.markdown +++ b/website/source/docs/providers/aws/d/route53_zone.html.markdown @@ -17,7 +17,7 @@ This data source allows to find a Hosted Zone ID given Hosted Zone name and cert The following example shows how to get a Hosted Zone from it's name and from this data how to create a Record Set. -``` +```hcl data "aws_route53_zone" "selected" { name = "test.com." private_zone = true diff --git a/website/source/docs/providers/aws/d/route_table.html.markdown b/website/source/docs/providers/aws/d/route_table.html.markdown index e8e17e4fe..a8fd57545 100644 --- a/website/source/docs/providers/aws/d/route_table.html.markdown +++ b/website/source/docs/providers/aws/d/route_table.html.markdown @@ -19,7 +19,7 @@ the Route Table. The following example shows how one might accept a Route Table id as a variable and use this data source to obtain the data necessary to create a route. -``` +```hcl variable "subnet_id" {} data "aws_route_table" "selected" { diff --git a/website/source/docs/providers/aws/d/s3_bucket_object.html.markdown b/website/source/docs/providers/aws/d/s3_bucket_object.html.markdown index 42e66946e..0a7217b27 100644 --- a/website/source/docs/providers/aws/d/s3_bucket_object.html.markdown +++ b/website/source/docs/providers/aws/d/s3_bucket_object.html.markdown @@ -15,7 +15,7 @@ _optionally_ (see below) content of an object stored inside S3 bucket. ## Example Usage -``` +```hcl data "aws_s3_bucket_object" "lambda" { bucket = "my-lambda-functions" key = "hello-world.zip" diff --git a/website/source/docs/providers/aws/d/security_group.html.markdown b/website/source/docs/providers/aws/d/security_group.html.markdown index 5e5147efa..988558e6d 100644 --- a/website/source/docs/providers/aws/d/security_group.html.markdown +++ b/website/source/docs/providers/aws/d/security_group.html.markdown @@ -19,7 +19,7 @@ VPC that the security group belongs to. The following example shows how one might accept a Security Group id as a variable and use this data source to obtain the data necessary to create a subnet. -``` +```hcl variable "security_group_id" {} data "aws_security_group" "selected" { diff --git a/website/source/docs/providers/aws/d/sns_topic.html.markdown b/website/source/docs/providers/aws/d/sns_topic.html.markdown index 0e1e6a4c2..edbe0577e 100644 --- a/website/source/docs/providers/aws/d/sns_topic.html.markdown +++ b/website/source/docs/providers/aws/d/sns_topic.html.markdown @@ -14,7 +14,7 @@ without having to hard code the ARNs as input. ## Example Usage -``` +```hcl data "aws_sns_topic" "example" { name = "an_example_topic" } diff --git a/website/source/docs/providers/aws/d/subnet.html.markdown b/website/source/docs/providers/aws/d/subnet.html.markdown index b586522ad..9e9b22aa7 100644 --- a/website/source/docs/providers/aws/d/subnet.html.markdown +++ b/website/source/docs/providers/aws/d/subnet.html.markdown @@ -1,7 +1,7 @@ --- layout: "aws" page_title: "AWS: aws_subnet" -sidebar_current: "docs-aws-datasource-subnet" +sidebar_current: "docs-aws-datasource-subnet-x" description: |- Provides details about a specific VPC subnet --- @@ -20,7 +20,7 @@ The following example shows how one might accept a subnet id as a variable and use this data source to obtain the data necessary to create a security group that allows connections from hosts in that subnet. -``` +```hcl variable "subnet_id" {} data "aws_subnet" "selected" { diff --git a/website/source/docs/providers/aws/d/subnet_ids.html.markdown b/website/source/docs/providers/aws/d/subnet_ids.html.markdown index 883d05675..7cf34ffa6 100644 --- a/website/source/docs/providers/aws/d/subnet_ids.html.markdown +++ b/website/source/docs/providers/aws/d/subnet_ids.html.markdown @@ -16,7 +16,7 @@ This resource can be useful for getting back a list of subnet ids for a vpc. The following shows outputing all cidr blocks for every subnet id in a vpc. -``` +```hcl data "aws_subnet_ids" "example" { vpc_id = "${var.vpc_id}" } diff --git a/website/source/docs/providers/aws/d/vpc.html.markdown b/website/source/docs/providers/aws/d/vpc.html.markdown index e1c5f4f17..efc153438 100644 --- a/website/source/docs/providers/aws/d/vpc.html.markdown +++ b/website/source/docs/providers/aws/d/vpc.html.markdown @@ -1,7 +1,7 @@ --- layout: "aws" page_title: "AWS: aws_vpc" -sidebar_current: "docs-aws-datasource-vpc" +sidebar_current: "docs-aws-datasource-vpc-x" description: |- Provides details about a specific VPC --- @@ -20,7 +20,7 @@ The following example shows how one might accept a VPC id as a variable and use this data source to obtain the data necessary to create a subnet within it. -``` +```hcl variable "vpc_id" {} data "aws_vpc" "selected" { diff --git a/website/source/docs/providers/aws/d/vpc_endpoint.html.markdown b/website/source/docs/providers/aws/d/vpc_endpoint.html.markdown index b50dccd8d..cd944859f 100644 --- a/website/source/docs/providers/aws/d/vpc_endpoint.html.markdown +++ b/website/source/docs/providers/aws/d/vpc_endpoint.html.markdown @@ -1,7 +1,7 @@ --- layout: "aws" page_title: "AWS: aws_vpc_endpoint" -sidebar_current: "docs-aws-datasource-vpc-endpoint" +sidebar_current: "docs-aws-datasource-vpc-endpoint-x" description: |- Provides details about a specific VPC endpoint. --- @@ -13,7 +13,7 @@ a specific VPC endpoint. ## Example Usage -``` +```hcl # Declare the data source data "aws_vpc_endpoint" "s3" { vpc_id = "${aws_vpc.foo.id}" diff --git a/website/source/docs/providers/aws/d/vpc_endpoint_service.html.markdown b/website/source/docs/providers/aws/d/vpc_endpoint_service.html.markdown index 4f96f97e4..cac062fa7 100644 --- a/website/source/docs/providers/aws/d/vpc_endpoint_service.html.markdown +++ b/website/source/docs/providers/aws/d/vpc_endpoint_service.html.markdown @@ -14,7 +14,7 @@ configured in the provider. ## Example Usage -``` +```hcl # Declare the data source data "aws_vpc_endpoint_service" "s3" { service = "s3" diff --git a/website/source/docs/providers/aws/d/vpc_peering_connection.html.markdown b/website/source/docs/providers/aws/d/vpc_peering_connection.html.markdown index e7188442e..535828e5f 100644 --- a/website/source/docs/providers/aws/d/vpc_peering_connection.html.markdown +++ b/website/source/docs/providers/aws/d/vpc_peering_connection.html.markdown @@ -13,7 +13,7 @@ a specific VPC peering connection. ## Example Usage -``` +```hcl # Declare the data source data "aws_vpc_peering_connection" "pc" { vpc_id = "${aws_vpc.foo.id}" diff --git a/website/source/docs/providers/aws/d/vpn_gateway.html.markdown b/website/source/docs/providers/aws/d/vpn_gateway.html.markdown index 96b2bf340..c20338beb 100644 --- a/website/source/docs/providers/aws/d/vpn_gateway.html.markdown +++ b/website/source/docs/providers/aws/d/vpn_gateway.html.markdown @@ -13,7 +13,7 @@ a specific VPN gateway. ## Example Usage -``` +```hcl data "aws_vpn_gateway" "selected" { filter { name = "tag:Name" diff --git a/website/source/docs/providers/aws/index.html.markdown b/website/source/docs/providers/aws/index.html.markdown index 8f2d344b4..ca7952775 100644 --- a/website/source/docs/providers/aws/index.html.markdown +++ b/website/source/docs/providers/aws/index.html.markdown @@ -16,7 +16,7 @@ Use the navigation to the left to read about the available resources. ## Example Usage -``` +```hcl # Configure the AWS Provider provider "aws" { access_key = "${var.aws_access_key}" @@ -64,13 +64,13 @@ Access Key and AWS Secret Key, respectively. The `AWS_DEFAULT_REGION` and `AWS_SESSION_TOKEN` environment variables are also used, if applicable: -``` +```hcl provider "aws" {} ``` Usage: -``` +```hcl $ export AWS_ACCESS_KEY_ID="anaccesskey" $ export AWS_SECRET_ACCESS_KEY="asecretkey" $ export AWS_DEFAULT_REGION="us-west-2" @@ -91,7 +91,7 @@ method also supports a `profile` configuration and matching Usage: -``` +```hcl provider "aws" { region = "us-west-2" shared_credentials_file = "/Users/tf_user/.aws/creds" @@ -120,7 +120,7 @@ using the supplied credentials. Usage: -``` +```hcl provider "aws" { assume_role { role_arn = "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME" diff --git a/website/source/layouts/aws.erb b/website/source/layouts/aws.erb index c7b647491..0373c3716 100644 --- a/website/source/layouts/aws.erb +++ b/website/source/layouts/aws.erb @@ -17,7 +17,7 @@ > aws_acm_certificate - > + > aws_alb > @@ -116,16 +116,16 @@ > aws_sns_topic - > + > aws_subnet > aws_subnet_ids - > + > aws_vpc - > + > aws_vpc_endpoint > From 6c981f2524b6f1054fdb10c740abfd141c1a3243 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 12:42:33 -0700 Subject: [PATCH 25/72] Initial Enterprise Doc File Move --- .../artifacts/artifact-provider.html.md | 41 ++++++ .../artifacts/creating-amis.html.md | 9 ++ .../docs/enterprise/artifacts/index.html.md | 18 +++ .../artifacts/managing-versions.html.md | 61 +++++++++ .../source/docs/enterprise/features.html.md | 15 +++ .../enterprise/runs/automatic-applies.html.md | 30 +++++ .../enterprise/runs/how-runs-execute.html.md | 55 ++++++++ .../source/docs/enterprise/runs/index.html.md | 66 +++++++++ .../runs/installing-software.html.md | 28 ++++ .../runs/managing-terraform-versions.html.md | 27 ++++ .../runs/multifactor-authentication.html.md | 72 ++++++++++ .../enterprise/runs/notifications.html.md | 25 ++++ .../enterprise/runs/scheduling-runs.html.md | 38 ++++++ .../docs/enterprise/runs/starting.html.md | 113 ++++++++++++++++ .../runs/variables-and-configuration.html.md | 125 ++++++++++++++++++ .../enterprise/state/collaborating.html.md | 17 +++ .../docs/enterprise/state/index.html.md | 20 +++ .../docs/enterprise/state/pushing.html.md | 15 +++ .../state/resolving-conflicts.html.md | 67 ++++++++++ .../source/docs/enterprise/vcs/git.html.md | 64 +++++++++ .../source/docs/enterprise/vcs/github.html.md | 32 +++++ .../source/docs/enterprise/vcs/index.html.md | 15 +++ 22 files changed, 953 insertions(+) create mode 100755 website/source/docs/enterprise/artifacts/artifact-provider.html.md create mode 100755 website/source/docs/enterprise/artifacts/creating-amis.html.md create mode 100755 website/source/docs/enterprise/artifacts/index.html.md create mode 100755 website/source/docs/enterprise/artifacts/managing-versions.html.md create mode 100755 website/source/docs/enterprise/features.html.md create mode 100755 website/source/docs/enterprise/runs/automatic-applies.html.md create mode 100755 website/source/docs/enterprise/runs/how-runs-execute.html.md create mode 100755 website/source/docs/enterprise/runs/index.html.md create mode 100755 website/source/docs/enterprise/runs/installing-software.html.md create mode 100755 website/source/docs/enterprise/runs/managing-terraform-versions.html.md create mode 100755 website/source/docs/enterprise/runs/multifactor-authentication.html.md create mode 100755 website/source/docs/enterprise/runs/notifications.html.md create mode 100755 website/source/docs/enterprise/runs/scheduling-runs.html.md create mode 100755 website/source/docs/enterprise/runs/starting.html.md create mode 100755 website/source/docs/enterprise/runs/variables-and-configuration.html.md create mode 100755 website/source/docs/enterprise/state/collaborating.html.md create mode 100755 website/source/docs/enterprise/state/index.html.md create mode 100755 website/source/docs/enterprise/state/pushing.html.md create mode 100755 website/source/docs/enterprise/state/resolving-conflicts.html.md create mode 100755 website/source/docs/enterprise/vcs/git.html.md create mode 100755 website/source/docs/enterprise/vcs/github.html.md create mode 100755 website/source/docs/enterprise/vcs/index.html.md diff --git a/website/source/docs/enterprise/artifacts/artifact-provider.html.md b/website/source/docs/enterprise/artifacts/artifact-provider.html.md new file mode 100755 index 000000000..ae13f8b21 --- /dev/null +++ b/website/source/docs/enterprise/artifacts/artifact-provider.html.md @@ -0,0 +1,41 @@ +--- +title: "Atlas Artifact Provider" +--- +# Atlas Artifact Provider + +Terraform has a [provider](https://terraform.io/docs/providers/index.html) for managing Atlas artifacts called `atlas_artifact`. + +This is used to make data stored in Atlas Artifacts available to +Terraform for interpolation. In the following example, an artifact +is defined and references an AMI ID stored in Atlas. + + provider "atlas" { + # You can also set the atlas token by exporting + # ATLAS_TOKEN into your env + token = "${var.atlas_token}" + } + + resource "atlas_artifact" "web-worker" { + name = "%{DEFAULT_USERNAME}/web-worker" + type = "amazon.image" + version = "latest" + } + + resource "aws_instance" "worker-machine" { + ami = "${atlas_artifact.web-worker.metadata_full.region-us-east-1}" + instance_type = "m1.small" + } + +This automatically pulls the "latest" artifact version. + +Following a new artifact version being created via a Packer build, the following +diff would be generated when running `terraform plan`. + + -/+ aws_instance.worker-machine + ami: "ami-168f9d7e" => "ami-2f3a9df2" (forces new resource) + instance_type: "m1.small" => "m1.small" + +This allows you to reference changing artifacts and trigger new deployments +upon pushing subsequent Packer builds. + +Read more about artifacts in the [Terraform documentation](https://terraform.io/docs/providers/atlas/r/artifact.html). diff --git a/website/source/docs/enterprise/artifacts/creating-amis.html.md b/website/source/docs/enterprise/artifacts/creating-amis.html.md new file mode 100755 index 000000000..0ea4b7333 --- /dev/null +++ b/website/source/docs/enterprise/artifacts/creating-amis.html.md @@ -0,0 +1,9 @@ +--- +title: "Creating AMI Artifacts with Packer and Atlas" +--- + +# Creating AMI Artifacts with Packer and Atlas + +Currently, the best way to create AWS AMI artifacts is with Packer. + +We detail how to do this in the [Packer section of the documentation](/help/packer/artifacts/creating-amis). diff --git a/website/source/docs/enterprise/artifacts/index.html.md b/website/source/docs/enterprise/artifacts/index.html.md new file mode 100755 index 000000000..03eae7789 --- /dev/null +++ b/website/source/docs/enterprise/artifacts/index.html.md @@ -0,0 +1,18 @@ +--- +title: "About Terraform Artifacts in Atlas" +--- + +# About Terraform Artifacts in Atlas + +Atlas can be used to store artifacts for use by Terraform. Typically, +artifacts are [stored with Packer](/help/packer/artifacts). + +Artifacts can be used in Atlas to deploy and manage images +of configuration. Artifacts are generic, but can be of varying types +like `amazon.image`. See the Packer [`artifact_type`](https://packer.io/docs/post-processors/atlas.html#artifact_type) +docs for more information. + +Packer can create artifacts both while running in Atlas and out of Atlas' +network. This is possible due to the post-processors use of the public +artifact API to store the artifacts. + diff --git a/website/source/docs/enterprise/artifacts/managing-versions.html.md b/website/source/docs/enterprise/artifacts/managing-versions.html.md new file mode 100755 index 000000000..894a4894a --- /dev/null +++ b/website/source/docs/enterprise/artifacts/managing-versions.html.md @@ -0,0 +1,61 @@ +--- +title: "Managing Artifact Versions" +--- + +# Managing Artifact Versions + +Artifacts stored in Atlas are versioned and assigned a version number. +Versions are useful to roll back, audit and deploy images specific versions +of images to certain environments in a targeted way. + +This assumes you are familiar with the [Atlas artifact provider](https://terraform.io/docs/providers/atlas/index.html) +in Terraform. + +### Finding the Version of an Artifact + +Artifact versions can be found with the [`terraform show` command](https://terraform.io/docs/commands/show.html), +or by looking at the Packer logs generated during builds. After a +successful artifact upload, version numbers are displayed. "latest" can +be used to use the latest version of the artifact. + +The following output is from `terraform show`. + + atlas_artifact.web-worker: + id = us-east-1:ami-3a0a1d52 + build = latest + metadata_full.# = 1 + metadata_full.region-us-east-1 = ami-3a0a1d52 + name = %{DEFAULT_USERNAME}/web-worker + slug = %{DEFAULT_USERNAME}/web-worker/amazon.image/7 + type = amazon.image + +In this case, the version is 7 and can be found in the persisted slug +attribute. + +### Pinning Artifacts to Specific Versions + +You can pin artifacts to a specific version. This allows for a targeted +deploy. + + resource "atlas_artifact" "web-worker" { + name = "%{DEFAULT_USERNAME}/web-worker" + type = "amazon.image" + version = 7 + } + +This will use version 7 of the `web-worker` artifact. + +### Pinning Artifacts to Specific Builds + +Artifacts can also be pinned to an Atlas build number. This is only +possible if Atlas was used to build the artifact with Packer. + + resource "atlas_artifact" "web-worker" { + name = "%{DEFAULT_USERNAME}/web-worker" + type = "amazon.image" + build = 5 + } + +It's recommended to use versions, instead of builds, as it will +be easier to track within Atlas and when building outside of the Atlas +environment. diff --git a/website/source/docs/enterprise/features.html.md b/website/source/docs/enterprise/features.html.md new file mode 100755 index 000000000..b9c521d30 --- /dev/null +++ b/website/source/docs/enterprise/features.html.md @@ -0,0 +1,15 @@ +--- +title: "Terraform Features in Atlas" +--- + +# Terraform Features in Atlas + +[Terraform](https://terraform.io) is a tool for safely and +efficiently changing infrastructure across providers. + +This is a list of features specific to Terraform that Atlas provides. + +- [Terraform Plans and Applies](/help/terraform/runs) +- [Terraform Artifact Registry](/help/terraform/artifacts) +- [Terraform Remote State Storage](/help/terraform/state) +- [Terraform Run Notifications](/help/terraform/runs/notifications) diff --git a/website/source/docs/enterprise/runs/automatic-applies.html.md b/website/source/docs/enterprise/runs/automatic-applies.html.md new file mode 100755 index 000000000..4cb34a496 --- /dev/null +++ b/website/source/docs/enterprise/runs/automatic-applies.html.md @@ -0,0 +1,30 @@ +--- +title: "Automatic Terraform Applies in Atlas" +--- + +# Automatic Terraform Applies in Atlas + +
+
+ This is an unreleased beta feature. Please contact support if you are interested in helping us test this feature. +
+
+ +Atlas can optionally automatically apply successful Terraform plans to your +infrastructure. This option is disabled by default and can be enabled by an +organization owner on a per-[environment](/help/glossary#environment) basis. + +
+
+ This is an advanced feature that enables changes to active infrastructure + without user confirmation. Please understand the implications to your + infrastructure before enabling. +
+
+ +## Enabling Auto-Apply + +To enable auto-apply for an environment, visit the environment settings page in +Atlas and check the box labeled "auto apply" and click the save button to +persist the changes. The next successful Terraform plan for the environment will +automatically apply without user confirmation. diff --git a/website/source/docs/enterprise/runs/how-runs-execute.html.md b/website/source/docs/enterprise/runs/how-runs-execute.html.md new file mode 100755 index 000000000..6464f1f5d --- /dev/null +++ b/website/source/docs/enterprise/runs/how-runs-execute.html.md @@ -0,0 +1,55 @@ +--- +title: "How Terraform Runs Execute in Atlas" +--- + +# How Terraform Runs Execute in Atlas + +This briefly covers the internal process of running Terraform plan and +applies in Atlas. It is not necessary to know this information, but may be +valuable to help understand implications of running in Atlas or debug failing +runs. + +## Steps of Execution + +1. A set of Terraform configuration and directory of files is uploaded via Terraform Push or GitHub +1. Atlas creates a version of the Terraform configuration and waits for the upload +to complete. At this point, the version will be visible in the UI even if the upload has +not completed +1. Once the upload finishes, Atlas creates a run and queues a `terraform plan` +1. In the run environment, the package including the files and Terraform +configuration are downloaded +1. `terraform plan` is run against the configuration in the run environment +1. Logs are streamed into the UI and stored +1. The `.tfplan` file created in the plan is uploaded and stored +1. Once the plan completes, the environment is torn down and status is +updated in the UI +1. The plan then requires confirmation by an operator. It can optionally +be discarded and ignored at this stage +1. Once confirmed, the run then executes a `terraform apply` in a new +environment against the saved `.tfplan` file +1. The logs are streamed into the UI and stored +1. Once the apply completes, the environment is torn down, status is +updated in the UI and changed state is saved back to Atlas + +Note: In the case of a failed apply, it's safe to re-run. This is possible +because Terraform saves partial state and can "pick up where it left off". + +### Customizing Terraform Execution + +As described in the steps above, Atlas will run Terraform against your configuration +when changes are pushed via GitHub, `terraform push`, or manually queued in the +Atlas UI. There are a few options available to customize the execution of Terraform. +These are: + +- The directory that contains your environment's Terraform configuration can be customized +to support directory structures with more than one set of Terraform configuration files. +To customize the directory for your Atlas Environment, set the _Terraform Directory_ +property in the _GitHub Integration_ settings for your environment. This is equivalent to +passing the `[dir]` argument when running Terraform in your local shell. +- The directory in which Terraform is executed from can be customized to support directory +structures with nested sub-directories or configurations that use Terraform modules with +relative paths. To customize the directory used for Terraform execution in your Atlas +Environment, set the `TF_ATLAS_DIR` +[environment variable](/help/terraform/runs/variables-and-configuration#environment-variables) +to the relative path of the directory - ie. `terraform/production`. This is equivalent to +changing directories to the appropriate path in your local shell and then executing Terraform. diff --git a/website/source/docs/enterprise/runs/index.html.md b/website/source/docs/enterprise/runs/index.html.md new file mode 100755 index 000000000..4882ebae9 --- /dev/null +++ b/website/source/docs/enterprise/runs/index.html.md @@ -0,0 +1,66 @@ +--- +title: "About Terraform Runs in Atlas" +--- + +# About Terraform Runs in Atlas + +A "run" in Atlas represents the logical grouping of two Terraform steps - a +"plan" and an "apply". The distinction between these two phases of a Terraform +run are documented below. + +When a [new run is created](/help/terraform/runs/starting), Atlas automatically +queues a Terraform plan. Because a plan does not change the state of +infrastructure, it is safe to execute a plan multiple times without +consequence. An apply executes the output of a plan and actively changes +infrastructure. To prevent race conditions, Atlas will only execute one +plan/apply at a time (plans for validating GitHub Pull Requests are allowed to +happen concurrently, as they do not modify state). You can read more about +Terraform plans and applies below. + +## Plan + +During the plan phase of a run, Atlas executes the command `terraform plan`. +Terraform performs a refresh and then determines what actions are necessary to +reach the desired state specified in the Terraform configuration files. A +successful plan outputs an executable file that is securely stored in Atlas +and may be used in the subsequent apply. + +Terraform plans in Atlas do not change the state of infrastructure, so it is +safe to execute a plan multiple times. In fact, there are a number of components +in Atlas that can trigger a Terraform plan. You can read more about this in the +[starting runs](/help/terraform/runs/starting) section. + +## Apply + +During the apply phase of a run, Atlas executes the command `terraform apply` +with the executable result of the prior Terraform plan. This phase **can change +infrastructure** by applying the changes required to reach the desired state +specified in the Terraform configuration file. + +While Terraform plans are safe to run multiple times, Terraform applies often +change active infrastructure. Because of this, the default behavior for Atlas +is to require user confirmation as part of the +[Terraform run execution](/help/terraform/runs/how-runs-execute). Upon +user confirmation, Atlas will queue and execute the Terraform apply. It is also +possible to configure Atlas to +[automatically apply](/help/terraform/runs/automatic-applies), but this option is +disabled by default. + +## Environment Locking + +During run execution, Atlas will lock the environment to prevent other plans +and applies from executing simultaneously. When the run completes, the next +pending run, if any, will be started. + +An administrator of the environment can also manually lock the environment, for +example during a maintenance period. + +You can see the lock status of an environment, and lock/unlock the environment +by visiting that environment's settings page. + +## Notifications + +To receive alerts when user confirmation is needed or for any other phase of the +run process, you can +[enable run notifications](/help/terraform/runs/notifications) for your +organization or environment. diff --git a/website/source/docs/enterprise/runs/installing-software.html.md b/website/source/docs/enterprise/runs/installing-software.html.md new file mode 100755 index 000000000..6438042a2 --- /dev/null +++ b/website/source/docs/enterprise/runs/installing-software.html.md @@ -0,0 +1,28 @@ +--- +title: "Installing Custom Software on the Terraform Runners" +--- + +# Installing Custom Software + +The machines that run Terraform exist in an isolated environment and are +destroyed on each use. In some cases, it may be necessary to install certain +software on the Terraform runner, such as a configuration management tool like +Chef, Puppet, Ansible, or Salt. + +The easiest way to install software on the Packer builder is via the +`local-exec` provisioner. This will execute commands on the host machine running +Terraform. + + resource "null_resource" "local-software" { + provisioner "local-exec" { + command = < +
+ This is an advanced feature that enables changes to active infrastructure + without user confirmation. Please understand the implications to your + infrastructure before enabling. +
+ + +## Setting Up AWS Multi-Factor Authentication + +Before you are able to set up multi-factor authentication in atlas, you must set up an IAM user in AWS. More details about creating an IAM user can be found [here](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html). Setting up an AWS IAM user will provide you with the serial number and access keys that you will need in order to connect to AWS Secure Token Service. + +In order to set up multi-factor authentication for your organization, you must have the following environment variables in your configuration: 'AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_MFA_SERIAL_NUMBER". You can set these variables at `/settings/organization_variables.` + + +## Enabling AWS Multi-Factor Authentication + +To enable multi-factor authentication, visit the environment settings page in +Atlas: `terraform//environments//settings`. Use the drop down labeled "AWS Multi-Factor Authentication +". There are currently three levels available: "never", "applies only", and "plans and applies". Once you have selected your desired level, save your settings. All subsequent runs on the environment will now require the selected level of authentication. + +## Using AWS Multi-Factor Authentication + +Once you have elected to use AWS MFA for your Terraform Runs, you will then be prompted to enter a token code each time you plan or apply the run depending on your settings. Your one time use token code will be sent to you via the method you selected when setting up your [IAM account](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html). + +If you have selected "applies only", you will be able to queue and run a plan without entering your token code. Once the run finishes, you will need to enter your token code and click "Authenticate" before the applying the plan. Once you submit your token code, the apply will start, and you will see "Authenticated with MFA by `user`" in the UI. If for any case there is an error when submitting your token code, the lock icon in the UI will turn red, and an error will appear alerting you to the failure. + +If you have selected "plans and applies", you will be prompted to enter your token before queueing your plan. Once you enter the token and click "Authenticate", you will see "Authenticated with MFA by `user`" appear in the UI logs. The plan will queue and you may run the plan once it is queued. Then, before applying, you will be asked to authenticate with MFA again. Enter your token, click Authenticate, and note that "Authenticated with MFA by `user`" appears in the UI log after the apply begins. If for any case there is an error authenticating, the lock icon in the UI will turn red, and an error will appear alerting you to the failure. + +## Using AWS Multi-Factor Authentication with AWS STS AssumeRole + +The AWS Secure Token Service can be used to return a set of temporary security credentials that a user can use to access resources that they might not normally have access to (known as AssumeRole). The AssumeRole workflow is compatible with AWS multi-factor authentication in Atlas. + +To use AssumeRole, you first need to create an IAM role and edit the trust relationship policy document to contain the following: + + { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::[INT]:user/[USER]" + }, + "Action": "sts:AssumeRole", + "Condition": { + "Bool": { + "aws:MultiFactorAuthPresent": "true" + } + } + } + ] + } + +You can then configure the Terraform AWS provider to assume a given role by specifying the role ARN within the nested assume_role block: + + provider "aws" { + ... + assume_role { + role_arn = "arn:aws:iam::[INT]:role/[ROLE]" + } + } + diff --git a/website/source/docs/enterprise/runs/notifications.html.md b/website/source/docs/enterprise/runs/notifications.html.md new file mode 100755 index 000000000..953b3659e --- /dev/null +++ b/website/source/docs/enterprise/runs/notifications.html.md @@ -0,0 +1,25 @@ +--- +title: "Terraform Run Notifications" +--- + +# Terraform Run Notifications + +Atlas can send run notifications to your organization via one of our [supported +notification methods](/help/consul/alerts/notification-methods). The following +events are configurable: + +- **Needs Confirmation** - The plan phase has succeeded, and there are changes + that need to be confirmed before applying. +- **Confirmed** - A plan has been confirmed, and it will begin applying + shortly. +- **Discarded** - A user in Atlas has discarded the plan. +- **Applying** - The plan has begun to apply and make changes to your + infrastructure. +- **Applied** - The plan was applied successfully. +- **Errored** - An error has occurred during the plan or apply phase. + +> Emails will include logs for the **Needs Confirmation**, **Applied**, and +> **Errored** events. + +You can toggle notifications for each of these events on the "Integrations" tab +of an environment. diff --git a/website/source/docs/enterprise/runs/scheduling-runs.html.md b/website/source/docs/enterprise/runs/scheduling-runs.html.md new file mode 100755 index 000000000..7e2285ff5 --- /dev/null +++ b/website/source/docs/enterprise/runs/scheduling-runs.html.md @@ -0,0 +1,38 @@ +--- +title: "Schedule Periodic Plans in Atlas" +--- + +# Schedule Periodic Plans in Atlas + +
+
+ This is an unreleased beta feature. Please contact support if you are interested in helping us test this feature. +
+
+ +Atlas can automatically run a Terraform plan against +your infrastructure on a specified schedule. This option is disabled by default and can be enabled by an +organization owner on a per-[environment](/help/glossary#environment) basis. + +On the specified interval, Atlas will automatically queue a plan that +runs Terraform for you, determining any changes and sending the appropriate +notifications. + +When used with [automatic applies](/help/terraform/runs/automatic-applies), this feature can help converge +changes to infrastructure without human input. + +Atlas will not queue new runs while another plan or apply is in progress, or if +the environment has been manually locked. See [Environment +Locking](/help/terraform/runs#environment-locking) for more information. + +## Enabling Periodic Plans + +To enable periodic plans for an environment, visit the environment settings page in +Atlas and select the desired interval and click the save button to +persist the changes. An initial plan may immediately run, depending +on the state of your environment, and then will automatically +plan at the specified interval. + +If you have manually run a plan separately, Atlas will not queue a new +plan until the alloted time after the manual plan ran. This means that +Atlas simply ensures that a plan has been executed at the specified schedule. diff --git a/website/source/docs/enterprise/runs/starting.html.md b/website/source/docs/enterprise/runs/starting.html.md new file mode 100755 index 000000000..0cff07ffd --- /dev/null +++ b/website/source/docs/enterprise/runs/starting.html.md @@ -0,0 +1,113 @@ +--- +title: "Starting Terraform Runs in Atlas" +--- + +# Starting Terraform Runs in Atlas + +There are a variety of ways to queue a Terraform run in Atlas. In addition to +`terraform push`, you can connect your [environment](/help/glossary#environment) +to GitHub and have Atlas queue Terraform runs based on new commits. Atlas can +also intelligently queue new runs when linked artifacts are uploaded or changed. +Remember from the [previous section about Terraform runs](/help/terraform/runs) +that it is safe to trigger many plans without consequence since Terraform plans +do not change infrastructure. + + +## Terraform Push + +Terraform `push` is a [Terraform command](https://terraform.io/docs/commands/push.html) +that packages and uploads a set of Terraform configuration and directory to Atlas. This then creates a run +in Atlas, which performs `terraform plan` and `terraform apply` against the uploaded +configuration. + +The directory is included in order to run any associated provisioners, +that might use local files. For example, a remote-exec provisioner +that executes a shell script. + +By default, everything in your directory is uploaded as part of the push. + +However, it's not always the case that the entire directory should be uploaded. Often, +temporary or cache directories and files like `.git`, `.tmp` will be included by default. This +can cause Atlas to fail at certain sizes and should be avoided. You can +specify [exclusions](https://terraform.io/docs/commands/push.html) to avoid this situation. + +Terraform also allows for a [VCS option](https://terraform.io/docs/commands/push.html#_vcs_true) +that will detect your VCS (if there is one) and only upload the files that are tracked by the VCS. This is +useful for automatically excluding ignored files. In a VCS like git, this +basically does a `git ls-files`. + + +## GitHub Webhooks + +Optionally, GitHub can be used to import Terraform configuration. When used +within an organization, this can be extremely valuable for keeping differences +in environments and last mile changes from occurring before an upload to Atlas. + +After you have [connected your GitHub account to Atlas](/settings/connections), +you can connect your [environment](/help/glossary#environment) to the target +GitHub repository. The GitHub repository will be linked to the Atlas Terraform +configuration, and GitHub will start sending webhooks to Atlas. Certain +GitHub webhook events, detailed below, will cause the repository to be +automatically ingressed into Atlas and stored, along with references to the +GitHub commits and authorship information. + +Currently, an environment must already exist to be connected to GitHub. You can +create the environment with `terraform push`, detailed above, and then link it +to GitHub. + +Each ingress will trigger a Terraform plan. If you have auto-apply enabled then +the plan will also be applied. + +You can disable an ingress by adding the text `[atlas skip]` or `[ci skip]` to +your commit message. + +Supported GitHub webhook events: + +- pull_request (on by default) + - ingress when opened or reopened + - ingress when synchronized (new commits are pushed to the branch) +- push (on by default) + - ingress when a tag is created + - ingress when the default branch is updated + - note: the default branch is either configured on your configuration's + integrations tab in Atlas, or if that is blank it is the GitHub + repository's default branch +- create (off by default) + - ingress when a tag is created + - note: if you want to only run on tag creation, turn on create events and + turn off push events + +## Artifact Uploads + +Upon successful completion of a Terraform run, Atlas parses the remote state and +detects any [Atlas artifacts](/help/terraform/artifacts/artifact-provider) that +were referenced. When new versions of those referenced artifacts are uploaded +to Atlas, you have the option to automatically queue a new Terraform run. + +For example, consider the following Terraform configuration which references an +Atlas artifact named "worker": + + resource "aws_instance" "worker" { + ami = "${atlas_artifact.worker.metadata_full.region-us-east-1}" + instance_type = "m1.small" + } + +When a new version of the Atlas artifact "worker" is uploaded either manually +or as the output of a [Packer build](/help/packer/builds/starting.html), Atlas +can automatically trigger a Terraform plan with this new artifact version. +You can enable this feature on a per-environment basis from the +[environment](/help/glossary#environment) settings page in Atlas. + +Combined with +[Terraform auto apply](/help/terraform/runs/automatic-applies), you can +continuously deliver infrastructure using Terraform and Atlas. + +## Terraform Plugins + +If you are using a custom [Terraform Plugin](https://www.terraform.io/docs/plugins/index.html) +binary for a provider or provisioner that's not currently in a released +version of Terraform, you can still use this in Atlas. + +All you need to do is include a Linux AMD64 binary for the plugin in the +directory in which Terraform commands are run from; Atlas will then use +the plugin the next time you `terraform push` or ingress from GitHub. diff --git a/website/source/docs/enterprise/runs/variables-and-configuration.html.md b/website/source/docs/enterprise/runs/variables-and-configuration.html.md new file mode 100755 index 000000000..a1b398bf6 --- /dev/null +++ b/website/source/docs/enterprise/runs/variables-and-configuration.html.md @@ -0,0 +1,125 @@ +--- +title: "Terraform Variables and Configuration" +--- + +# Terraform Variables and Configuration + +There are two ways to configure Terraform runs in Atlas – with +Terraform variables or environment variables. + +## Terraform Variables + +Terraform variables are first-class configuration in Terraform. They +define the parameterization of Terraform configurations and are important +for sharing and removal of sensitive secrets from version control. + +Variables are sent to Atlas with `terraform push`. Any variables in your local +`.tfvars` files are securely uploaded to Atlas. Once variables are uploaded to +Atlas, Terraform will prefer the Atlas-stored variables over any changes you +make locally. Please refer to the +[Terraform push documentation](https://www.terraform.io/docs/commands/push.html) +for more information. + +You can also add, edit, and delete Terraform variables via Atlas. To update +Terraform variables in Atlas, visit the "variables" page on your +[environment](/help/glossary#environment). + +The maximum size for the value of Terraform variables is `256kb`. + +For detailed information about Terraform variables, please read the +[Terraform variables](https://terraform.io/docs/configuration/variables.html) +section of the Terraform documentation. + +## Environment Variables + +Environment variables are injected into the virtual environment that Terraform +executes in during the `plan` and `apply` phases. + +You can add, edit, and delete environment variables from the "variables" page +on your [environment](/help/glossary#environment). + +Additionally, the following environment variables are automatically injected by +Atlas. All Atlas-injected environment variables will be prefixed with `ATLAS_` + +- `ATLAS_TOKEN` - This is a unique, per-run token that expires at the end of + run execution (e.g. `"abcd.atlasv1.ghjkl..."`). +- `ATLAS_RUN_ID` - This is a unique identifier for this run (e.g. `"33"`). +- `ATLAS_CONFIGURATION_NAME` - This is the name of the configuration used in + this run. Unless you have configured it differently, this will also be the + name of the environment (e.g `"production"`). +- `ATLAS_CONFIGURATION_SLUG` - This is the full slug of the configuration used + in this run. Unless you have configured it differently, this will also be the + name of the environment (e.g. `"company/production"`). +- `ATLAS_CONFIGURATION_VERSION` - This is the unique, auto-incrementing version + for the Terraform configuration (e.g. `"34"`). +- `ATLAS_CONFIGURATION_VERSION_GITHUB_BRANCH` - This is the name of the branch + that the associated Terraform configuration version was ingressed from + (e.g. `master`). +- `ATLAS_CONFIGURATION_VERSION_GITHUB_COMMIT_SHA` - This is the full commit hash + of the commit that the associated Terraform configuration version was + ingressed from (e.g. `"abcd1234..."`). +- `ATLAS_CONFIGURATION_VERSION_GITHUB_TAG` - This is the name of the tag + that the associated Terraform configuration version was ingressed from + (e.g. `"v0.1.0"`). + +For any of the `GITHUB_` attributes, the value of the environment variable will +be the empty string (`""`) if the resource is not connected to GitHub or if the +resource was created outside of GitHub (like using `terraform push`). + +## Managing Secret Multi-Line Files + +Atlas has the ability to store multi-line files as variables. The recommended way to manage your secret/sensitive multi-line files (private key, SSL cert, SSL private key, CA, etc.) is to add them as [Terraform Variables](#terraform-variables) or [Environment Variables](#environment-variables) in Atlas. + +Just like secret strings, it is recommended that you never check in these multi-line secret files to version control by following the below steps. + +Set the [variables](https://www.terraform.io/docs/configuration/variables.html) in your Terraform template that resources utilizing the secret file will reference: + + variable "private_key" {} + + resource "aws_instance" "example" { + ... + + provisioner "remote-exec" { + connection { + host = "${self.private_ip}" + private_key = "${var.private_key}" + } + + ... + } + } + +`terraform push` any "Terraform Variables" to Atlas: + + $ terraform push -name $ATLAS_USERNAME/example -var "private_key=$MY_PRIVATE_KEY" + +`terraform push` any "Environment Variables" to Atlas: + + $ TF_VAR_private_key=$MY_PRIVATE_KEY terraform push -name $ATLAS_USERNAME/example + +Alternatively, you can add or update variables manually by going to the "Variables" section of your Atlas Environment and pasting the contents of the file in as the value. + +Now, any resource that consumes that variable will have access to the variable value, without having to check the file into version control. If you want to run Terraform locally, that file will still need to be passed in as a variable in the CLI. View the [Terraform Variable Documentation](https://www.terraform.io/docs/configuration/variables.html) for more info on how to accomplish this. + +A few things to note... + +The `.tfvars` file does not support multi-line files. You can still use `.tfvars` to define variables, however, you will not be able to actually set the variable in `.tfvars` with the multi-line file contents like you would a variable in a `.tf` file. + +If you are running Terraform locally, you can pass in the variables at the command line: + + $ terraform apply -var "private_key=$MY_PRIVATE_KEY" + $ TF_VAR_private_key=$MY_PRIVATE_KEY terraform apply + +You can update variables locally by using the `-overwrite` flag with your `terraform push` command: + + $ terraform push -name $ATLAS_USERNAME/example -var "private_key=$MY_PRIVATE_KEY" -overwrite=private_key + $ TF_VAR_private_key=$MY_PRIVATE_KEY terraform push -name $ATLAS_USERNAME/example -overwrite=private_key + +- - - + +## Notes on Security + +Terraform variables and environment variables in Atlas are encrypted using +[Vault](https://vaultproject.io) and closely guarded and audited. If you have +questions or concerns about the safety of your configuration, please contact +our security team at [security@hashicorp.com](mailto:security@hashicorp.com). diff --git a/website/source/docs/enterprise/state/collaborating.html.md b/website/source/docs/enterprise/state/collaborating.html.md new file mode 100755 index 000000000..876524c82 --- /dev/null +++ b/website/source/docs/enterprise/state/collaborating.html.md @@ -0,0 +1,17 @@ +--- +title: "Collaborating on Terraform Remote State in Atlas" +--- + +# Collaborating on Terraform Remote State in Atlas + +Atlas is one of a few options to store [remote state](/help/terraform/state). + +Remote state gives you the ability to version and collaborate on Terraform changes. It +stores information about the changes Terraform makes based on configuration. + +In order to collaborate safely on remote state, we recommend +[creating an organization](/help/organizations/create) to manage teams of users. + +Then, following a [remote state push](/help/terraform/state) you can view state versions +in the changes tab of the [environment](/help/glossary#environment) created under the same name +as the remote state. diff --git a/website/source/docs/enterprise/state/index.html.md b/website/source/docs/enterprise/state/index.html.md new file mode 100755 index 000000000..1eb8ee586 --- /dev/null +++ b/website/source/docs/enterprise/state/index.html.md @@ -0,0 +1,20 @@ +--- +title: "About Remote State" +--- + +# About Remote State + +Terraform stores the state of your managed infrastructure from the last +time Terraform was run. By default this state is stored in a local file +named `terraform.tfstate`, but it can also be stored remotely, which +works better in a team environment. + +Atlas is a remote state provider, allowing you to store, version and +collaborate on state with Atlas. + +Remote state gives you more than just easier version control and safer +storage. It also allows you to delegate the outputs to other teams. +This allows your infrastructure to be more easily broken down into +components that multiple teams can access. + +Read [more about remote state](https://www.terraform.io/docs/state/remote/index.html). diff --git a/website/source/docs/enterprise/state/pushing.html.md b/website/source/docs/enterprise/state/pushing.html.md new file mode 100755 index 000000000..ec9d2ace8 --- /dev/null +++ b/website/source/docs/enterprise/state/pushing.html.md @@ -0,0 +1,15 @@ +--- +title: "Pushing Terraform Remote State to Atlas" +--- + +# Pushing Terraform Remote State to Atlas + +Atlas is one of a few options to store [remote state](/help/terraform/state). + +Remote state gives you the ability to version and collaborate on Terraform changes. It +stores information about the changes Terraform makes based on configuration. + +To use Atlas to store remote state, you'll first need to have the +`ATLAS_TOKEN` environment variable set and run the following command. + + $ terraform remote config -backend-config="name=%{DEFAULT_USERNAME}/product" diff --git a/website/source/docs/enterprise/state/resolving-conflicts.html.md b/website/source/docs/enterprise/state/resolving-conflicts.html.md new file mode 100755 index 000000000..5d23e8e97 --- /dev/null +++ b/website/source/docs/enterprise/state/resolving-conflicts.html.md @@ -0,0 +1,67 @@ +--- +title: "Resolving Conflicts in Atlas Remote State" +--- + +# Resolving Conflicts in Atlas Remote State + +Resolving state conflicts can be time consuming and error prone, so +it's important to approach it carefully. + +There are several tools provided by Atlas to help resolve conflicts +and fix remote state issues. First, you can navigate between state +versions in the changes view of your environment (after toggling on +the remote state checkbox) and view plain-text differences between +versions. + +This allows you to pinpoint where things may have gone wrong and +make a educated decision about resolving the conflict. + +### Rolling Back to a Specific State Version + +The rollback feature allows you to choose a new version to set as the +"Head" version of the state. Rolling back to a version means it will +then return that state upon request from a client. It will not +increment the serial in the state, but perform a hard rollback to the +exact version of the state provided. + +This allows you to reset the state to an older version, essentially +forgetting changes made in versions after that point. + +To roll back to a specific version, navigate to it in the changes view +and use the rollback link. You'll need to confirm the version number +to perform the operation. + +### Using Terraform Locally + +Another way to resolve conflicts in Atlas remote state +is to merge and conflicted copies locally by inspecting the +raw state available in the path `.terraform/terraform.tfstate`. + +When making state changes, it's important to make backup copies in +order to avoid losing any data. + +Atlas will reject any state that is pushed with a serial that is lower +than the known serial when the MD5 of the state does not match. + +The serial is embedded in the state file: + + { + "version": 1, + "serial": 555, + "remote": { + "type": "atlas", + "config": { + "name": "%{DEFAULT_USERNAME}/production" + } + }, + ... + } + +Once a conflict has been resolved locally by editing the state file, +the serial can be incremented past the current version in Atlas and +pushed: + + terraform remote push + +This will upload the manually resolved state and set it as the head +version in Atlas. diff --git a/website/source/docs/enterprise/vcs/git.html.md b/website/source/docs/enterprise/vcs/git.html.md new file mode 100755 index 000000000..93254ad70 --- /dev/null +++ b/website/source/docs/enterprise/vcs/git.html.md @@ -0,0 +1,64 @@ +--- +title: "Git Integration" +--- + +# Git Integation + +Git repositories can be integrated with Atlas by using +[`terraform push`](https://www.terraform.io/docs/commands/push.html) to import +Terraform configuration when changes are committed. When Terraform +configuration is imported using `terraform push` a plan is automatically queued +in Atlas. + +_**Note:** This integration is for Git repositories **not** hosted on GitHub. +For repositories on GitHub, there is native [GitHub Integration](/help/terraform/vcs/github). + +## Setup + +Terraform configuration can be manually imported by running `terraform push` +like below: + +``` +$ terraform push -name=$ATLAS_USERNAME/ENV_NAME +``` + +A better option than having to manually run `terraform push` is to run it +using a git commit hook. A client-side `pre-push` hook is suitable and will +push your Terraform configuration when you push local changes to your Git +server. + +### Client-side Commit Hook + +The script below will execute `terraform push` when you push local changes to +your Git server. Place the script at `.git/pre-push` in your local Git +repository, set the necessary variables, and ensure the script is executable. + +``` +#!/bin/bash +# +# An example hook script to push Terraform configuration to Atlas. +# +# Set the following variables for your project: +# - ENV_NAME - your Atlas environment name (e.g. org/env) +# - TERRAFORM_DIR - the local directory to push +# - DEFAULT_BRANCH - the branch to push. Other branches will be ignored. + +ENV_NAME="YOUR_ORG/YOUR_ENV" +TERRAFORM_DIR="terraform" +DEFAULT_BRANCH="" + +if [[ -z "$ENV_NAME" || -z "$TERRAFORM_DIR" || -z "$DEFAULT_BRANCH" ]]; then + echo 'pre-push hook: One or more variables are undefined. Canceling push.' + exit 1 +fi + +current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') + +if [ "$current_branch" == "$DEFAULT_BRANCH" ]; then + echo "pre-push hook: Pushing branch [$current_branch] to Atlas environment [$ENV_NAME]." + terraform push -name="$ENV_NAME" $TERRAFORM_DIR +else + echo "pre-push hook: NOT pushing branch [$current_branch] to Atlas environment [$ENV_NAME]." +fi + +``` diff --git a/website/source/docs/enterprise/vcs/github.html.md b/website/source/docs/enterprise/vcs/github.html.md new file mode 100755 index 000000000..e9163f9a6 --- /dev/null +++ b/website/source/docs/enterprise/vcs/github.html.md @@ -0,0 +1,32 @@ +--- +title: "GitHub Integration" +--- + +# GitHub Integration + +GitHub can be used to import Terraform configuration, automatically queuing +runs when changes are merged into a repository's default branch. Additionally, +plans are run when a pull request is created or updated. Atlas will update the +pull request with the result of the Terraform plan providing quick feedback on +proposed changes. + +## Setup + +Atlas environments are linked to individual GitHub repositories. However, a +single GitHub repository can be linked to multiple Atlas environments allowing +a single set of Terraform configuration to be used across multiple environments. + +Atlas environments can be linked when they're initially created using the +[New Environment](https://atlas.hashicorp.com/configurations/import) process. +Existing environments can be linked by setting GitHub details in their +**Integrations**. + +To link an Atlas environment to a GitHub repository, you need three pieces of +information: + +- **GitHub repository** - The location of the repository being imported in the +format _username/repository_. +- **GitHub branch** - The branch from which to ingress new versions. This +defaults to the value GitHub provides as the default branch for this repository. +- **Path to directory of Terraform files** - The repository's subdirectory that +contains its terraform files. This defaults to the root of the repository. diff --git a/website/source/docs/enterprise/vcs/index.html.md b/website/source/docs/enterprise/vcs/index.html.md new file mode 100755 index 000000000..c30f75198 --- /dev/null +++ b/website/source/docs/enterprise/vcs/index.html.md @@ -0,0 +1,15 @@ +--- +title: "Integration with Version Control Software" +--- + +# Integration with Version Control Software + +Atlas can integrate with your version control software to automatically execute +Terraform with your latest Terraform configuration as you commit changes to +source control. + +Different capabilities within Atlas are available depending on the integration +in use. The available integration options are below. + +- [Git](/help/terraform/vcs/git) +- [GitHub](/help/terraform/vcs/github) From 656260c647e994c5b3dae0a85458827ca830e863 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 12:53:08 -0700 Subject: [PATCH 26/72] Add "enterprise" to docs sidebar --- website/source/layouts/docs.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 810a463f0..52e7fff45 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -542,6 +542,13 @@ + + > + Terraform Enterprise + + <% end %> From bb9f383bf16199f17c8491784e525bf202f6dcc3 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 13:55:18 -0700 Subject: [PATCH 27/72] Converted features page to index page. --- .../source/docs/enterprise/{features.html.md => index.html.md} | 0 website/source/layouts/docs.erb | 1 + 2 files changed, 1 insertion(+) rename website/source/docs/enterprise/{features.html.md => index.html.md} (100%) diff --git a/website/source/docs/enterprise/features.html.md b/website/source/docs/enterprise/index.html.md similarity index 100% rename from website/source/docs/enterprise/features.html.md rename to website/source/docs/enterprise/index.html.md diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 52e7fff45..fb21b72a7 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -336,6 +336,7 @@ Microsoft Azure (Legacy ASM) +<<<<<<< HEAD > MySQL From 8a6c68d9c07a97480e8534611b7406562b39341d Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 14:02:59 -0700 Subject: [PATCH 28/72] Converted ent index removed "Atlas" --- website/source/docs/enterprise/index.html.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/website/source/docs/enterprise/index.html.md b/website/source/docs/enterprise/index.html.md index b9c521d30..56bcabe62 100755 --- a/website/source/docs/enterprise/index.html.md +++ b/website/source/docs/enterprise/index.html.md @@ -1,13 +1,17 @@ --- -title: "Terraform Features in Atlas" +layout: "docs" +page_title: "Terraform Enterprise Features" +sidebar_current: "docs-enterprise" +description: |- +Terraform Enterprise is a tool for safely and efficiently changing infrastructure across providers. --- -# Terraform Features in Atlas +# Terraform Enterprise Features [Terraform](https://terraform.io) is a tool for safely and efficiently changing infrastructure across providers. -This is a list of features specific to Terraform that Atlas provides. +This is a list of features specific to Terraform Enterprise. - [Terraform Plans and Applies](/help/terraform/runs) - [Terraform Artifact Registry](/help/terraform/artifacts) From 80fe930abb3b11386fdc4f40a9ec47f90c2ec409 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 14:06:43 -0700 Subject: [PATCH 29/72] Converted ent index removed "Atlas" --- website/source/docs/enterprise/index.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/enterprise/index.html.md b/website/source/docs/enterprise/index.html.md index 56bcabe62..64fa4e134 100755 --- a/website/source/docs/enterprise/index.html.md +++ b/website/source/docs/enterprise/index.html.md @@ -3,7 +3,7 @@ layout: "docs" page_title: "Terraform Enterprise Features" sidebar_current: "docs-enterprise" description: |- -Terraform Enterprise is a tool for safely and efficiently changing infrastructure across providers. + Terraform Enterprise is a tool for safely and efficiently changing infrastructure across providers. --- # Terraform Enterprise Features From 9c72d7d6e5bd94546784562cef58a86b73ec5c61 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 14:14:05 -0700 Subject: [PATCH 30/72] Fixed links on ent docs index --- website/source/docs/enterprise/index.html.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/source/docs/enterprise/index.html.md b/website/source/docs/enterprise/index.html.md index 64fa4e134..9f199b4b5 100755 --- a/website/source/docs/enterprise/index.html.md +++ b/website/source/docs/enterprise/index.html.md @@ -13,7 +13,7 @@ efficiently changing infrastructure across providers. This is a list of features specific to Terraform Enterprise. -- [Terraform Plans and Applies](/help/terraform/runs) -- [Terraform Artifact Registry](/help/terraform/artifacts) -- [Terraform Remote State Storage](/help/terraform/state) -- [Terraform Run Notifications](/help/terraform/runs/notifications) +- [Terraform Plans and Applies](/docs/enterprise/runs) +- [Terraform Artifact Registry](/docs/enterprise/artifacts) +- [Terraform Remote State Storage](/docs/enterprise/state) +- [Terraform Run Notifications](/docs/enterprise/runs/notifications) From f01e5513bb3ac046bc09fc5d58c8794766088559 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 14:20:02 -0700 Subject: [PATCH 31/72] Fixed links on ent docs index --- website/source/docs/enterprise/index.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/enterprise/index.html.md b/website/source/docs/enterprise/index.html.md index 9f199b4b5..0b58a196f 100755 --- a/website/source/docs/enterprise/index.html.md +++ b/website/source/docs/enterprise/index.html.md @@ -16,4 +16,4 @@ This is a list of features specific to Terraform Enterprise. - [Terraform Plans and Applies](/docs/enterprise/runs) - [Terraform Artifact Registry](/docs/enterprise/artifacts) - [Terraform Remote State Storage](/docs/enterprise/state) -- [Terraform Run Notifications](/docs/enterprise/runs/notifications) +- [Terraform Run Notifications](/docs/enterprise/runs/notifications.html) From 8a2cfad42785c2179a1af1a8662cf10ac1704813 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 16:06:46 -0700 Subject: [PATCH 32/72] updated ent docs runs index page --- website/source/docs/enterprise/index.html.md | 2 +- .../source/docs/enterprise/runs/index.html.md | 32 +++++++++++-------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/website/source/docs/enterprise/index.html.md b/website/source/docs/enterprise/index.html.md index 0b58a196f..3b52907a4 100755 --- a/website/source/docs/enterprise/index.html.md +++ b/website/source/docs/enterprise/index.html.md @@ -8,7 +8,7 @@ description: |- # Terraform Enterprise Features -[Terraform](https://terraform.io) is a tool for safely and +[Terraform](https://www.hashicorp.com/products/terraform/) is a tool for safely and efficiently changing infrastructure across providers. This is a list of features specific to Terraform Enterprise. diff --git a/website/source/docs/enterprise/runs/index.html.md b/website/source/docs/enterprise/runs/index.html.md index 4882ebae9..d9cf178d0 100755 --- a/website/source/docs/enterprise/runs/index.html.md +++ b/website/source/docs/enterprise/runs/index.html.md @@ -1,54 +1,58 @@ --- -title: "About Terraform Runs in Atlas" +layout: "docs" +page_title: "About Terraform Enterprise Runs" +sidebar_current: "docs-enterprise-runs" +description: |- + A "run" in Atlas represents the logical grouping of two Terraform steps - a "plan" and an "apply". --- -# About Terraform Runs in Atlas +# About Terraform Enterprise Runs -A "run" in Atlas represents the logical grouping of two Terraform steps - a +A "run" represents the logical grouping of two Terraform steps - a "plan" and an "apply". The distinction between these two phases of a Terraform run are documented below. -When a [new run is created](/help/terraform/runs/starting), Atlas automatically +When a [new run is created](/docs/enterprise/runs/starting.html), Terraform Enterprise automatically queues a Terraform plan. Because a plan does not change the state of infrastructure, it is safe to execute a plan multiple times without consequence. An apply executes the output of a plan and actively changes -infrastructure. To prevent race conditions, Atlas will only execute one +infrastructure. To prevent race conditions, the platform will only execute one plan/apply at a time (plans for validating GitHub Pull Requests are allowed to happen concurrently, as they do not modify state). You can read more about Terraform plans and applies below. ## Plan -During the plan phase of a run, Atlas executes the command `terraform plan`. +During the plan phase of a run, the command `terraform plan` is executed. Terraform performs a refresh and then determines what actions are necessary to reach the desired state specified in the Terraform configuration files. A successful plan outputs an executable file that is securely stored in Atlas and may be used in the subsequent apply. -Terraform plans in Atlas do not change the state of infrastructure, so it is +Terraform plans do not change the state of infrastructure, so it is safe to execute a plan multiple times. In fact, there are a number of components -in Atlas that can trigger a Terraform plan. You can read more about this in the +that can trigger a Terraform plan. You can read more about this in the [starting runs](/help/terraform/runs/starting) section. ## Apply -During the apply phase of a run, Atlas executes the command `terraform apply` +During the apply phase of a run, the command `terraform apply` is executed with the executable result of the prior Terraform plan. This phase **can change infrastructure** by applying the changes required to reach the desired state specified in the Terraform configuration file. While Terraform plans are safe to run multiple times, Terraform applies often -change active infrastructure. Because of this, the default behavior for Atlas +change active infrastructure. Because of this, the default behavior is to require user confirmation as part of the -[Terraform run execution](/help/terraform/runs/how-runs-execute). Upon +[Terraform run execution](/docs/enterprise/runs/how-runs-execute.html). Upon user confirmation, Atlas will queue and execute the Terraform apply. It is also possible to configure Atlas to -[automatically apply](/help/terraform/runs/automatic-applies), but this option is +[automatically apply](/docs/enterprise/runs/automatic-applies.html), but this option is disabled by default. ## Environment Locking -During run execution, Atlas will lock the environment to prevent other plans +During run execution, the environment will lock to prevent other plans and applies from executing simultaneously. When the run completes, the next pending run, if any, will be started. @@ -62,5 +66,5 @@ by visiting that environment's settings page. To receive alerts when user confirmation is needed or for any other phase of the run process, you can -[enable run notifications](/help/terraform/runs/notifications) for your +[enable run notifications](/docs/enterprise/runs/notifications.html) for your organization or environment. From 98d63dbd375465b1357b31bcd7d253b88a9c6329 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 16:12:29 -0700 Subject: [PATCH 33/72] updated ent docs runs index page --- website/source/layouts/docs.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index fb21b72a7..018261ef5 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -336,7 +336,6 @@ Microsoft Azure (Legacy ASM) -<<<<<<< HEAD > MySQL @@ -547,7 +546,9 @@ > Terraform Enterprise From df3ca1f834ae7154f99a6daa10b85eab14d9f0d4 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 16:47:36 -0700 Subject: [PATCH 34/72] Runs index - fixed link --- website/source/docs/enterprise/runs/index.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/enterprise/runs/index.html.md b/website/source/docs/enterprise/runs/index.html.md index d9cf178d0..bddaea370 100755 --- a/website/source/docs/enterprise/runs/index.html.md +++ b/website/source/docs/enterprise/runs/index.html.md @@ -32,7 +32,7 @@ and may be used in the subsequent apply. Terraform plans do not change the state of infrastructure, so it is safe to execute a plan multiple times. In fact, there are a number of components that can trigger a Terraform plan. You can read more about this in the -[starting runs](/help/terraform/runs/starting) section. +[starting runs](/help/terraform/runs/starting.html) section. ## Apply From f16cc0df33d60cfc203c9b906e31181402676eb3 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Thu, 16 Mar 2017 16:48:57 -0700 Subject: [PATCH 35/72] Runs index - fixed link --- website/source/docs/enterprise/runs/index.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/enterprise/runs/index.html.md b/website/source/docs/enterprise/runs/index.html.md index bddaea370..967d5f1c7 100755 --- a/website/source/docs/enterprise/runs/index.html.md +++ b/website/source/docs/enterprise/runs/index.html.md @@ -32,7 +32,7 @@ and may be used in the subsequent apply. Terraform plans do not change the state of infrastructure, so it is safe to execute a plan multiple times. In fact, there are a number of components that can trigger a Terraform plan. You can read more about this in the -[starting runs](/help/terraform/runs/starting.html) section. +[starting runs](/docs/enterprise/runs/starting.html) section. ## Apply From 24851e11e6d0338f4bbca96a405f3fb408f391fc Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Fri, 17 Mar 2017 10:16:46 -0700 Subject: [PATCH 36/72] Added runs layout --- .../source/docs/enterprise/runs/index.html.md | 2 +- website/source/layouts/docs.erb | 5 ++ website/source/layouts/runs.erb | 62 +++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 website/source/layouts/runs.erb diff --git a/website/source/docs/enterprise/runs/index.html.md b/website/source/docs/enterprise/runs/index.html.md index 967d5f1c7..a207a5d06 100755 --- a/website/source/docs/enterprise/runs/index.html.md +++ b/website/source/docs/enterprise/runs/index.html.md @@ -1,5 +1,5 @@ --- -layout: "docs" +layout: "runs" page_title: "About Terraform Enterprise Runs" sidebar_current: "docs-enterprise-runs" description: |- diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 018261ef5..571d49d02 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -549,6 +549,11 @@ > Runs + diff --git a/website/source/layouts/runs.erb b/website/source/layouts/runs.erb new file mode 100644 index 000000000..2b500b25a --- /dev/null +++ b/website/source/layouts/runs.erb @@ -0,0 +1,62 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> From fb341acb8bf49876742f2303003d46c67159aec1 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Fri, 17 Mar 2017 10:24:19 -0700 Subject: [PATCH 37/72] Added runs layout --- website/source/layouts/runs.erb | 50 +++++---------------------------- 1 file changed, 7 insertions(+), 43 deletions(-) diff --git a/website/source/layouts/runs.erb b/website/source/layouts/runs.erb index 2b500b25a..099f4835e 100644 --- a/website/source/layouts/runs.erb +++ b/website/source/layouts/runs.erb @@ -3,54 +3,18 @@ + <% end %> + + <%= yield %> +>>>>>>> 568c35750... Added all TFE state files <% end %> diff --git a/website/source/layouts/state.erb b/website/source/layouts/state.erb new file mode 100644 index 000000000..c678c1d72 --- /dev/null +++ b/website/source/layouts/state.erb @@ -0,0 +1,28 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> From 643ac35bc32bfea15dcd9d8575ad9319f127ac96 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Fri, 17 Mar 2017 14:34:04 -0700 Subject: [PATCH 40/72] Added all TFE artifact files --- .../artifacts/artifact-provider.html.md | 15 +- .../artifacts/creating-amis.html.md | 11 +- .../docs/enterprise/artifacts/index.html.md | 17 +- .../artifacts/managing-versions.html.md | 14 +- .../source/docs/enterprise/vcs/git.html.md | 13 +- .../source/docs/enterprise/vcs/index.html.md | 14 +- website/source/layouts/artifacts.erb | 28 ++ website/source/layouts/docs.erb | 263 +----------------- website/source/layouts/vcs.erb | 22 ++ 9 files changed, 113 insertions(+), 284 deletions(-) create mode 100644 website/source/layouts/artifacts.erb create mode 100644 website/source/layouts/vcs.erb diff --git a/website/source/docs/enterprise/artifacts/artifact-provider.html.md b/website/source/docs/enterprise/artifacts/artifact-provider.html.md index ae13f8b21..0c04fe765 100755 --- a/website/source/docs/enterprise/artifacts/artifact-provider.html.md +++ b/website/source/docs/enterprise/artifacts/artifact-provider.html.md @@ -1,13 +1,18 @@ --- -title: "Atlas Artifact Provider" +layout: "artifacts" +page_title: "Artifact Provider" +sidebar_current: "docs-enterprise-Provider" +description: |- + Terraform has a provider for managing Atlas artifacts called `atlas_artifact`. --- -# Atlas Artifact Provider -Terraform has a [provider](https://terraform.io/docs/providers/index.html) for managing Atlas artifacts called `atlas_artifact`. +# Artifact Provider -This is used to make data stored in Atlas Artifacts available to +Terraform has a [provider](https://terraform.io/docs/providers/index.html) for managing Terraform Enterprise artifacts called `atlas_artifact`. + +This is used to make data stored in Artifacts available to Terraform for interpolation. In the following example, an artifact -is defined and references an AMI ID stored in Atlas. +is defined and references an AMI ID stored in Terraform Enterprise. provider "atlas" { # You can also set the atlas token by exporting diff --git a/website/source/docs/enterprise/artifacts/creating-amis.html.md b/website/source/docs/enterprise/artifacts/creating-amis.html.md index 0ea4b7333..ea68fa6c0 100755 --- a/website/source/docs/enterprise/artifacts/creating-amis.html.md +++ b/website/source/docs/enterprise/artifacts/creating-amis.html.md @@ -1,9 +1,14 @@ --- -title: "Creating AMI Artifacts with Packer and Atlas" +layout: "artifacts" +page_title: "Creating AMI Artifacts" +sidebar_current: "docs-enterprise-amis" +description: |- + Creating AMI Artifacts with Packer. --- -# Creating AMI Artifacts with Packer and Atlas + +# Creating AMI Artifacts with Packer and Terraform Enterprise Currently, the best way to create AWS AMI artifacts is with Packer. -We detail how to do this in the [Packer section of the documentation](/help/packer/artifacts/creating-amis). +We detail how to do this in the [Packer section of the documentation](https://atlas.hashicorp.com/help/packer/artifacts/creating-amis). diff --git a/website/source/docs/enterprise/artifacts/index.html.md b/website/source/docs/enterprise/artifacts/index.html.md index 03eae7789..9ec62ad1a 100755 --- a/website/source/docs/enterprise/artifacts/index.html.md +++ b/website/source/docs/enterprise/artifacts/index.html.md @@ -1,18 +1,21 @@ --- -title: "About Terraform Artifacts in Atlas" +layout: "artifacts" +page_title: "Terraform Artifacts" +sidebar_current: "docs-enterprise-artifact" +description: |- + Terraform Enterprise can be used to store artifacts for use by Terraform. Typically, artifacts are stored with Packer. --- # About Terraform Artifacts in Atlas -Atlas can be used to store artifacts for use by Terraform. Typically, -artifacts are [stored with Packer](/help/packer/artifacts). +Terraform Enterprise can be used to store artifacts for use by Terraform. Typically, +artifacts are [stored with Packer](https://packer.io/docs). -Artifacts can be used in Atlas to deploy and manage images +Artifacts can be used in to deploy and manage images of configuration. Artifacts are generic, but can be of varying types like `amazon.image`. See the Packer [`artifact_type`](https://packer.io/docs/post-processors/atlas.html#artifact_type) docs for more information. -Packer can create artifacts both while running in Atlas and out of Atlas' +Packer can create artifacts both while running in and out of Terraform Enterprise network. This is possible due to the post-processors use of the public -artifact API to store the artifacts. - +artifact API to store the artifacts. \ No newline at end of file diff --git a/website/source/docs/enterprise/artifacts/managing-versions.html.md b/website/source/docs/enterprise/artifacts/managing-versions.html.md index 894a4894a..3ec346eac 100755 --- a/website/source/docs/enterprise/artifacts/managing-versions.html.md +++ b/website/source/docs/enterprise/artifacts/managing-versions.html.md @@ -1,10 +1,14 @@ --- -title: "Managing Artifact Versions" +layout: "artifacts" +page_title: "Managing Artifact Versions" +sidebar_current: "docs-enterprise-Provider" +description: |- + Artifacts are versioned and assigned a version number, here is how to manage the versions. --- # Managing Artifact Versions -Artifacts stored in Atlas are versioned and assigned a version number. +Artifacts stored in Terraform Enterprise are versioned and assigned a version number. Versions are useful to roll back, audit and deploy images specific versions of images to certain environments in a targeted way. @@ -47,8 +51,8 @@ This will use version 7 of the `web-worker` artifact. ### Pinning Artifacts to Specific Builds -Artifacts can also be pinned to an Atlas build number. This is only -possible if Atlas was used to build the artifact with Packer. +Artifacts can also be pinned to an Terraform build number. This is only +possible if Terraform Enterprise was used to build the artifact with Packer. resource "atlas_artifact" "web-worker" { name = "%{DEFAULT_USERNAME}/web-worker" @@ -57,5 +61,5 @@ possible if Atlas was used to build the artifact with Packer. } It's recommended to use versions, instead of builds, as it will -be easier to track within Atlas and when building outside of the Atlas +be easier to track when building outside of the Terraform Enterprise environment. diff --git a/website/source/docs/enterprise/vcs/git.html.md b/website/source/docs/enterprise/vcs/git.html.md index 93254ad70..370d40477 100755 --- a/website/source/docs/enterprise/vcs/git.html.md +++ b/website/source/docs/enterprise/vcs/git.html.md @@ -1,14 +1,17 @@ --- -title: "Git Integration" +layout: "vcs" +page_title: "Git Integration" +sidebar_current: "docs-enterprise-vcs" +description: |- + Git repositories can be integrated with Terraform Enterprise by using push command. --- # Git Integation -Git repositories can be integrated with Atlas by using +Git repositories can be integrated with Terraform Enterprise by using [`terraform push`](https://www.terraform.io/docs/commands/push.html) to import Terraform configuration when changes are committed. When Terraform -configuration is imported using `terraform push` a plan is automatically queued -in Atlas. +configuration is imported using `terraform push` a plan is automatically queued. _**Note:** This integration is for Git repositories **not** hosted on GitHub. For repositories on GitHub, there is native [GitHub Integration](/help/terraform/vcs/github). @@ -36,7 +39,7 @@ repository, set the necessary variables, and ensure the script is executable. ``` #!/bin/bash # -# An example hook script to push Terraform configuration to Atlas. +# An example hook script to push Terraform configuration to Terraform Enterprise. # # Set the following variables for your project: # - ENV_NAME - your Atlas environment name (e.g. org/env) diff --git a/website/source/docs/enterprise/vcs/index.html.md b/website/source/docs/enterprise/vcs/index.html.md index c30f75198..d1b29c5f8 100755 --- a/website/source/docs/enterprise/vcs/index.html.md +++ b/website/source/docs/enterprise/vcs/index.html.md @@ -1,15 +1,19 @@ --- -title: "Integration with Version Control Software" +layout: "vcs" +page_title: "Integration with Version Control Software" +sidebar_current: "docs-enterprise-artifact" +description: |- + Terraform Enterprise can integrate with version control software Git and GitHub. --- # Integration with Version Control Software -Atlas can integrate with your version control software to automatically execute +Terraform Enterprise can integrate with your version control software to automatically execute Terraform with your latest Terraform configuration as you commit changes to source control. -Different capabilities within Atlas are available depending on the integration +Different capabilities within Terraform Enterprise are available depending on the integration in use. The available integration options are below. -- [Git](/help/terraform/vcs/git) -- [GitHub](/help/terraform/vcs/github) +- [Git](/docs/enterprise/vcs/git) +- [GitHub](/docs/enterprise/vcs/github) diff --git a/website/source/layouts/artifacts.erb b/website/source/layouts/artifacts.erb new file mode 100644 index 000000000..598e32deb --- /dev/null +++ b/website/source/layouts/artifacts.erb @@ -0,0 +1,28 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index e8d018699..f819d334e 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -550,264 +550,19 @@ > Runs - + > + State + + > + Artifacts + + > + VCS Integration + <% end %> <%= yield %> -======= - > - Nomad - - - > - NS1 - - - > - Microsoft Azure - - - > - Microsoft Azure (Legacy ASM) - - - > - MySQL - - - > - OpenStack - - - > - OpsGenie - - - > - Packet - - - > - PagerDuty - - - > - PostgreSQL - - - > - PowerDNS - - - > - ProfitBricks - - - > - RabbitMQ - - - > - Rancher - - - > - Random - - - > - Rundeck - - - > - Scaleway - - - > - SoftLayer - - - > - StatusCake - - - > - Spotinst - - - > - Template - - - > - Terraform - - - > - TLS - - - > - Triton - - - > - UltraDNS - - - > - Vault - - - > - VMware vCloud Director - - - > - VMware vSphere - - - - - > - Provisioners - - - - > - Modules - - - - > - Backends - - - - > - Plugins - - - - > - Internals - - - - > - Terraform Enterprise - - - - - - - <% end %> - - <%= yield %> ->>>>>>> 568c35750... Added all TFE state files <% end %> diff --git a/website/source/layouts/vcs.erb b/website/source/layouts/vcs.erb new file mode 100644 index 000000000..f53c51cbd --- /dev/null +++ b/website/source/layouts/vcs.erb @@ -0,0 +1,22 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> From a800616af92a0f877e6705ce94a2b5f85f5391d5 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Fri, 17 Mar 2017 14:40:42 -0700 Subject: [PATCH 41/72] Added all TFE VCS files --- .../source/docs/enterprise/vcs/github.html.md | 16 ++++++++++------ website/source/docs/enterprise/vcs/index.html.md | 2 +- website/source/layouts/vcs.erb | 5 ++++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/website/source/docs/enterprise/vcs/github.html.md b/website/source/docs/enterprise/vcs/github.html.md index e9163f9a6..e07c2622e 100755 --- a/website/source/docs/enterprise/vcs/github.html.md +++ b/website/source/docs/enterprise/vcs/github.html.md @@ -1,27 +1,31 @@ --- -title: "GitHub Integration" +layout: "vcs" +page_title: "GitHub Integration" +sidebar_current: "docs-enterprise-vcs" +description: |- + GitHub repositories can be integrated with Terraform Enterprise by using push command. --- # GitHub Integration GitHub can be used to import Terraform configuration, automatically queuing runs when changes are merged into a repository's default branch. Additionally, -plans are run when a pull request is created or updated. Atlas will update the +plans are run when a pull request is created or updated. Terraform Enterprise will update the pull request with the result of the Terraform plan providing quick feedback on proposed changes. ## Setup -Atlas environments are linked to individual GitHub repositories. However, a -single GitHub repository can be linked to multiple Atlas environments allowing +Terraform Enterprise environments are linked to individual GitHub repositories. However, a +single GitHub repository can be linked to multiple environments allowing a single set of Terraform configuration to be used across multiple environments. -Atlas environments can be linked when they're initially created using the +Environments can be linked when they're initially created using the [New Environment](https://atlas.hashicorp.com/configurations/import) process. Existing environments can be linked by setting GitHub details in their **Integrations**. -To link an Atlas environment to a GitHub repository, you need three pieces of +To link a Terraform Enterprise environment to a GitHub repository, you need three pieces of information: - **GitHub repository** - The location of the repository being imported in the diff --git a/website/source/docs/enterprise/vcs/index.html.md b/website/source/docs/enterprise/vcs/index.html.md index d1b29c5f8..756e28d82 100755 --- a/website/source/docs/enterprise/vcs/index.html.md +++ b/website/source/docs/enterprise/vcs/index.html.md @@ -1,7 +1,7 @@ --- layout: "vcs" page_title: "Integration with Version Control Software" -sidebar_current: "docs-enterprise-artifact" +sidebar_current: "docs-enterprise-vcs" description: |- Terraform Enterprise can integrate with version control software Git and GitHub. --- diff --git a/website/source/layouts/vcs.erb b/website/source/layouts/vcs.erb index f53c51cbd..bf2d0d3dd 100644 --- a/website/source/layouts/vcs.erb +++ b/website/source/layouts/vcs.erb @@ -10,7 +10,10 @@ VCS Integration From d6a5c027ca4f9c401e61c9bb4bcc5a0e6f6afa6e Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Mon, 20 Mar 2017 11:44:03 -0700 Subject: [PATCH 42/72] TFE Docs text/spelling changes --- .../artifacts/artifact-provider.html.md | 4 +- .../artifacts/creating-amis.html.md | 2 +- .../docs/enterprise/artifacts/index.html.md | 2 +- .../artifacts/managing-versions.html.md | 4 +- website/source/docs/enterprise/index.html.md | 2 +- .../enterprise/runs/automatic-applies.html.md | 5 +- .../enterprise/runs/how-runs-execute.html.md | 9 ++- .../source/docs/enterprise/runs/index.html.md | 8 +-- .../enterprise/runs/scheduling-runs.html.md | 6 +- .../docs/enterprise/runs/starting.html.md | 57 +++++++++---------- .../runs/variables-and-configuration.html.md | 6 +- .../enterprise/state/collaborating.html.md | 2 +- .../docs/enterprise/state/index.html.md | 4 +- .../source/docs/enterprise/vcs/git.html.md | 10 ++-- .../source/docs/enterprise/vcs/github.html.md | 2 +- .../source/docs/enterprise/vcs/index.html.md | 4 +- website/source/layouts/artifacts.erb | 4 +- website/source/layouts/runs.erb | 2 +- 18 files changed, 64 insertions(+), 69 deletions(-) diff --git a/website/source/docs/enterprise/artifacts/artifact-provider.html.md b/website/source/docs/enterprise/artifacts/artifact-provider.html.md index 0c04fe765..fc6aa94b1 100755 --- a/website/source/docs/enterprise/artifacts/artifact-provider.html.md +++ b/website/source/docs/enterprise/artifacts/artifact-provider.html.md @@ -1,9 +1,9 @@ --- layout: "artifacts" page_title: "Artifact Provider" -sidebar_current: "docs-enterprise-Provider" +sidebar_current: "docs-enterprise-artifact-provider" description: |- - Terraform has a provider for managing Atlas artifacts called `atlas_artifact`. + Terraform has a provider for managing artifacts called `atlas_artifact`. --- # Artifact Provider diff --git a/website/source/docs/enterprise/artifacts/creating-amis.html.md b/website/source/docs/enterprise/artifacts/creating-amis.html.md index ea68fa6c0..972bc8eee 100755 --- a/website/source/docs/enterprise/artifacts/creating-amis.html.md +++ b/website/source/docs/enterprise/artifacts/creating-amis.html.md @@ -1,7 +1,7 @@ --- layout: "artifacts" page_title: "Creating AMI Artifacts" -sidebar_current: "docs-enterprise-amis" +sidebar_current: "docs-enterprise-artifact-amis" description: |- Creating AMI Artifacts with Packer. --- diff --git a/website/source/docs/enterprise/artifacts/index.html.md b/website/source/docs/enterprise/artifacts/index.html.md index 9ec62ad1a..799ee7e1a 100755 --- a/website/source/docs/enterprise/artifacts/index.html.md +++ b/website/source/docs/enterprise/artifacts/index.html.md @@ -6,7 +6,7 @@ description: |- Terraform Enterprise can be used to store artifacts for use by Terraform. Typically, artifacts are stored with Packer. --- -# About Terraform Artifacts in Atlas +# About Terraform Artifacts Terraform Enterprise can be used to store artifacts for use by Terraform. Typically, artifacts are [stored with Packer](https://packer.io/docs). diff --git a/website/source/docs/enterprise/artifacts/managing-versions.html.md b/website/source/docs/enterprise/artifacts/managing-versions.html.md index 3ec346eac..ad295c3d0 100755 --- a/website/source/docs/enterprise/artifacts/managing-versions.html.md +++ b/website/source/docs/enterprise/artifacts/managing-versions.html.md @@ -1,7 +1,7 @@ --- layout: "artifacts" page_title: "Managing Artifact Versions" -sidebar_current: "docs-enterprise-Provider" +sidebar_current: "docs-enterprise-artifact-versions" description: |- Artifacts are versioned and assigned a version number, here is how to manage the versions. --- @@ -12,7 +12,7 @@ Artifacts stored in Terraform Enterprise are versioned and assigned a version nu Versions are useful to roll back, audit and deploy images specific versions of images to certain environments in a targeted way. -This assumes you are familiar with the [Atlas artifact provider](https://terraform.io/docs/providers/atlas/index.html) +This assumes you are familiar with the [artifact provider](https://terraform.io/docs/providers/atlas/index.html) in Terraform. ### Finding the Version of an Artifact diff --git a/website/source/docs/enterprise/index.html.md b/website/source/docs/enterprise/index.html.md index 3b52907a4..3fb6eddf3 100755 --- a/website/source/docs/enterprise/index.html.md +++ b/website/source/docs/enterprise/index.html.md @@ -8,7 +8,7 @@ description: |- # Terraform Enterprise Features -[Terraform](https://www.hashicorp.com/products/terraform/) is a tool for safely and +[Terraform Enterprise](https://www.hashicorp.com/products/terraform/) is a tool for safely and efficiently changing infrastructure across providers. This is a list of features specific to Terraform Enterprise. diff --git a/website/source/docs/enterprise/runs/automatic-applies.html.md b/website/source/docs/enterprise/runs/automatic-applies.html.md index 5536cab41..c67c4ce80 100755 --- a/website/source/docs/enterprise/runs/automatic-applies.html.md +++ b/website/source/docs/enterprise/runs/automatic-applies.html.md @@ -14,7 +14,7 @@ description: |- -Atlas can optionally automatically apply successful Terraform plans to your +You can automatically apply successful Terraform plans to your infrastructure. This option is disabled by default and can be enabled by an organization owner on a per-environment basis. @@ -28,7 +28,6 @@ organization owner on a per-environment basis. ## Enabling Auto-Apply -To enable auto-apply for an environment, visit the environment settings page in -Atlas and check the box labeled "auto apply" and click the save button to +To enable auto-apply for an environment, visit the environment settings page check the box labeled "auto apply" and click the save button to persist the changes. The next successful Terraform plan for the environment will automatically apply without user confirmation. diff --git a/website/source/docs/enterprise/runs/how-runs-execute.html.md b/website/source/docs/enterprise/runs/how-runs-execute.html.md index 3a01bf7e3..505418f41 100755 --- a/website/source/docs/enterprise/runs/how-runs-execute.html.md +++ b/website/source/docs/enterprise/runs/how-runs-execute.html.md @@ -16,7 +16,7 @@ runs. ## Steps of Execution 1. A set of Terraform configuration and directory of files is uploaded via Terraform Push or GitHub -2. Atlas creates a version of the Terraform configuration and waits for the upload +2. Terraform Enterprise creates a version of the Terraform configuration and waits for the upload to complete. At this point, the version will be visible in the UI even if the upload has not completed 3. Once the upload finishes, Terraform Enterprise creates a run and queues a `terraform plan` @@ -48,12 +48,11 @@ These are: - The directory that contains your environment's Terraform configuration can be customized to support directory structures with more than one set of Terraform configuration files. To customize the directory for your Environment, set the _Terraform Directory_ -property in the _GitHub Integration_ settings for your environment. This is equivalent to +property in the [_GitHub Integration_](/docs/enterprise/vcs/github.html) settings for your environment. This is equivalent to passing the `[dir]` argument when running Terraform in your local shell. - The directory in which Terraform is executed from can be customized to support directory structures with nested sub-directories or configurations that use Terraform modules with -relative paths. To customize the directory used for Terraform execution in your -Environment, set the `TF_ATLAS_DIR` -[environment variable](/docs/enterprise/runs/variables-and-configuration#environment-variables) +relative paths. To customize the directory used for Terraform execution in your Environment, set the `TF_ATLAS_DIR` +[environment variable](/docs/enterprise/runs/variables-and-configuration.html#environment-variables) to the relative path of the directory - ie. `terraform/production`. This is equivalent to changing directories to the appropriate path in your local shell and then executing Terraform. diff --git a/website/source/docs/enterprise/runs/index.html.md b/website/source/docs/enterprise/runs/index.html.md index a207a5d06..628ba26f8 100755 --- a/website/source/docs/enterprise/runs/index.html.md +++ b/website/source/docs/enterprise/runs/index.html.md @@ -26,7 +26,7 @@ Terraform plans and applies below. During the plan phase of a run, the command `terraform plan` is executed. Terraform performs a refresh and then determines what actions are necessary to reach the desired state specified in the Terraform configuration files. A -successful plan outputs an executable file that is securely stored in Atlas +successful plan outputs an executable file that is securely stored in Terrafrom Enterprise and may be used in the subsequent apply. Terraform plans do not change the state of infrastructure, so it is @@ -45,9 +45,9 @@ While Terraform plans are safe to run multiple times, Terraform applies often change active infrastructure. Because of this, the default behavior is to require user confirmation as part of the [Terraform run execution](/docs/enterprise/runs/how-runs-execute.html). Upon -user confirmation, Atlas will queue and execute the Terraform apply. It is also -possible to configure Atlas to -[automatically apply](/docs/enterprise/runs/automatic-applies.html), but this option is +user confirmation, the Terraform apply will be queued and executed. It is also +possible to configure +[automatic applies](/docs/enterprise/runs/automatic-applies.html), but this option is disabled by default. ## Environment Locking diff --git a/website/source/docs/enterprise/runs/scheduling-runs.html.md b/website/source/docs/enterprise/runs/scheduling-runs.html.md index e55cdd67a..3f89bac25 100755 --- a/website/source/docs/enterprise/runs/scheduling-runs.html.md +++ b/website/source/docs/enterprise/runs/scheduling-runs.html.md @@ -37,6 +37,6 @@ persist the changes. An initial plan may immediately run, depending on the state of your environment, and then will automatically plan at the specified interval. -If you have manually run a plan separately, Atlas will not queue a new -plan until the alloted time after the manual plan ran. This means that -Atlas simply ensures that a plan has been executed at the specified schedule. +If you have manually run a plan separately, a new +plan will not be queued until the allotted time after the manual plan ran. This means that +the platform simply ensures that a plan has been executed at the specified schedule. diff --git a/website/source/docs/enterprise/runs/starting.html.md b/website/source/docs/enterprise/runs/starting.html.md index 9d71bd0c4..032291904 100755 --- a/website/source/docs/enterprise/runs/starting.html.md +++ b/website/source/docs/enterprise/runs/starting.html.md @@ -7,13 +7,13 @@ description: |- --- -# Starting Terraform Runs in Atlas +# Starting Terraform Runs -There are a variety of ways to queue a Terraform run in Atlas. In addition to -`terraform push`, you can connect your [environment](/help/glossary#environment) -to GitHub and have Atlas queue Terraform runs based on new commits. Atlas can +There are a variety of ways to queue a Terraform run in Terraform Enterprise. In addition to +`terraform push`, you can connect your environment +to GitHub and runs based on new commits. You can also intelligently queue new runs when linked artifacts are uploaded or changed. -Remember from the [previous section about Terraform runs](/help/terraform/runs) +Remember from the [previous section about Terraform runs](/docs/enterprise/runs) that it is safe to trigger many plans without consequence since Terraform plans do not change infrastructure. @@ -21,8 +21,8 @@ do not change infrastructure. ## Terraform Push Terraform `push` is a [Terraform command](https://terraform.io/docs/commands/push.html) -that packages and uploads a set of Terraform configuration and directory to Atlas. This then creates a run -in Atlas, which performs `terraform plan` and `terraform apply` against the uploaded +that packages and uploads a set of Terraform configuration and directory to the platform. This then creates a run +which performs `terraform plan` and `terraform apply` against the uploaded configuration. The directory is included in order to run any associated provisioners, @@ -32,8 +32,8 @@ that executes a shell script. By default, everything in your directory is uploaded as part of the push. However, it's not always the case that the entire directory should be uploaded. Often, -temporary or cache directories and files like `.git`, `.tmp` will be included by default. This -can cause Atlas to fail at certain sizes and should be avoided. You can +temporary or cache directories and files like `.git`, `.tmp` will be included by default, which +can cause failures at certain sizes and should be avoided. You can specify [exclusions](https://terraform.io/docs/commands/push.html) to avoid this situation. Terraform also allows for a [VCS option](https://terraform.io/docs/commands/push.html#_vcs_true) @@ -46,14 +46,14 @@ basically does a `git ls-files`. Optionally, GitHub can be used to import Terraform configuration. When used within an organization, this can be extremely valuable for keeping differences -in environments and last mile changes from occurring before an upload to Atlas. +in environments and last mile changes from occurring before an upload. -After you have [connected your GitHub account to Atlas](/settings/connections), -you can connect your [environment](/help/glossary#environment) to the target -GitHub repository. The GitHub repository will be linked to the Atlas Terraform -configuration, and GitHub will start sending webhooks to Atlas. Certain +After you have [connected your GitHub account to Terraform Enterprise](/docs/enterprise/vcs/github.html), +you can connect your environment to the target +GitHub repository. The GitHub repository will be linked to the Terraform Enterprise +configuration, and GitHub will start sending webhooks. Certain GitHub webhook events, detailed below, will cause the repository to be -automatically ingressed into Atlas and stored, along with references to the +automatically ingressed into Terraform and stored, along with references to the GitHub commits and authorship information. Currently, an environment must already exist to be connected to GitHub. You can @@ -75,7 +75,7 @@ Supported GitHub webhook events: - ingress when a tag is created - ingress when the default branch is updated - note: the default branch is either configured on your configuration's - integrations tab in Atlas, or if that is blank it is the GitHub + integrations tab, or if that is blank it is the GitHub repository's default branch - create (off by default) - ingress when a tag is created @@ -84,35 +84,32 @@ Supported GitHub webhook events: ## Artifact Uploads -Upon successful completion of a Terraform run, Atlas parses the remote state and -detects any [Atlas artifacts](/help/terraform/artifacts/artifact-provider) that -were referenced. When new versions of those referenced artifacts are uploaded -to Atlas, you have the option to automatically queue a new Terraform run. +Upon successful completion of a Terraform run,the remote state is parsed and +any [artifacts](/docs/enterprise/artifacts/artifact-provider.html) are detected that +were referenced. When new versions of those referenced artifacts are uploaded, you have the option to automatically queue a new Terraform run. For example, consider the following Terraform configuration which references an -Atlas artifact named "worker": +artifact named "worker": resource "aws_instance" "worker" { ami = "${atlas_artifact.worker.metadata_full.region-us-east-1}" instance_type = "m1.small" } -When a new version of the Atlas artifact "worker" is uploaded either manually -or as the output of a [Packer build](/help/packer/builds/starting.html), Atlas -can automatically trigger a Terraform plan with this new artifact version. +When a new version of the and artifact "worker" is uploaded either manually +or as the output of a [Packer build](https://atlas.hashicorp.com/help/packer/builds/starting), a Terraform plan can be automatically triggered with this new artifact version. You can enable this feature on a per-environment basis from the -[environment](/help/glossary#environment) settings page in Atlas. +environment settings page. Combined with -[Terraform auto apply](/help/terraform/runs/automatic-applies), you can -continuously deliver infrastructure using Terraform and Atlas. +[Terraform auto apply](/docs/enterprise/runs/automatic-applies.html), you can +continuously deliver infrastructure using Terraform and Terraform Enterprise. ## Terraform Plugins If you are using a custom [Terraform Plugin](https://www.terraform.io/docs/plugins/index.html) binary for a provider or provisioner that's not currently in a released -version of Terraform, you can still use this in Atlas. +version of Terraform, you can still use this in Terraform Enterprise. All you need to do is include a Linux AMD64 binary for the plugin in the -directory in which Terraform commands are run from; Atlas will then use -the plugin the next time you `terraform push` or ingress from GitHub. +directory in which Terraform commands are run from; it will then be used next time you `terraform push` or ingress from GitHub. diff --git a/website/source/docs/enterprise/runs/variables-and-configuration.html.md b/website/source/docs/enterprise/runs/variables-and-configuration.html.md index 1968fcd3d..b5f51bbb7 100755 --- a/website/source/docs/enterprise/runs/variables-and-configuration.html.md +++ b/website/source/docs/enterprise/runs/variables-and-configuration.html.md @@ -1,7 +1,7 @@ --- layout: "runs" page_title: "Runs: Variables and Configuration" -sidebar_current: "docs-enterprise-runs-schedule" +sidebar_current: "docs-enterprise-runs-variables" description: |- How to configure runs and their variables. --- @@ -18,7 +18,7 @@ define the parameterization of Terraform configurations and are important for sharing and removal of sensitive secrets from version control. Variables are sent with the `terraform push` command. Any variables in your local -`.tfvars` files are securely uploaded. Once variables are uploaded, Terraform will prefer the Atlas-stored variables over any changes you +`.tfvars` files are securely uploaded. Once variables are uploaded, Terraform will prefer the stored variables over any changes you make locally. Please refer to the [Terraform push documentation](https://www.terraform.io/docs/commands/push.html) for more information. @@ -92,7 +92,7 @@ Set the [variables](https://www.terraform.io/docs/configuration/variables.html) } } -`terraform push` any "Terraform Variables" to Atlas: +`terraform push` any "Terraform Variables": $ terraform push -name $ATLAS_USERNAME/example -var "private_key=$MY_PRIVATE_KEY" diff --git a/website/source/docs/enterprise/state/collaborating.html.md b/website/source/docs/enterprise/state/collaborating.html.md index 3f01bcfa4..9130de266 100755 --- a/website/source/docs/enterprise/state/collaborating.html.md +++ b/website/source/docs/enterprise/state/collaborating.html.md @@ -8,7 +8,7 @@ description: |- # Collaborating on Terraform Remote State -Atlas is one of a few options to store [remote state](/docs/enterprise/state). +Terraform Enterprise is one of a few options to store [remote state](/docs/enterprise/state). Remote state gives you the ability to version and collaborate on Terraform changes. It stores information about the changes Terraform makes based on configuration. diff --git a/website/source/docs/enterprise/state/index.html.md b/website/source/docs/enterprise/state/index.html.md index 90dd81abf..cd49db80d 100755 --- a/website/source/docs/enterprise/state/index.html.md +++ b/website/source/docs/enterprise/state/index.html.md @@ -14,11 +14,11 @@ named `terraform.tfstate`, but it can also be stored remotely, which works better in a team environment. Terraform Enterprise is a remote state provider, allowing you to store, version and -collaborate on state with Atlas. +collaborate on states. Remote state gives you more than just easier version control and safer storage. It also allows you to delegate the outputs to other teams. This allows your infrastructure to be more easily broken down into components that multiple teams can access. -Read [more about remote state](https://www.terraform.io/docs/state/remote/index.html). +Read [more about remote state](https://www.terraform.io/docs/state/remote.html). diff --git a/website/source/docs/enterprise/vcs/git.html.md b/website/source/docs/enterprise/vcs/git.html.md index 370d40477..3aa50501b 100755 --- a/website/source/docs/enterprise/vcs/git.html.md +++ b/website/source/docs/enterprise/vcs/git.html.md @@ -1,7 +1,7 @@ --- layout: "vcs" page_title: "Git Integration" -sidebar_current: "docs-enterprise-vcs" +sidebar_current: "docs-enterprise-vcs-git" description: |- Git repositories can be integrated with Terraform Enterprise by using push command. --- @@ -14,7 +14,7 @@ Terraform configuration when changes are committed. When Terraform configuration is imported using `terraform push` a plan is automatically queued. _**Note:** This integration is for Git repositories **not** hosted on GitHub. -For repositories on GitHub, there is native [GitHub Integration](/help/terraform/vcs/github). +For repositories on GitHub, there is native [GitHub Integration](/docs/enterprise/vcs/github.html). ## Setup @@ -42,7 +42,7 @@ repository, set the necessary variables, and ensure the script is executable. # An example hook script to push Terraform configuration to Terraform Enterprise. # # Set the following variables for your project: -# - ENV_NAME - your Atlas environment name (e.g. org/env) +# - ENV_NAME - your environment name (e.g. org/env) # - TERRAFORM_DIR - the local directory to push # - DEFAULT_BRANCH - the branch to push. Other branches will be ignored. @@ -58,10 +58,10 @@ fi current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') if [ "$current_branch" == "$DEFAULT_BRANCH" ]; then - echo "pre-push hook: Pushing branch [$current_branch] to Atlas environment [$ENV_NAME]." + echo "pre-push hook: Pushing branch [$current_branch] to environment [$ENV_NAME]." terraform push -name="$ENV_NAME" $TERRAFORM_DIR else - echo "pre-push hook: NOT pushing branch [$current_branch] to Atlas environment [$ENV_NAME]." + echo "pre-push hook: NOT pushing branch [$current_branch] to environment [$ENV_NAME]." fi ``` diff --git a/website/source/docs/enterprise/vcs/github.html.md b/website/source/docs/enterprise/vcs/github.html.md index e07c2622e..2baeb9cfe 100755 --- a/website/source/docs/enterprise/vcs/github.html.md +++ b/website/source/docs/enterprise/vcs/github.html.md @@ -1,7 +1,7 @@ --- layout: "vcs" page_title: "GitHub Integration" -sidebar_current: "docs-enterprise-vcs" +sidebar_current: "docs-enterprise-vcs-github" description: |- GitHub repositories can be integrated with Terraform Enterprise by using push command. --- diff --git a/website/source/docs/enterprise/vcs/index.html.md b/website/source/docs/enterprise/vcs/index.html.md index 756e28d82..ceb2542dd 100755 --- a/website/source/docs/enterprise/vcs/index.html.md +++ b/website/source/docs/enterprise/vcs/index.html.md @@ -15,5 +15,5 @@ source control. Different capabilities within Terraform Enterprise are available depending on the integration in use. The available integration options are below. -- [Git](/docs/enterprise/vcs/git) -- [GitHub](/docs/enterprise/vcs/github) +- [Git](/docs/enterprise/vcs/git.html) +- [GitHub](/docs/enterprise/vcs/github.html) diff --git a/website/source/layouts/artifacts.erb b/website/source/layouts/artifacts.erb index 598e32deb..c6b73e461 100644 --- a/website/source/layouts/artifacts.erb +++ b/website/source/layouts/artifacts.erb @@ -7,7 +7,7 @@ > - Artifact + Artifact diff --git a/website/source/layouts/runs.erb b/website/source/layouts/runs.erb index 16f2e05ff..4b98fe356 100644 --- a/website/source/layouts/runs.erb +++ b/website/source/layouts/runs.erb @@ -15,7 +15,7 @@ > Automatic Applies - > + > Scheduling Runs > From c7f8db3dbae662f770bd6ea4e73e8b962d07fe88 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Tue, 21 Mar 2017 14:24:29 -0700 Subject: [PATCH 43/72] added TFE faq, billing, api, organizations --- .../api/configuration-versions.html.md | 80 +++++++ .../enterprise/api/configurations.html.md | 65 ++++++ .../docs/enterprise/api/environments.html.md | 63 ++++++ .../source/docs/enterprise/api/index.html.md | 97 ++++++++ .../source/docs/enterprise/api/runs.html.md | 47 ++++ .../source/docs/enterprise/api/states.html.md | 48 ++++ .../source/docs/enterprise/api/users.html.md | 28 +++ .../docs/enterprise/billing/index.html.md | 51 +++++ .../source/docs/enterprise/faq/index.html.md | 13 ++ .../faq/monolithic-artifacts.html.md | 149 +++++++++++++ .../faq/rolling-deployments.html.md | 80 +++++++ .../docs/enterprise/glossary/index.html.md | 208 ++++++++++++++++++ .../authentication-policy.html.md | 22 ++ .../enterprise/organizations/create.html.md | 19 ++ .../organizations/credit-card.html.md | 13 ++ .../enterprise/organizations/index.html.md | 17 ++ .../enterprise/organizations/migrate.html.md | 27 +++ .../enterprise/organizations/trials.html.md | 13 ++ .../user-accounts/authentication.html.md | 70 ++++++ .../enterprise/user-accounts/index.html.md | 13 ++ .../enterprise/user-accounts/recovery.html.md | 14 ++ website/source/layouts/accounts.erb | 25 +++ website/source/layouts/docs.erb | 16 +- website/source/layouts/faq.erb | 25 +++ website/source/layouts/organizations.erb | 34 +++ 25 files changed, 1236 insertions(+), 1 deletion(-) create mode 100755 website/source/docs/enterprise/api/configuration-versions.html.md create mode 100755 website/source/docs/enterprise/api/configurations.html.md create mode 100755 website/source/docs/enterprise/api/environments.html.md create mode 100755 website/source/docs/enterprise/api/index.html.md create mode 100755 website/source/docs/enterprise/api/runs.html.md create mode 100755 website/source/docs/enterprise/api/states.html.md create mode 100755 website/source/docs/enterprise/api/users.html.md create mode 100755 website/source/docs/enterprise/billing/index.html.md create mode 100755 website/source/docs/enterprise/faq/index.html.md create mode 100755 website/source/docs/enterprise/faq/monolithic-artifacts.html.md create mode 100755 website/source/docs/enterprise/faq/rolling-deployments.html.md create mode 100755 website/source/docs/enterprise/glossary/index.html.md create mode 100755 website/source/docs/enterprise/organizations/authentication-policy.html.md create mode 100755 website/source/docs/enterprise/organizations/create.html.md create mode 100755 website/source/docs/enterprise/organizations/credit-card.html.md create mode 100755 website/source/docs/enterprise/organizations/index.html.md create mode 100755 website/source/docs/enterprise/organizations/migrate.html.md create mode 100755 website/source/docs/enterprise/organizations/trials.html.md create mode 100755 website/source/docs/enterprise/user-accounts/authentication.html.md create mode 100755 website/source/docs/enterprise/user-accounts/index.html.md create mode 100755 website/source/docs/enterprise/user-accounts/recovery.html.md create mode 100644 website/source/layouts/accounts.erb create mode 100644 website/source/layouts/faq.erb create mode 100644 website/source/layouts/organizations.erb diff --git a/website/source/docs/enterprise/api/configuration-versions.html.md b/website/source/docs/enterprise/api/configuration-versions.html.md new file mode 100755 index 000000000..76150ff72 --- /dev/null +++ b/website/source/docs/enterprise/api/configuration-versions.html.md @@ -0,0 +1,80 @@ +--- +title: "Build Configuration Versions API" +--- + +# Configuration Versions API + +A configuration version represents versions of Terrraform configuration. +Each set of changes to Terraform HCL files or the scripts +used in the files should have an associated configuration version. + +When creating versions via the API, the variables attribute can be sent +to include the necessary variables for the Terraform configuration. + +### Configuration Version Attributes + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
variablesA key/value map of Terraform variables to be associated + with the configuration version.No
metadataA hash of key value metadata pairs.No
+ +### Actions + +The following actions can be perfomed on this resource. + +
+
Create
+
POST /api/v1/terraform/configurations/:username/:name/versions
+
Upload progress
+
GET /api/v1/terraform/configurations/:username/:name/versions/progress/:token
+
+ +### Examples + +#### Creating a configuration version + +Creates a configuration with the provided attributes. + + $ cat version.json + { + "version": { + "metadata": { + "git_branch": "master", + "remote_type": "atlas", + "remote_slug": "hashicorp/atlas" + }, + "variables": { + "ami_id": "ami-123456", + "target_region": "us-east-1", + "consul_count": "5", + "consul_ami": "ami-123456" + } + } + } + + $ curl %{ATLAS_URL}/api/v1/terraform/configurations/%{DEFAULT_USERNAME}/test/versions \ + -X POST \ + -H "X-Atlas-Token: $ATLAS_TOKEN" \ + -H "Content-Type: application/json" \ + -d @version.json + +#### Retrieving the progress of an upload for a configuration version + +Returns upload progress for the version. + + $ curl %{ATLAS_URL}/api/v1/terraform/configurations/%{DEFAULT_USERNAME}/test/versions/progress/63fc7e18-3911-4853-8b17-7fdc28f158f2 \ + -H "X-Atlas-Token: $ATLAS_TOKEN" diff --git a/website/source/docs/enterprise/api/configurations.html.md b/website/source/docs/enterprise/api/configurations.html.md new file mode 100755 index 000000000..8fcdb1a3a --- /dev/null +++ b/website/source/docs/enterprise/api/configurations.html.md @@ -0,0 +1,65 @@ +--- +title: "Terraform Configuration API" +--- + +# Terraform Configuration API + +A configuration respresents settings associated with a resource that +runs Terraform with versions of Terraform configuration. + +Configurations have many [configuration versions](/help/api/terraform/configuration-versions) +which represent versions of Terraform configuration templates and other associated +configuration. + +### Configuration Attributes + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
nameThe name of the configuration, used to identify it. It + has a maximum length of 50 characters and must contain only + letters, numbers, dashes, underscores or periods.Yes
usernameThe username to assign the configuration to. You must be a member of the + organization and have the ability to create the resource.Yes
+ +### Actions + +The following actions can be perfomed on this resource. + +
+
Show
+
GET /api/v1/terraform/configurations/:username/:name/versions/latest
+
Create
+
POST /api/v1/terraform/configurations
+
+ +### Examples + +#### Creating a configuration + +Creates a configuration with the provided attributes. + + $ curl %{ATLAS_URL}/api/v1/terraform/configurations \ + -X POST \ + -H "X-Atlas-Token: $ATLAS_TOKEN" \ + -d configuration[name]='test' \ + -d configuration[username]='%{DEFAULT_USERNAME}' + +#### Retrieving a configuration + +Returns the JSON respresentation of the latest configuration. + + $ curl %{ATLAS_URL}/api/v1/terraform/configurations/%{DEFAULT_USERNAME}/test/versions/latest \ + -H "X-Atlas-Token: $ATLAS_TOKEN" diff --git a/website/source/docs/enterprise/api/environments.html.md b/website/source/docs/enterprise/api/environments.html.md new file mode 100755 index 000000000..82a967f91 --- /dev/null +++ b/website/source/docs/enterprise/api/environments.html.md @@ -0,0 +1,63 @@ +--- +title: "Environments API" +--- + +# Environments API + +Environments represent running infrastructure managed by Terraform. + +Environments can also be connected to Consul clusters. +This documentation covers the environment interactions with Terraform. + +### Environment Attributes + + + + + + + + + + + + +
AttributeDescriptionRequired
variablesA key/value map of Terraform variables to be updated. Existing + variables will only be removed when their value is empty. Varaibles + of the same key will be overwritten.Yes
+ +
+
+ Note: Only string variables can be updated via the API currently. + Creating or updating HCL variables is not yet supported. +
+
+ +### Actions + +The following actions can be perfomed on this resource. + +
+
Update variables
+
PUT /api/v1/enviromments/:username/:name/variables
+
+ +### Examples + +#### Updating Terraform variables + +Updates the Terraform variables for an environment. Due to the sensitive nature +of variables, they will not returned on success. + + $ cat variables.json + { + "variables": { + "desired_capacity": "15", + "foo": "bar" + } + } + $ curl %{ATLAS_URL}/api/v1/environments/%{DEFAULT_USERNAME}/test/variables \ + -X PUT \ + -H 'Content-Type: application/json' \ + -d @variables.json \ + -H "X-Atlas-Token: $ATLAS_TOKEN" diff --git a/website/source/docs/enterprise/api/index.html.md b/website/source/docs/enterprise/api/index.html.md new file mode 100755 index 000000000..ff5c6d1aa --- /dev/null +++ b/website/source/docs/enterprise/api/index.html.md @@ -0,0 +1,97 @@ +--- +title: "Atlas API Documentation" +--- + +# Atlas API Documentation + +Atlas provides an API for a **subset of features** available. For questions +or requests for new API features please email [support@hashicorp.com](mailto:support@hashicorp.com). + +## Available Endpoints + +These are the currently supported API endpoints for each product: + +### Vagrant + +- [Boxes](/help/api/vagrant/boxes) +- [Box Versions](/help/api/vagrant/box-versions) +- [Box Providers](/help/api/vagrant/box-providers) + +### Packer + +- [Build configurations](/help/api/packer/build-configurations) +- [Build configuration versions](/help/api/packer/build-configuration-versions) +- [Builds](/help/api/packer/builds) + +### Terraform + +- [Environments](/help/api/terraform/environments) +- [Runs](/help/api/terraform/runs) +- [States](/help/api/terraform/states) + +## Authentication + +All requests must be authenticated with an `X-Atlas-Token` HTTP header. This +token can be generated or revoked on the [account tokens page](/settings/tokens). +Your token will have access to all resources your account has access to. + +For organization level resources, we recommend creating a separate user account +that can be added to the organization with the specific privilege level +required. + +## Response Codes + +Standard HTTP response codes are returned. `404 Not Found` +codes are returned for all resources that a user does not have access to, +as well as for resources that don't exist. This is done to avoid a +potential attacker discovering the existence of a resource. + +## Errors + +Errors are returned in JSON format: + + { + "errors": { + "name": [ + "has already been taken" + ] + } + } + +## Versioning + +The API currently resides under the `/v1` prefix. Future APIs +will increment this version leaving the `/v1` API intact, though +in the future certain features may be deprecated. In that case, +ample notice to migrate to the new API will be provided. + +## Content Type + +The API accepts namespaced attributes in either +JSON or `application/x-www-form-urlencoded`. We recommend +using JSON, but for simplicity form style requests are supported. + +Below is an equivalent example with both styles using `curl`. + +### JSON Request Example + + $ cat variables.json + { + "variables": { + "desired_capacity": "15", + "foo": "bar" + } + } + $ curl %{ATLAS_URL}/api/v1/environments/%{DEFAULT_USERNAME}/test/variables \ + -X PUT \ + -H 'Content-Type: application/json' \ + -d @variables.json \ + -H "X-Atlas-Token: $ATLAS_TOKEN" + +### Form URL Encoded Example + + $ curl %{ATLAS_URL}/api/v1/environments/%{DEFAULT_USERNAME}/test/variables \ + -X PUT \ + -d variables[foo]='bar' \ + -d variables[desired_capacity]='15' \ + -H "X-Atlas-Token: $ATLAS_TOKEN" diff --git a/website/source/docs/enterprise/api/runs.html.md b/website/source/docs/enterprise/api/runs.html.md new file mode 100755 index 000000000..70d134498 --- /dev/null +++ b/website/source/docs/enterprise/api/runs.html.md @@ -0,0 +1,47 @@ +--- +title: "Runs API" +--- + +# Runs API + +Runs in Atlas represents a two step Terraform plan and a subsequent apply. + +Runs are queued under [environments](/help/api/terraform/environments) +and require a two-step confirmation workflow. However, environments +can be configured to auto-apply to avoid this. + +### Run Attributes + + + + + + + + + + + + +
AttributeDescriptionRequired
destroyIf set to true, this run will be a destroy plan.No
+ +### Actions + +The following actions can be perfomed on this resource. + +
+
Queue a run
+
POST /api/v1/enviromments/:username/:name/plan
+
+ +### Examples + +#### Queueing a new run + +Starts a new run (plan) in the environment. Requires a configuration +version to be present on the environment to succeed, but will otherwise 404. + + $ curl %{ATLAS_URL}/api/v1/environments/%{DEFAULT_USERNAME}/test/plan \ + -X POST \ + -d "" \ + -H "X-Atlas-Token: $ATLAS_TOKEN" diff --git a/website/source/docs/enterprise/api/states.html.md b/website/source/docs/enterprise/api/states.html.md new file mode 100755 index 000000000..5e77d624d --- /dev/null +++ b/website/source/docs/enterprise/api/states.html.md @@ -0,0 +1,48 @@ +--- +title: "State API" +--- + +# State API + +State represents the status of your infrastructure at the last time Terraform was run. States can be pushed to Atlas from Terraform's CLI after an apply is done locally, or state is automatically stored in Atlas if the apply is done in Atlas. + +### State Attributes + + + + + + + + + + + + +
AttributeDescriptionRequired
usernameIf supplied, only return states belonging to the organization with this username.No
+ +### Actions + +The following actions can be perfomed on this resource. + +
+
Get a list of states accessible to a user
+
GET /api/v1/terraform/state
+
+ +### Examples + +#### Getting a list of Terraform states + + $ curl %{ATLAS_URL}/api/v1/terraform/state \ + -H "X-Atlas-Token: $ATLAS_TOKEN" + +#### Getting a list of Terraform states for an organization + + $ curl %{ATLAS_URL}/api/v1/terraform/state?username=acme_inc \ + -H "X-Atlas-Token: $ATLAS_TOKEN" + +#### Getting second page of list of Terraform states + + $ curl %{ATLAS_URL}/api/v1/terraform/state?page=2 \ + -H "X-Atlas-Token: $ATLAS_TOKEN" diff --git a/website/source/docs/enterprise/api/users.html.md b/website/source/docs/enterprise/api/users.html.md new file mode 100755 index 000000000..46e5119fa --- /dev/null +++ b/website/source/docs/enterprise/api/users.html.md @@ -0,0 +1,28 @@ +--- +title: "Users API" +--- + +# Users API + +Users are both users and organizations in Atlas. They are the +parent resource of all resources. + +Currently, only the retrieval of users is avaiable on the API. Additionally, +only [box](/help/api/vagrant/boxes) resources will be listed. Boxes will +be returned based on permissions over the organization, or user. + +### Actions + +The following actions can be perfomed on this resource. + +
+
Show
+
GET /api/v1/user/:username
+
+ +### Examples + +#### Retrieve a user + + $ curl %{ATLAS_URL}/api/v1/user/%{DEFAULT_USERNAME} \ + -H "X-Atlas-Token: $ATLAS_TOKEN" diff --git a/website/source/docs/enterprise/billing/index.html.md b/website/source/docs/enterprise/billing/index.html.md new file mode 100755 index 000000000..25ba5a99e --- /dev/null +++ b/website/source/docs/enterprise/billing/index.html.md @@ -0,0 +1,51 @@ +--- +layout: "docs" +page_title: "Billing: Managed Nodes" +sidebar_current: "docs-enterprise" +description: |- + HashiCorp charges for usage based on **managed nodes**. The definition of managed node is specific to the enterprise product and is described below. +--- + +# Managed Nodes + +HashiCorp charges for usage based on **managed nodes**. The definition of +managed node is specific to the enterprise product and is described below. + +For all enterprise products, the count of managed nodes is observed and +recorded every hour. At the end of the billing month a weighted average of +this recorded value is calculated to determine the overall managed node count +for billing. + +## Terraform Enterprise + +For Terraform Enterprise, a managed node is a compute resource defined in your +Terraform configuration. For certain resource types the managed node count is +determined by a property of the resource. The `count` meta-parameter is used +for all compute resource types. The complete list of compute resources and +resource arguments for determining managed node count is below. + +| Provider | Resource Type | Resource Property | +|:-:|:-:|:-:| +| AWS | `aws_instance` | `count` | +| AWS | `aws_autoscaling_group` | `count` `desired_capacity` | +| Azure | `azure_instance` | `count` | +| Azure | `azurerm_virtual_machine` | `count` | +| CenturyLink Cloud | `clc_server` | `count` | +| CloudStack | `cloudstack_instance` | `count` | +| DigitalOcean | `digitalocean_droplet` | `count` | +| Google Cloud | `google_compute_instance` | `count` | +| Google Cloud | `compute_instance_group_manager` | `count` `target_size` | +| Heroku | `heroku_app` | `count` | +| OpenStack | `openstack_compute_instance_v2` | `count` | +| Packet | `packet_device` | `count` | +| Triton | `triton_machine` | `count` | +| VMware vCloud Director | `vcd_vapp` | `count` | +| VMware vSphere provider | `vsphere_virtual_machine` | `count` | + + +Terraform Enterprise includes unlimited Packer builds and artifact storage. + +# Billing Support + +For questions related to billing please email +[support@hashicorp.com](mailto:support@hashicorp.com). diff --git a/website/source/docs/enterprise/faq/index.html.md b/website/source/docs/enterprise/faq/index.html.md new file mode 100755 index 000000000..b0d037cae --- /dev/null +++ b/website/source/docs/enterprise/faq/index.html.md @@ -0,0 +1,13 @@ +--- +layout: "faq" +page_title: "Terraform Enterprise FAQs" +sidebar_current: "docs-enterprise-faq" +description: |- + Frequently Asked Questions. +--- + +# Frequently Asked Questions + +[Monolithic Artifacts](/docs/enterprise/faq/monolithic-artifacts) - *How do I build multiple applications into one artifact?* + +[Rolling Deployments](/docs/enterprise/faq/rolling-deployments) - *How do I configure rolling deployments?* diff --git a/website/source/docs/enterprise/faq/monolithic-artifacts.html.md b/website/source/docs/enterprise/faq/monolithic-artifacts.html.md new file mode 100755 index 000000000..35d15982d --- /dev/null +++ b/website/source/docs/enterprise/faq/monolithic-artifacts.html.md @@ -0,0 +1,149 @@ +--- +layout: "faq" +page_title: "FAQ: Monolithic Artifacts" +sidebar_current: "docs-enterprise-faq-monolithic" +description: |- + How do I build multiple applications into one artifact? +--- + +# Monolithic Artifacts + +*How do I build multiple applications into one artifact?* + +Create your new Applications in Terraform Enterprise using the application compilation feature. + +You can either link each Application to the single Build Template you will be using to create the monolithic artifact, or run periodic Packer builds. + +Each time an Application is pushed, it will store the new application version in the artifact registry as a tarball. These will be available for you to download at build-time on the machines they belong. + +Here's an example `compile.json` template that you will include with the rest of your application files that do the compiling: + + + { + "variables": { + "app_slug": "{{ env `ATLAS_APPLICATION_SLUG` }}" + }, + "builders": [ + { + "type": "docker", + "image": "ubuntu:14.04", + "commit": true + } + ], + "provisioners": [ + { + "type": "shell", + "inline": [ + "apt-get -y update" + ] + }, + { + "type": "file", + "source": ".", + "destination": "/tmp/app" + }, + { + "type": "shell", + "inline": [ + "cd /tmp/app", + "make" + ] + }, + { + "type": "file", + "source": "/tmp/compiled-app.tar.gz", + "destination": "compiled-app.tar.gz", + "direction": "download" + } + ], + "post-processors": [ + [ + { + "type": "artifice", + "files": ["compiled-app.tar.gz"] + }, + { + "type": "atlas", + "artifact": "{{user `app_slug` }}", + "artifact_type": "archive" + } + ] + ] + } + + +In your Packer template, you can download each of the latest applications artifacts onto the host using the shell provisioner: + + +```curl -L -H "X-Atlas-Token: ${ATLAS_TOKEN}" https://atlas.hashicorp.com/api/v1/artifacts/hashicorp/example/archive/latest/file -o example.tar.gz``` + + +Here's an example Packer template: + + + { + "variables": { + "atlas_username": "{{env `ATLAS_USERNAME`}}", + "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", + "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}", + "aws_region": "{{env `AWS_DEFAULT_REGION`}}", + "instance_type": "c3.large", + "source_ami": "ami-9a562df2", + "name": "example", + "ssh_username": "ubuntu", + "app_dir": "/app" + }, + "push": { + "name": "{{user `atlas_username`}}/{{user `name`}}", + "vcs": false + }, + "builders": [ + { + "type": "amazon-ebs", + "access_key": "{{user `aws_access_key`}}", + "secret_key": "{{user `aws_secret_key`}}", + "region": "{{user `aws_region`}}", + "vpc_id": "", + "subnet_id": "", + "instance_type": "{{user `instance_type`}}", + "source_ami": "{{user `source_ami`}}", + "ami_regions": [], + "ami_name": "{{user `name`}} {{timestamp}}", + "ami_description": "{{user `name`}} AMI", + "run_tags": { "ami-create": "{{user `name`}}" }, + "tags": { "ami": "{{user `name`}}" }, + "ssh_username": "{{user `ssh_username`}}", + "ssh_timeout": "10m", + "ssh_private_ip": false, + "associate_public_ip_address": true + } + ], + "provisioners": [ + { + "type": "shell", + "execute_command": "echo {{user `ssh_username`}} | {{ .Vars }} sudo -E -S sh '{{ .Path }}'", + "inline": [ + "apt-get -y update", + "apt-get -y upgrade", + "apt-get -y install curl unzip tar", + "mkdir -p {{user `app_dir`}}", + "chmod a+w {{user `app_dir`}}", + "cd /tmp", + "curl -L -H "X-Atlas-Token: ${ATLAS_TOKEN}" https://atlas.hashicorp.com/api/v1/artifacts/{{user `atlas_username`}}/{{user `name`}}/archive/latest/file -o example.tar.gz", + "tar -xzf example.tar.gz -C {{user `app_dir`}}" + ] + } + ], + "post-processors": [ + { + "type": "atlas", + "artifact": "{{user `atlas_username`}}/{{user `name`}}", + "artifact_type": "amazon.image", + "metadata": { + "created_at": "{{timestamp}}" + } + } + ] + } + +Once downloaded, you can place each application slug where it needs to go to produce the monolithic artifact your are accustom to. diff --git a/website/source/docs/enterprise/faq/rolling-deployments.html.md b/website/source/docs/enterprise/faq/rolling-deployments.html.md new file mode 100755 index 000000000..36bc1b3d4 --- /dev/null +++ b/website/source/docs/enterprise/faq/rolling-deployments.html.md @@ -0,0 +1,80 @@ +--- +layout: "faq" +page_title: "FAQ: Rolling Deployments" +sidebar_current: "docs-enterprise-faq-deployments" +description: |- + How do I configure rolling deployments in Terraform Enterprise? +--- + +# Rolling Deployments + +*How do I configure rolling deployments?* + +User are able to quickly change out an Artifact version that is being utilized by Terraform, using variables within Terraform Enterprise. This is +particularly useful when testing specific versions of the given artifact without performing a full rollout. This configuration also allows one +to deploy any version of an artifact with ease, simply by changing a version variable in Terraform and re-deploying. + +Here is an example: + + variable "type" { default = "amazon.image" } + variable "region" { } + variable "atlas_username" { } + variable "pinned_name" { } + variable "pinned_version" { default = "latest" } + + resource "atlas_artifact" "pinned" { + name = "${var.atlas_username}/${var.pinned_name}" + type = "${var.type}" + version = "${var.pinned_version}" + + lifecycle { create_before_destroy = true } + + metadata { + region = "${var.region}" + } + } + + output "pinned" { value = "${atlas_artifact.pinned.metadata_full.ami_id}" } + + +In the above example we have an `atlas_artifact` resource where you pass in the version number via the variable `pinned_version`. (_note: this variable defaults to latest_). +If you ever want to deploy any other version, you just update the variable `pinned_version` and redeploy. + +Below is similar to the first example, but it is in the form of a module that handles the creation of artifacts: + + variable "type" { default = "amazon.image" } + variable "region" { } + variable "atlas_username" { } + variable "artifact_name" { } + variable "artifact_version" { default = "latest" } + + resource "atlas_artifact" "artifact" { + name = "${var.atlas_username}/${var.artifact_name}" + type = "${var.type}" + count = "${length(split(",", var.artifact_version))}" + version = "${element(split(",", var.artifact_version), count.index)}" + + lifecycle { create_before_destroy = true } + metadata { region = "${var.region}" } + } + + output "amis" { value = "${join(",", atlas_artifact.artifact.*.metadata_full.ami_id)}" } + +One can then use the module as follows (_note: the source will likely be different depending on the location of the module_): + + module "artifact_consul" { + source = "../../../modules/aws/util/artifact" + + type = "${var.artifact_type}" + region = "${var.region}" + atlas_username = "${var.atlas_username}" + artifact_name = "${var.consul_artifact_name}" + artifact_version = "${var.consul_artifacts}" + } + + +In the above example, we have created artifacts for Consul. In this example, we can create two versions of the artifact, +"latest" and "pinned". This is useful when rolling a cluster (like Consul) one node at a time, keeping some nodes pinned to current version and others +deployed with the latest Artifact. + +There are additional details for implementing rolling deployments in the [Best-Practices Repo](https://github.com/hashicorp/best-practices/blob/master/terraform/providers/aws/us_east_1_prod/us_east_1_prod.tf#L105-L123), as there are some things uncovered in this FAQ (i.e Using the Terraform Enterprise Artifact in an instance). diff --git a/website/source/docs/enterprise/glossary/index.html.md b/website/source/docs/enterprise/glossary/index.html.md new file mode 100755 index 000000000..dfdf9a111 --- /dev/null +++ b/website/source/docs/enterprise/glossary/index.html.md @@ -0,0 +1,208 @@ +--- +layout: "docs" +page_title: "Terraform Enterprise Glossary" +sidebar_current: "docs-enterprise" +description: |- + Terminology for Terraform Enterprise. +--- + +# Glossary + +Terraform Enterprise, and this documentation, covers a large set of terminology adopted +from tools, industry standards and the community. This glossary +seeks to define as many of those terms as possible to help increase +understanding in interfacing with the platform and reading documentation. + +### Authentication Tokens + +Authentication tokens are tokens used to authenticate with Terraform Enterprise via +APIs or through tools. Authentication tokens can be revoked, expired +or created under any user. + +### ACL + +ACL is an acronym for access control list. This defines access +to a set of resources. Access to an object in Terraform Enterprise limited to "read" +for certain users is an example of an ACL. + +### Alert + +An alert represents a health check status change on a Consul node that +is sent to Terraform Enterprise, and then recorded and distributed to various +notification methods. + +### Application + +An application is a set of code that represents an application that should +be deployed. Applications can be linked to builds to be made +available in the Packer environment. + +### Apply + +An apply is the second step of the two steps required for +Terraform to make changes to infrastructure. The apply is the process +of communicating with external APIs to make the changes. + +### Artifact + +An artifact is an abstract representation of something you wish to +store and use again that has undergone configuration, compilation or +some other build process. An artifact is typically +an image created by Packer that is then deployed by Terraform, or used +locally with Vagrant. + +### Box + +Boxes are a Vagrant specific package format. Vagrant can install +and uses images in box format. + +### Build + +Builds are resources that represent Packer configurations. A build +is a generic name, sometimes called a "Build Configuration" when +defined in the Terraform Enterprise UI. + +### Build Configuration + +A build configuration are settings associated with a resource that +creates artifacts via builds. A build configuration is the name +in `packer push -name acemeinc/web`. + +### Catalog + +The box catalog is a publicly available index of Vagrant Boxes +that can be downloaded from Terraform Enterprise and used for development. + +### Consul + +[Consul](https://consul.io) is a HashiCorp tool for service discovery, configuration, +and orchestration. Consul enables rapid deployment, configuration, monitoring and +maintenance of service-oriented architectures. + +### Datacenter + +A datacenter represents a group of nodes in the same network or +datacenter within Consul. + +### Environment + +Environments show the real-time status of your infrastructure, +any pending changes, and its change history. Environments can be configured +to use any or all of these three components. + +Environments are the namespace of your Terraform Enterprise managed infrastructure. +As an example, if you to have a production environment +for a company named Acme Inc., your environment +may be named `%{DEFAULT_USERNAME}/production`. + +To read more about features provided under environments, +read the [Terraform](/docs/enterprise) sections. + +### Environment Variables + +Environment variables injected into the environment of Packer builds or +Terraform Runs (plans and applies). + +### Flapping + +Flapping is something entering and leaving a healthy state rapidly. It is typically associated with a health checks that +briefly report unhealthy status before recovering. + +### Health Check + +Health checks trigger alerts by changing status on a Consul node. That status +change is seen by Terraform Enterprise, when connected, and an associated alert is +recorded and sent to any configured notification methods, like +email. + +### Infrastructure + +An infrastructure is a stateful representation of a set of Consul +datacenters. + +### Managed Node + +Managed node is the billing metric for Terraform Enterprise. For Consul Enterprise, a node is a host +with a Consul agent on it. For Terraform Enterprise, a node is a compute +resource managed by Terraform. See [Managed Nodes](/docs/enterprise/billing) +for more details about which Terraform resources and resource properties are counted +as compute resources. + +All [Terraform Enterprise features](/docs/enterprise) are paid. + +### Operator + +An operator is a person who is making changes to infrastructure or +settings. + +### Packer + +[Packer](https://packer.io) is a tool for creating images for platforms such as Amazon AWS, +OpenStack, VMware, VirtualBox, Docker, and more — all from a single +source configuration. + +### Packer Template + +A Packer template is a JSON file that configure the various components +of Packer in order to create one or more machine images. + +### Plan + +A plan is the second step of the two steps required for +Terraform to make changes to infrastructure. The plan is the process +of determining what changes will be made to. + +### Providers + +Providers are often referenced when discussing Packer +or Terraform. Terraform providers manage resources in Terraform. +[Read more](https://terraform.io/docs/providers/index.html). + +### Post-Processors + +The post-processor section within a Packer template configures +any post-processing that will be done to images built by the builders. +Examples of post-processing would be compressing files, uploading +artifacts, etc.. + +### Registry + +Often referred to as the "Artifact Registry", the registry +stores artifacts, be it images or IDs for cloud provider images. + +### Run + +A run epresents a two step Terraform plan and a subsequent apply. + +### Service + +A service in Consul represents an application or service, which +could be active on any number of nodes. + +### Share + +Shares are let you instantly share public access to your running +Vagrant environment (virtual machine). + +### State + +Terraform state is the state of your managed infrastructure from the last +time Terraform was run. By default this state is stored in a local file +named `terraform.tfstate`, but it can also be stored in Terraform Enterprise +and is then called "Remote state". + +### Terraform + +[Terraform](https://terraform.io) is a tool for safely and +efficiently changing infrastructure across providers. + +### Terraform Configuration + +Terraform configuration is the configuration files and any +files that may be used in provisioners like `remote-exec`. + +### Terraform Variables + +Variables in Terraform, uploaded with `terraform push` or +set in the UI. These differ from environment variables +as they are a first class Terraform variable used in interpolation. diff --git a/website/source/docs/enterprise/organizations/authentication-policy.html.md b/website/source/docs/enterprise/organizations/authentication-policy.html.md new file mode 100755 index 000000000..32bfbf1f6 --- /dev/null +++ b/website/source/docs/enterprise/organizations/authentication-policy.html.md @@ -0,0 +1,22 @@ +--- +layout: "organizations" +page_title: "Organization Authentication Policy" +sidebar_current: "docs-enterprise-organizations-policy" +description: |- + Owners can set organization-wide authentication policy in Terraform Enterprise. +--- + + +# Set an Organization Authentication Policy + +Because organization membership affords members access to potentially sensitive resources, owners can set organization-wide authentication policy in Terraform Enterprise. + +## Requiring Two-Factor Authentication + +Organization owners can require that all organization team members use [two-factor authentication](/docs/enterprise/user-accounts/authentication). Those that lack two-factor authentication will be locked out of the web interface until they enable it or leave the organization. + +Visit your organization's configuration page to enable this feature. All organization owners must have two-factor authentication enabled to require the practice organization-wide. Note: locked-out users are still be able to interact with Terraform Enterprise using their `ATLAS_TOKEN`. + +## Disabling Two-Factor Authentication Requirement + +Organization owners can disable the two-factor authentication requirement from their organization's configuration page. Locked-out team members (those who have not enabled two-factor authentication) will have their memberships reinstated. diff --git a/website/source/docs/enterprise/organizations/create.html.md b/website/source/docs/enterprise/organizations/create.html.md new file mode 100755 index 000000000..b7dd8ddde --- /dev/null +++ b/website/source/docs/enterprise/organizations/create.html.md @@ -0,0 +1,19 @@ +--- +layout: "organizations" +page_title: "Create and organization" +sidebar_current: "docs-enterprise-organizations-create" +description: |- + How to create a Terraform Enterprise account. +--- + +# Create an Organization Account + +To create an organization: + +1. Create a personal account. You'll use this to create and administrate +the organization. You'll be able to add other users as owners of the +organization, so it won't be tied solely to your account. + +1. Visit your new organization page to create the +organization. + diff --git a/website/source/docs/enterprise/organizations/credit-card.html.md b/website/source/docs/enterprise/organizations/credit-card.html.md new file mode 100755 index 000000000..47a3f0751 --- /dev/null +++ b/website/source/docs/enterprise/organizations/credit-card.html.md @@ -0,0 +1,13 @@ +--- +layout: "organizations" +page_title: "Add a credit card to an organization" +sidebar_current: "docs-enterprise-organizations-credit" +description: |- + You must add a credit card to your organization's account to setup auto billing. +--- + +# Add credit card details to an organization + +To setup automated billing for your Terraform usage, you must add a credit card to your organization's account. To do so, go into your account settings, then go to the proper organization settings in the left navigation. Select billing in the organization settings, and then enter your credit card information. + +If you have any questions regarding billing or payment, contact [sales@hashicorp.com](mailto:sales@hashicorp.com). diff --git a/website/source/docs/enterprise/organizations/index.html.md b/website/source/docs/enterprise/organizations/index.html.md new file mode 100755 index 000000000..535549617 --- /dev/null +++ b/website/source/docs/enterprise/organizations/index.html.md @@ -0,0 +1,17 @@ +--- +layout: "organizations" +page_title: "Organizations in Terraform Enterprise" +sidebar_current: "docs-enterprise-organizations" +description: |- + Organizations are a group of users in Terraform Enterprise that have access and ownership over shared resources. +--- + +## Organizations in Terraform Enterprise + +Organizations are a group of users in Terraform Enterprise that have access +and ownership over shared resources. When operating within a team, +we recommend creating an organization to manage access control, +auditing, billing and authorization. + +Each individual member of your organization should have their own +account. diff --git a/website/source/docs/enterprise/organizations/migrate.html.md b/website/source/docs/enterprise/organizations/migrate.html.md new file mode 100755 index 000000000..8a9c2b2a4 --- /dev/null +++ b/website/source/docs/enterprise/organizations/migrate.html.md @@ -0,0 +1,27 @@ +--- +layout: "organizations" +page_title: "Migrate Organization" +sidebar_current: "docs-enterprise-organizations-migrate" +description: |- + How to migrate existing organization. +--- + +# Migrate Organization + +To migrate an existing user account to an organization: + +1. Create or retrieve the username of a new personal account. You'll +add this account as an "owner" for the new organization during the +migration process. If you already have another account, write down your +username. + +2. Sign in as the account you wish to migrate and visit the migration page. + +3. Put the username of the personal account you wish to make an owner +of the organization into the username text field and press "Migrate". + +4. You should now be logged out and receive a confirmation email with +the personal account you migrated to. + +5. Now, sign in with your personal account. If you visit you settings page, +you should see your migrated organization available to administrate. diff --git a/website/source/docs/enterprise/organizations/trials.html.md b/website/source/docs/enterprise/organizations/trials.html.md new file mode 100755 index 000000000..373bcc6e4 --- /dev/null +++ b/website/source/docs/enterprise/organizations/trials.html.md @@ -0,0 +1,13 @@ +--- +layout: "organizations" +page_title: "Start an Terraform Enterprise Trial" +sidebar_current: "docs-enterprise-organizations-trials" +description: |- + Terraform Enterprise offers a 30-day trial. +--- + +# Start a trial + +Terraform Enterprise offers organizations 30-day trials for [Terraform Enterprise](https://www.hashicorp.com/products/terraform/), [Consul Enterprise](https://www.hashicorp.com/consul.html), and Vagrant Enterprise. Note that trials are available for organizations, not users. + +[Request a trial](https://www.hashicorp.com/products/terraform/) for your organization. \ No newline at end of file diff --git a/website/source/docs/enterprise/user-accounts/authentication.html.md b/website/source/docs/enterprise/user-accounts/authentication.html.md new file mode 100755 index 000000000..a1450b33b --- /dev/null +++ b/website/source/docs/enterprise/user-accounts/authentication.html.md @@ -0,0 +1,70 @@ +--- +layout: "accounts" +page_title: "User Authentication in Terraform Enterprise" +sidebar_current: "docs-enterprise-accounts-authentication" +description: |- + Terraform Enterprise requires a username and password to sign up and login. However, there are several ways to authenticate with your account. +--- + +# Authentication with Terraform Enterprise + +Terraform Enterprise requires a username and password to sign up and login. However, +there are several ways to authenticate with your account. + +### Authentication Tokens + +Authentication tokens are keys used to access your account via tools +or over the various APIs used in Terraform Enterprise. + +You can create new tokens in the token section +of your account settings. It's important to keep tokens secure, +as they are essentially a password and can be used to access your +account or resources. Additionally, token authentication +bypasses two factor authentication. + +### Authenticating Tools + +All HashiCorp tools look for the `ATLAS_TOKEN` environment variable: + + $ export ATLAS_TOKEN=TOKEN + +This will automatically authenticate all requests against +this token. This is the recommended way to authenticate with our various +tools. Care should be given to how this token is stored, as it is +as good as a password. + +### Two Factor Authentication + +You can optionally enable Two Factor authentication, requiring an +SMS or TOTP one-time code every time you log in, after entering +your username and password. + +You can enable Two Factor authentication in the security section +of your account settings. + +Be sure to save the generated recovery codes. Each backup code can +be used once to sign in if you do not have access to your two-factor +authentication device. + + +### Vagrant Login + +Only Vagrant allows for a `vagrant login` command, but it can be +used to login and automatically create an authentication token from Vagrant. + + $ vagrant login + # ... + Atlas username: + Atlas password: + +You can read more about `vagrant login` and its options +in the [Vagrant documentation](https://docs.vagrantup.com/v2/cli/login.html). You +cannot use Vagrant login with Two Factor authentication. + +### Sudo Mode + +When accessing certain admin-level pages (adjusting your user profile, for example), you may notice that you're prompted for your password, even though you're already logged in. This is by design, and aims to help guard protect you if your screen is unlocked and unattended. + +### Session Management + +You can see a list of your active sessions on your security settings page. From here, you can revoke sessions, in case you have lost access to a machine from which you were accessing. diff --git a/website/source/docs/enterprise/user-accounts/index.html.md b/website/source/docs/enterprise/user-accounts/index.html.md new file mode 100755 index 000000000..7ac07a1b1 --- /dev/null +++ b/website/source/docs/enterprise/user-accounts/index.html.md @@ -0,0 +1,13 @@ +--- +layout: "accounts" +page_title: "User Accounts in Terraform Enterprise" +sidebar_current: "docs-enterprise-accounts" +description: |- + Users are the main identity system in Terraform Enterprise. +--- + +# User Accounts in Terraform Enterprise + +Users are the main identity system in Terrafgorm Enterprise. A user can +be a member of multiple [organizations](/docs/enterprise/organizations), as well as individually collaborate on various resources. + diff --git a/website/source/docs/enterprise/user-accounts/recovery.html.md b/website/source/docs/enterprise/user-accounts/recovery.html.md new file mode 100755 index 000000000..831cef2a8 --- /dev/null +++ b/website/source/docs/enterprise/user-accounts/recovery.html.md @@ -0,0 +1,14 @@ +--- +layout: "accounts" +page_title: "User Account Recovery" +sidebar_current: "docs-enterprise-accounts-recovery" +description: |- + If you have lost access to your account, use the reset password form to send yourself a link to reset your password. +--- + +# Terraform Enterprise Account Recovery + +If you have lost access to your Terraform Enterprise account, use the reset password +form on the login page to send yourself a link to reset your password. + +If an email is unknown, [contact us](mailto:support@hashicorp.com) for further help. diff --git a/website/source/layouts/accounts.erb b/website/source/layouts/accounts.erb new file mode 100644 index 000000000..c175cb180 --- /dev/null +++ b/website/source/layouts/accounts.erb @@ -0,0 +1,25 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index f819d334e..de0a7c642 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -336,7 +336,6 @@ Microsoft Azure (Legacy ASM) -<<<<<<< HEAD > MySQL @@ -559,6 +558,21 @@ > VCS Integration + > + User Accounts + + > + Organizations + + > + Billing + + > + Glossary + + > + FAQ + diff --git a/website/source/layouts/faq.erb b/website/source/layouts/faq.erb new file mode 100644 index 000000000..c06dd8f84 --- /dev/null +++ b/website/source/layouts/faq.erb @@ -0,0 +1,25 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> diff --git a/website/source/layouts/organizations.erb b/website/source/layouts/organizations.erb new file mode 100644 index 000000000..831f24489 --- /dev/null +++ b/website/source/layouts/organizations.erb @@ -0,0 +1,34 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> From ced173d2483737291f227275901d49d597614df4 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Tue, 21 Mar 2017 14:50:17 -0700 Subject: [PATCH 44/72] Added API docs to FTE --- .../api/configuration-versions.html.md | 6 ++- .../enterprise/api/configurations.html.md | 6 ++- .../docs/enterprise/api/environments.html.md | 6 ++- .../source/docs/enterprise/api/index.html.md | 34 ++++++----------- .../source/docs/enterprise/api/runs.html.md | 10 +++-- .../source/docs/enterprise/api/states.html.md | 8 +++- .../source/docs/enterprise/api/users.html.md | 8 +++- website/source/layouts/api.erb | 37 +++++++++++++++++++ website/source/layouts/docs.erb | 3 ++ 9 files changed, 85 insertions(+), 33 deletions(-) create mode 100644 website/source/layouts/api.erb diff --git a/website/source/docs/enterprise/api/configuration-versions.html.md b/website/source/docs/enterprise/api/configuration-versions.html.md index 76150ff72..579ebf24d 100755 --- a/website/source/docs/enterprise/api/configuration-versions.html.md +++ b/website/source/docs/enterprise/api/configuration-versions.html.md @@ -1,5 +1,9 @@ --- -title: "Build Configuration Versions API" +layout: "api" +page_title: "Configuration Versions API" +sidebar_current: "docs-enterprise-api-configversions" +description: |- + A configuration version represents versions of Terrraform configuration. --- # Configuration Versions API diff --git a/website/source/docs/enterprise/api/configurations.html.md b/website/source/docs/enterprise/api/configurations.html.md index 8fcdb1a3a..ef4b81dec 100755 --- a/website/source/docs/enterprise/api/configurations.html.md +++ b/website/source/docs/enterprise/api/configurations.html.md @@ -1,5 +1,9 @@ --- -title: "Terraform Configuration API" +layout: "api" +page_title: "Terraform Configuration API" +sidebar_current: "docs-enterprise-api-configurations" +description: |- + A configuration respresents settings associated with a resource that runs Terraform with versions of Terraform configuration.. --- # Terraform Configuration API diff --git a/website/source/docs/enterprise/api/environments.html.md b/website/source/docs/enterprise/api/environments.html.md index 82a967f91..6e9976134 100755 --- a/website/source/docs/enterprise/api/environments.html.md +++ b/website/source/docs/enterprise/api/environments.html.md @@ -1,5 +1,9 @@ --- -title: "Environments API" +layout: "api" +page_title: "Environments API" +sidebar_current: "docs-enterprise-api-environments" +description: |- + Environments represent running infrastructure managed by Terraform. --- # Environments API diff --git a/website/source/docs/enterprise/api/index.html.md b/website/source/docs/enterprise/api/index.html.md index ff5c6d1aa..3d286dd94 100755 --- a/website/source/docs/enterprise/api/index.html.md +++ b/website/source/docs/enterprise/api/index.html.md @@ -1,33 +1,21 @@ --- -title: "Atlas API Documentation" +layout: "api" +page_title: "API Documentation" +sidebar_current: "docs-enterprise-api" +description: |- + Terraform Enterprise provides an API for a **subset of features**. --- -# Atlas API Documentation +# Terraform Enterprise API Documentation -Atlas provides an API for a **subset of features** available. For questions +Terraform Enterprise provides an API for a **subset of features** available. For questions or requests for new API features please email [support@hashicorp.com](mailto:support@hashicorp.com). -## Available Endpoints +## Available Endpoints Terraform Enterprise -These are the currently supported API endpoints for each product: - -### Vagrant - -- [Boxes](/help/api/vagrant/boxes) -- [Box Versions](/help/api/vagrant/box-versions) -- [Box Providers](/help/api/vagrant/box-providers) - -### Packer - -- [Build configurations](/help/api/packer/build-configurations) -- [Build configuration versions](/help/api/packer/build-configuration-versions) -- [Builds](/help/api/packer/builds) - -### Terraform - -- [Environments](/help/api/terraform/environments) -- [Runs](/help/api/terraform/runs) -- [States](/help/api/terraform/states) +- [Environments](/docs/enterprise/api/environments.html) +- [Runs](/docs/enterprise/api/runs.html) +- [States](/docs/enterprise/api/states.html) ## Authentication diff --git a/website/source/docs/enterprise/api/runs.html.md b/website/source/docs/enterprise/api/runs.html.md index 70d134498..f81c81fb9 100755 --- a/website/source/docs/enterprise/api/runs.html.md +++ b/website/source/docs/enterprise/api/runs.html.md @@ -1,12 +1,16 @@ --- -title: "Runs API" +layout: "api" +page_title: "Runs API" +sidebar_current: "docs-enterprise-api-runs" +description: |- + Runs in Terraform Enterprise represents a two step Terraform plan and a subsequent apply. --- # Runs API -Runs in Atlas represents a two step Terraform plan and a subsequent apply. +Runs in Terraform Enterprise represents a two step Terraform plan and a subsequent apply. -Runs are queued under [environments](/help/api/terraform/environments) +Runs are queued under [environments](/docs/enterprise/api/environments.html) and require a two-step confirmation workflow. However, environments can be configured to auto-apply to avoid this. diff --git a/website/source/docs/enterprise/api/states.html.md b/website/source/docs/enterprise/api/states.html.md index 5e77d624d..6b20c566e 100755 --- a/website/source/docs/enterprise/api/states.html.md +++ b/website/source/docs/enterprise/api/states.html.md @@ -1,10 +1,14 @@ --- -title: "State API" +layout: "api" +page_title: "State API" +sidebar_current: "docs-enterprise-api-states" +description: |- + State represents the status of your infrastructure at the last time Terraform was run. --- # State API -State represents the status of your infrastructure at the last time Terraform was run. States can be pushed to Atlas from Terraform's CLI after an apply is done locally, or state is automatically stored in Atlas if the apply is done in Atlas. +State represents the status of your infrastructure at the last time Terraform was run. States can be pushed to Terraform Enterprise from Terraform's CLI after an apply is done locally, or state is automatically stored if the apply is done in Terraform Enterprise. ### State Attributes diff --git a/website/source/docs/enterprise/api/users.html.md b/website/source/docs/enterprise/api/users.html.md index 46e5119fa..f6d771753 100755 --- a/website/source/docs/enterprise/api/users.html.md +++ b/website/source/docs/enterprise/api/users.html.md @@ -1,10 +1,14 @@ --- -title: "Users API" +layout: "api" +page_title: "Users API" +sidebar_current: "docs-enterprise-api-users" +description: |- + Users are both users and organizations in Terraform Enterprise. They are the parent resource of all resources. --- # Users API -Users are both users and organizations in Atlas. They are the +Users are both users and organizations in Terraform Enterprise. They are the parent resource of all resources. Currently, only the retrieval of users is avaiable on the API. Additionally, diff --git a/website/source/layouts/api.erb b/website/source/layouts/api.erb new file mode 100644 index 000000000..147af5115 --- /dev/null +++ b/website/source/layouts/api.erb @@ -0,0 +1,37 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index de0a7c642..2d66abbe6 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -564,6 +564,9 @@ > Organizations + > + API + > Billing From 8a1d2cca14e986406e04ae45e1ad123e94757468 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Tue, 21 Mar 2017 15:01:58 -0700 Subject: [PATCH 45/72] Added API docs to FTE --- .../api/configuration-versions.html.md | 2 +- .../enterprise/api/configurations.html.md | 2 +- .../docs/enterprise/api/environments.html.md | 2 +- .../source/docs/enterprise/api/runs.html.md | 2 +- .../source/docs/enterprise/api/states.html.md | 2 +- .../packer/artifacts/creating-amis.html.md | 57 ++++++ .../artifacts/creating-vagrant-boxes.html.md | 134 ++++++++++++++ .../enterprise/packer/artifacts/index.html.md | 36 ++++ .../packer/builds/build-environment.html.md | 166 ++++++++++++++++++ .../packer/builds/how-builds-run.html.md | 28 +++ .../enterprise/packer/builds/index.html.md | 28 +++ .../packer/builds/installing-software.html.md | 28 +++ .../packer/builds/linked-applications.html.md | 7 + .../builds/managing-packer-versions.html.md | 23 +++ .../packer/builds/notifications.html.md | 19 ++ .../packer/builds/rebuilding.html.md | 16 ++ .../packer/builds/scheduling-builds.html.md | 32 ++++ .../enterprise/packer/builds/starting.html.md | 68 +++++++ .../packer/builds/troubleshooting.html.md | 112 ++++++++++++ .../docs/enterprise/packer/index.html.md | 16 ++ 20 files changed, 775 insertions(+), 5 deletions(-) create mode 100755 website/source/docs/enterprise/packer/artifacts/creating-amis.html.md create mode 100755 website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md create mode 100755 website/source/docs/enterprise/packer/artifacts/index.html.md create mode 100755 website/source/docs/enterprise/packer/builds/build-environment.html.md create mode 100755 website/source/docs/enterprise/packer/builds/how-builds-run.html.md create mode 100755 website/source/docs/enterprise/packer/builds/index.html.md create mode 100755 website/source/docs/enterprise/packer/builds/installing-software.html.md create mode 100755 website/source/docs/enterprise/packer/builds/linked-applications.html.md create mode 100755 website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md create mode 100755 website/source/docs/enterprise/packer/builds/notifications.html.md create mode 100755 website/source/docs/enterprise/packer/builds/rebuilding.html.md create mode 100755 website/source/docs/enterprise/packer/builds/scheduling-builds.html.md create mode 100755 website/source/docs/enterprise/packer/builds/starting.html.md create mode 100755 website/source/docs/enterprise/packer/builds/troubleshooting.html.md create mode 100755 website/source/docs/enterprise/packer/index.html.md diff --git a/website/source/docs/enterprise/api/configuration-versions.html.md b/website/source/docs/enterprise/api/configuration-versions.html.md index 579ebf24d..9c737a811 100755 --- a/website/source/docs/enterprise/api/configuration-versions.html.md +++ b/website/source/docs/enterprise/api/configuration-versions.html.md @@ -17,7 +17,7 @@ to include the necessary variables for the Terraform configuration. ### Configuration Version Attributes - +
diff --git a/website/source/docs/enterprise/api/configurations.html.md b/website/source/docs/enterprise/api/configurations.html.md index ef4b81dec..ee8cdfd9f 100755 --- a/website/source/docs/enterprise/api/configurations.html.md +++ b/website/source/docs/enterprise/api/configurations.html.md @@ -17,7 +17,7 @@ configuration. ### Configuration Attributes -
Attribute Description
+
diff --git a/website/source/docs/enterprise/api/environments.html.md b/website/source/docs/enterprise/api/environments.html.md index 6e9976134..e322e5634 100755 --- a/website/source/docs/enterprise/api/environments.html.md +++ b/website/source/docs/enterprise/api/environments.html.md @@ -15,7 +15,7 @@ This documentation covers the environment interactions with Terraform. ### Environment Attributes -
Attribute Description
+
diff --git a/website/source/docs/enterprise/api/runs.html.md b/website/source/docs/enterprise/api/runs.html.md index f81c81fb9..7a461ce03 100755 --- a/website/source/docs/enterprise/api/runs.html.md +++ b/website/source/docs/enterprise/api/runs.html.md @@ -16,7 +16,7 @@ can be configured to auto-apply to avoid this. ### Run Attributes -
Attribute Description
+
diff --git a/website/source/docs/enterprise/api/states.html.md b/website/source/docs/enterprise/api/states.html.md index 6b20c566e..6a54d9175 100755 --- a/website/source/docs/enterprise/api/states.html.md +++ b/website/source/docs/enterprise/api/states.html.md @@ -12,7 +12,7 @@ State represents the status of your infrastructure at the last time Terraform wa ### State Attributes -
Attribute Description
+
diff --git a/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md b/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md new file mode 100755 index 000000000..ff61c7c1a --- /dev/null +++ b/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md @@ -0,0 +1,57 @@ +--- +title: "Creating AMI Artifacts with Atlas" +--- + +# Creating AMI Artifacts with Atlas + +In an [immutable infrastructure](/help/intro/use-cases/continuous-deployment-of-immutable-infrastructure) +workflow, it's important to version and store full images (artifacts) +to be deployed. This section covers storing [AWS AMI](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) +images in Atlas to be queried and used later. + +Note the actual AMI does _not get stored in Atlas_. Atlas +simply keeps the AMI ID as a reference to the target image. Tools +like Terraform can then use this in a deploy. + +### Steps + +If you run Packer in Atlas, the following will happen after a [push](/help/packer/builds/starting): + +1. Atlas will run `packer build` against your template in our infrastructure. +This spins up an AWS instance in your account and provisions it with + any specified provisioners +1. Packer stops the instance and stores the result as an AMI in AWS +under your account. This then returns an ID (the artifact) that it passes to the Atlas post-processor +1. The Atlas post-processor creates and uploads the new artifact version with the +ID in Atlas of the type `amazon.image` for use later + +### Example + +Below is a complete example Packer template that starts an AWS instance. + + { + "push": { + "name": "%{DEFAULT_USERNAME}/frontend" + }, + "provisioners": [], + "builders": [ + { + "type": "amazon-ebs", + "access_key": "", + "secret_key": "", + "region": "us-east-1", + "source_ami": "ami-2ccc7a44", + "instance_type": "c3.large", + "ssh_username": "ubuntu", + "ami_name": "Atlas Example {{ timestamp }}" + } + ], + "post-processors": [ + { + "type": "atlas", + "artifact": "%{DEFAULT_USERNAME}/web-server", + "artifact_type": "amazon.image" + } + ] + } + diff --git a/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md b/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md new file mode 100755 index 000000000..3d900fc34 --- /dev/null +++ b/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md @@ -0,0 +1,134 @@ +--- +title: "Creating Vagrant Boxes with Packer" +--- + +# Creating Vagrant Boxes with Packer + +We recommend using Packer to create boxes, as is it is fully repeatable and keeps a strong +history of changes within Atlas. + +## Getting Started + +Using Packer requires more up front effort, but the repeatable and +automated builds will end any manual management of boxes. Additionally, +all boxes will be stored and served from Atlas, keeping a history along + the way. + +Some useful Vagrant Boxes documentation will help you learn +about managing Vagrant boxes in Atlas. + +- [Vagrant Box Lifecycle](/help/vagrant/boxes/lifecycle) +- [Distributing Vagrant Boxes with Atlas](/help/vagrant/boxes/distributing) + +You can also read on to learn more about how Packer uploads and versions +the boxes with post-processors. + +## Post-Processors + +Packer uses [post-processors](https://packer.io/docs/templates/post-processors.html) to define how to process +images and artifacts after provisioning. Both the `vagrant` and `atlas` post-processors must be used in order +to upload Vagrant Boxes to Atlas via Packer. + +It's important that they are [sequenced](https://packer.io/docs/templates/post-processors.html) +in the Packer template so they run in order. This is done by nesting arrays: + + "post-processors": [ + [ + { + "type": "vagrant" + ... + }, + { + "type": "atlas" + ... + } + ] + ] + +Sequencing automatically passes the resulting artifact from one +post-processor to the next – in this case, the `.box` file. + +### Vagrant Post-Processor + +The [Vagrant post-processor](https://packer.io/docs/post-processors/vagrant.html) is required to package the image +from the build (an `.ovf` file, for example) into a `.box` file before +passing it to the `atlas` post-processor. + + { + "type": "vagrant", + "keep_input_artifact": false + } + +The input artifact (i.e and `.ovf` file) does not need to be kept when building Vagrant Boxes, +as the resulting `.box` will contain it. + +### Atlas Post-Processor + +The [Atlas post-processor](https://packer.io/docs/post-processors/atlas.html) takes the resulting `.box` file and uploads +it to Atlas, adding metadata about the box version. + + { + "type": "atlas", + "artifact": "%{DEFAULT_USERNAME}/dev-environment", + "artifact_type": "vagrant.box", + "metadata": { + "provider": "vmware_desktop", + "version": "0.0.1" + } + } + +#### Attributes Required + +These are all of the attributes for that Atlas post-processor +required for uploading Vagrant Boxes. A complete example is shown below. + +- `artifact`: The username and box name (`username/name`) you're creating the version +of the box under. If the box doesn't exist, it will be automatically +created +- `artifact_type`: This must be `vagrant.box`. Atlas uses this to determine +how to treat this artifact. + +For `vagrant.box` type artifacts, you can specify keys in the metadata block: + +- `provider`: The Vagrant provider for the box. Common providers are +`virtualbox`, `vmware_desktop`, `aws` and so on _(required)_ +- `version`: This is the Vagrant box [version](/help/vagrant/boxes/lifecycle) and is constrained to the +same formatting as in the web UI: `*.*.*` _(optional, but required for boxes +with multiple providers). The version will increment on the minor version if left blank (e.g the initial version will be set to 0.1.0, the subsequent version will be set to 0.2.0)._ +- `description`: This is the desciption that will be shown with the +version of the box. You can use Markdown for links and style. _(optional)_ + +## Example + +An example post-processor block for Atlas and Vagrant is below. In this example, +the build runs on both VMware and Virtualbox creating two +different providers for the same box version (`0.0.1`). + + "post-processors": [ + [ + { + "type": "vagrant", + "keep_input_artifact": false + }, + { + "type": "atlas", + "only": ["vmware-iso"], + "artifact": "%{DEFAULT_USERNAME}/dev-environment", + "artifact_type": "vagrant.box", + "metadata": { + "provider": "vmware_desktop", + "version": "0.0.1" + } + }, + { + "type": "atlas", + "only": ["virtualbox-iso"], + "artifact": "%{DEFAULT_USERNAME}/dev-environment", + "artifact_type": "vagrant.box", + "metadata": { + "provider": "virtualbox", + "version": "0.0.1" + } + } + ] + ] diff --git a/website/source/docs/enterprise/packer/artifacts/index.html.md b/website/source/docs/enterprise/packer/artifacts/index.html.md new file mode 100755 index 000000000..fbd25ca89 --- /dev/null +++ b/website/source/docs/enterprise/packer/artifacts/index.html.md @@ -0,0 +1,36 @@ +--- +title: "About Packer and Artifacts " +--- + +# About Packer and Artifacts + +Packer creates and uploads artifacts to Atlas. This is done +with the [Atlas post-processor](https://packer.io/docs/post-processors/atlas.html). + +Artifacts can then be used in Atlas to deploy services or access +via Vagrant. Artifacts are generic, but can be of varying types. +These types define different behavior within Atlas. + +For uploading artifacts to Atlas, `artifact_type` can be set to any +unique identifier, however, the following are recommended for consistency. + +- `amazon.image` +- `azure.image` +- `digitalocean.image` +- `docker.image` +- `google.image` +- `openstack.image` +- `parallels.image` +- `qemu.image` +- `virtualbox.image` +- `vmware.image` +- `custom.image` +- `application.archive` +- `vagrant.box` + +Packer can create artifacts when running in Atlas or locally. +This is possible due to the post-processors use of the public +artifact API to store the artifacts. + +You can read more about artifacts and their use in the [Terraform section](/help/terraform/features) +of the documentation. diff --git a/website/source/docs/enterprise/packer/builds/build-environment.html.md b/website/source/docs/enterprise/packer/builds/build-environment.html.md new file mode 100755 index 000000000..fb6f31a90 --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/build-environment.html.md @@ -0,0 +1,166 @@ +--- +title: "Packer Build Environment" +--- + +# Packer Build Environment + +This page outlines the environment that Packer runs in within Atlas. + +### Supported Builders + +Atlas currently supports running the following Packer builders: + +- amazon-chroot +- amazon-ebs +- amazon-instance +- digitalocean +- docker +- googlecompute +- null +- openstack +- qemu +- virtualbox-iso +- vmware-iso + +### Files + +All files in the uploading package (via [Packer push or GitHub](/help/packer/builds/starting)), +and the application from the [build pipeline](/help/applications/build-pipeline) are available on the filesystem +of the build environment. + +You can use the file icon on the running build to show a list of +available files. + +Files can be copied to the destination image Packer is provisioning +with [Packer Provisioners](https://packer.io/docs/templates/provisioners.html). + +An example of this with the Shell provisioner is below. + + "provisioners": [ + { + "type": "shell", + "scripts": [ + "scripts/vagrant.sh", + "scripts/dependencies.sh", + "scripts/cleanup.sh" + ] + } + ] + +We encourage use of relative paths over absolute paths to maintain portability +between Atlas and local builds. + +The total size of all files in the package being uploaded via +[Packer push or GitHub](/help/packer/builds/starting) must be 5 GB or less. + +If you need to upload objects that are larger, such as dmgs, see the +[`packer push` "Limits" documentation](https://packer.io/docs/command-line/push.html) +for ways around this limitation. + +### Hardware Limitations + +Currently, each builder defined in the Packer template receives +the following hardware resources. This is subject to change. + +- 1 CPU core +- 2 GB of memory +- 20 GBs of disk space + +### Environment Variables + +You can set any number of environment variables that will be injected +into your build environment at runtime. These variables can be +used to configure your build with secrets or other key value configuration. + +Variables are encrypted and stored securely. + +Additionally, the following environment variables are automatically injected by +Atlas. All Atlas-injected environment variables will be prefixed with `ATLAS_` + +- `ATLAS_TOKEN` - This is a unique, per-build token that expires at the end of + build execution (e.g. `"abcd.atlasv1.ghjkl..."`) +- `ATLAS_BUILD_ID` - This is a unique identifier for this build (e.g. `"33"`) +- `ATLAS_BUILD_NUMBER` - This is a unique identifier for all builds in the same + scope (e.g. `"12"`) +- `ATLAS_BUILD_NAME` - This is the name of the build (e.g. `"mybuild"`). +- `ATLAS_BUILD_SLUG` - This is the full name of the build + (e.g. `"company/mybuild"`). +- `ATLAS_BUILD_USERNAME` - This is the username associated with the build + (e.g. `"sammy"`) +- `ATLAS_BUILD_CONFIGURATION_VERSION` - This is the unique, auto-incrementing + version for the [Packer build configuration](/help/glossary) (e.g. `"34"`). +- `ATLAS_BUILD_GITHUB_BRANCH` - This is the name of the branch + that the associated Packer build configuration version was ingressed from + (e.g. `master`). +- `ATLAS_BUILD_GITHUB_COMMIT_SHA` - This is the full commit hash + of the commit that the associated Packer build configuration version was + ingressed from (e.g. `"abcd1234..."`). +- `ATLAS_BUILD_GITHUB_TAG` - This is the name of the tag + that the associated Packer build configuration version was ingressed from + (e.g. `"v0.1.0"`). + +If the build was triggered by a new application version, the following +environment variables are also available: + +- `ATLAS_APPLICATION_NAME` - This is the name of the application connected to + the Packer build (e.g. `"myapp"`). +- `ATLAS_APPLICATION_SLUG` - This is the full name of the application connected + to the Packer build (e.g. `"company/myapp"`). +- `ATLAS_APPLICATION_USERNAME` - This is the username associated with the + application connected to the Packer build (e.g. `"sammy"`) +- `ATLAS_APPLICATION_VERSION` - This is the version of the application connected + to the Packer build (e.g. `"2"`). +- `ATLAS_APPLICATION_GITHUB_BRANCH` - This is the name of the branch that the + associated application version was ingressed from (e.g. `master`). +- `ATLAS_APPLICATION_GITHUB_COMMIT_SHA` - This is the full commit hash + of the commit that the associated application version was ingressed from + (e.g. `"abcd1234..."`). +- `ATLAS_APPLICATION_GITHUB_TAG` - This is the name of the tag that the + associated application version was ingressed from (e.g. `"v0.1.0"`). + +For any of the `GITHUB_` attributes, the value of the environment variable will +be the empty string (`""`) if the resource is not connected to GitHub or if the +resource was created outside of GitHub (like using `packer push` or +`vagrant push`). + + +### Base Artifact Variable Injection + +A base artifact can be selected on the "Settings" page for a build configuration. +During each build, the latest artifact version will have it's external +ID (such as an AMI for AWS) injected as an environment variable for the +environment. + +The keys for the following artifact types will be injected: + +- `aws.ami`: `ATLAS_BASE_ARTIFACT_AWS_AMI_ID` +- `amazon.ami`: `ATLAS_BASE_ARTIFACT_AMAZON_AMI_ID` +- `amazon.image`: `ATLAS_BASE_ARTIFACT_AMAZON_IMAGE_ID` +- `google.image`: `ATLAS_BASE_ARTIFACT_GOOGLE_IMAGE_ID` + +You can then reference this artifact in your Packer template, like this +AWS example: + + { + "variables": { + "base_ami": "{{env `ATLAS_BASE_ARTIFACT_AWS_AMI_ID`}}" + }, + "builders": [ + { + "type": "amazon-ebs", + "access_key": "", + "secret_key": "", + "region": "us-east-1", + "source_ami": "{{user `base_ami`}}" + } + ] + } + +- - - + +## Notes on Security + +Packer environment variables in Atlas are encrypted using [Vault](https://vaultproject.io) +and closely guarded and audited. If you have questions or concerns +about the safety of your configuration, please contact our security team +at [security@hashicorp.com](mailto:security@hashicorp.com). diff --git a/website/source/docs/enterprise/packer/builds/how-builds-run.html.md b/website/source/docs/enterprise/packer/builds/how-builds-run.html.md new file mode 100755 index 000000000..68c3dc163 --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/how-builds-run.html.md @@ -0,0 +1,28 @@ +--- +title: "How Packer Builds Run in Atlas" +--- + +# How Packer Builds Run in Atlas + +This briefly covers the internal process of running builds in Atlas. It's +not necessary to know this information, but may be valuable to +help understand implications of running in Atlas or debug failing +builds. + +### Steps of Execution + +1. A Packer template and directory of files is uploaded via Packer Push or GitHub +1. Atlas creates a version of the build configuration and waits for the upload +to complete. At this point, the version will be visible in the UI even if the upload has +not completed +1. Once the upload finishes, Atlas queues the build. This is potentially +split across multiple machines for faster processing +1. In the build environment, the package including the files and Packer template +are downloaded +1. `packer build` is run against the template in the build environment +1. Logs are streamed into the UI and stored +1. Any artifacts as part of the build are then uploaded via the public +Atlas artifact API, as they would be if Packer was executed locally +1. The build completes, the environment is teared down and status +updated within Atlas + diff --git a/website/source/docs/enterprise/packer/builds/index.html.md b/website/source/docs/enterprise/packer/builds/index.html.md new file mode 100755 index 000000000..b7021bf7b --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/index.html.md @@ -0,0 +1,28 @@ +--- +title: "About Builds" +--- + +# About Builds + +Builds are instances of `packer build` being run within Atlas. Every +build belongs to a build configuration. + +__Build configurations__ represent a set of Packer configuration versions and +builds run. It is used as a namespace within Atlas, Packer commands and URLs. Packer +configuration sent to Atlas are stored and versioned under +these build configurations. + +These __versions__ of Packer configuration can contain: + +- The Packer template, a JSON file which define one or +more builds by configuring the various components of Packer +- Any provisioning scripts or packages used by the template +- Applications that use the build as part of the [pipeline](/help/applications/build-pipeline) and merged into the version +prior to Atlas running Packer on it + +When Atlas receives a new version of Packer configuration and associated +scripts from GitHub or `packer push`, it automatically starts a new +Packer build. That Packer build runs in an isolated machine environment with the contents +of that version available to it. + +You can be alerted of build events with [Build Notifications](/help/packer/builds/notifications). diff --git a/website/source/docs/enterprise/packer/builds/installing-software.html.md b/website/source/docs/enterprise/packer/builds/installing-software.html.md new file mode 100755 index 000000000..21dbcbcf2 --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/installing-software.html.md @@ -0,0 +1,28 @@ +--- +title: "Installing Software" +--- + +# Installing Software + +Please review the [Packer Build Environment](/help/packer/builds/build-environment) +specification for important information on isolation, security, and hardware +limitations before continuing. + +In some cases, it may be necessary to install custom software to build your +artifact using Packer. The easiest way to install software on the Packer builder +is via the `shell-local` provisioner. This will execute commands on the host +machine running Packer. + + { + "provisioners": [ + { + "type": "shell-local", + "command": "sudo apt-get install -y customsoftware" + } + ] + } + +Please note that nothing is persisted between Packer builds, so you will need +to install custom software on each run. + +The Packer builders run the latest version of Ubuntu LTS. diff --git a/website/source/docs/enterprise/packer/builds/linked-applications.html.md b/website/source/docs/enterprise/packer/builds/linked-applications.html.md new file mode 100755 index 000000000..45352861d --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/linked-applications.html.md @@ -0,0 +1,7 @@ +--- +title: "Linked Applications" +--- + +# Linked Applications + +Linked applications have been deprecated in favor of the [application build pipeline](/help/applications/build-pipeline). diff --git a/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md b/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md new file mode 100755 index 000000000..ce0a54702 --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md @@ -0,0 +1,23 @@ +--- +title: "Managing Packer Versions" +--- + +# Managing Packer Versions + +Atlas does not automatically upgrade the version of Packer +used to run builds or compiles. This is intentional, as occasionally +there can be backwards incompatible changes made to Packer that cause templates to stop +building properly, or new versions that produce some other unexpected behavior. + +All upgrades must be performed by a user, but Atlas will display a notice +above any builds run with out of date versions. We encourage the use +of the latest version when possible. + +### Upgrading Packer + +1. Go the Settings tab of a build configuration or application +1. Go to the "Packer Version" section and select the version you +wish to use +1. Review the changelog for that version and previous versions +1. Click the save button. At this point, future builds will use that +version diff --git a/website/source/docs/enterprise/packer/builds/notifications.html.md b/website/source/docs/enterprise/packer/builds/notifications.html.md new file mode 100755 index 000000000..27f8f8ba6 --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/notifications.html.md @@ -0,0 +1,19 @@ +--- +title: "About Packer Build Notifications" +--- + +# About Packer Build Notifications + +Atlas can send build notifications to your organization via one of our +[supported notification methods](/help/consul/alerts/notification-methods). The +following events are configurable: + +- **Starting** - The build has begun. +- **Finished** - All build jobs have finished successfully. +- **Errored** - An error has occurred during one of the build jobs. +- **Canceled** - A user in Atlas has canceled the build. + +> Emails will include logs for the **Finished** and **Errored** events. + +You can toggle notifications for each of these events on the "Integrations" tab +of a build configuration. diff --git a/website/source/docs/enterprise/packer/builds/rebuilding.html.md b/website/source/docs/enterprise/packer/builds/rebuilding.html.md new file mode 100755 index 000000000..2d6f08a31 --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/rebuilding.html.md @@ -0,0 +1,16 @@ +--- +title: "Rebuilding Builds" +--- + +# Rebuilding Builds + +Sometimes builds fail due to temporary or remotely controlled conditions. + +In this case, it may make sense to "rebuild" a Packer build. To do so, +visit the build you wish to run again and click the Rebuild button. This +will take that exact version of configuration and run it again. + +You can rebuild at any point in history, but this may cause side effects +that are not wanted. For example, if you were to rebuild an old version +of a build, it may create the next version of an artifact that is then released, +causing a rollback of your configuration to occur. diff --git a/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md b/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md new file mode 100755 index 000000000..1173a705b --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md @@ -0,0 +1,32 @@ +--- +title: "Schedule Periodic Builds in Atlas" +--- + +# Schedule Periodic Builds in Atlas + +Atlas can automatically run a Packer build and +create artifacts on a specified schedule. This option is disabled by default and can be enabled by an +organization owner on a per-[environment](/help/glossary#environment) basis. + +On the specified interval, Atlas will automatically queue a build that +runs Packer for you, creating any artifacts and sending the appropriate +notifications. + +If your artifacts are used in any other environments and you have activated +the plan on aritfact upload feature, this may also queue Terraform +plans. + +This feature is useful for maintenance of images and automatic updates, +or to build nightly style images for staging or development environments. + +## Enabling Periodic Builds + +To enable periodic builds for a build, visit the build settings page in +Atlas and select the desired interval and click the save button to +persist the changes. An initial build may immediately run, depending +on the history, and then will automatically build at the specified interval. + +If you have run a build separately, either manually or triggered from GitHub +or Packer configuration version uploads, Atlas will not queue a new +build until the alloted time after the manual build ran. This means that +Atlas simply ensures that a build has been executed at the specified schedule. diff --git a/website/source/docs/enterprise/packer/builds/starting.html.md b/website/source/docs/enterprise/packer/builds/starting.html.md new file mode 100755 index 000000000..165daa150 --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/starting.html.md @@ -0,0 +1,68 @@ +--- +title: "Starting Packer Builds in Atlas" +--- + +# Starting Packer Builds in Atlas + +Packer builds can be started in Atlas in two ways: `packer push` +to upload the template and directory or via a GitHub connection that retrieves +the contents of a repository after changes to the default branch (usually +master). + +### Packer Push + +Packer `push` is a [Packer command](https://packer.io/docs/command-line/push.html) +that packages and uploads a Packer template and directory to Atlas. This then creates a build +in Atlas, which performs `packer build` against the uploaded template +and packaged directory. + +The directory is included in order to run any associated provisioners, +builds or post-processors that all might use local files. For example, +a shell script or set of Puppet modules used in a Packer build needs +to be part of the upload for Packer to be run remotely. + +By default, everything in your directory is uploaded as part of the push. + +However, it's not always the case that the entire directory should be uploaded. Often, +temporary or cache directories and files like `.git`, `.tmp` will be included by default. This +can cause Atlas to fail at certain sizes and should be avoided. You can +specify [exclusions](https://packer.io/docs/templates/push.html#exclude) to avoid this situation. + +Packer also allows for a [VCS option](https://packer.io/docs/templates/push.html#vcs) +that will detect your VCS (if there is one) and only upload the files that are tracked by the VCS. +This is useful for automatically excluding ignored files. In a VCS +like git, this basically does a `git ls-files`. + + +### GitHub Webhooks + +Optionally, GitHub can be used to import Packer templates and configurations. +When used within an organization, this can be extremely valuable for keeping +differences in environments and last mile changes from occurring before an +upload to Atlas. + +After you have [connected your GitHub account to Atlas](/settings/connections), +you can connect your [Build Configuration](/help/glossary#build-configuration) +to the target GitHub repository. The GitHub repository will be linked to the +Atlas Packer configuration, and GitHub will start sending webhooks to Atlas. +Certain GitHub webhook events, detailed below, will cause the repository to be +automatically ingressed into Atlas and stored, along with references to the +GitHub commits and authorship information. + +After each ingress the configuration will automatically build. + +You can disable an ingress by adding the text `[atlas skip]` or `[ci skip]` to +your commit message. + +Supported GitHub webhook events: + +- push (on by default) + - ingress when a tag is created + - ingress when the default branch is updated + - note: the default branch is either configured on your configuration's + integrations tab in Atlas, or if that is blank it is the GitHub + repository's default branch +- create (off by default) + - ingress when a tag is created + - note: if you want to only run on tag creation, turn on create events and + turn off push events diff --git a/website/source/docs/enterprise/packer/builds/troubleshooting.html.md b/website/source/docs/enterprise/packer/builds/troubleshooting.html.md new file mode 100755 index 000000000..438eebaf8 --- /dev/null +++ b/website/source/docs/enterprise/packer/builds/troubleshooting.html.md @@ -0,0 +1,112 @@ +--- +title: "Troubleshooting Failing Builds" +--- + +# Troubleshooting Failing Builds + +Packer builds can fail in Atlas for a number of reasons – improper +configuration, transient networking errors, and hardware constraints +are all possible. Below is a list of debugging options you can use. + +### Verbose Packer Logging + +You can [set a variable](/help/packer/builds/build-environment#environment-variables) in the UI that increases the logging verbosity +in Packer. Set the `PACKER_LOG` key to a value of `1` to accomplish this. + +After setting the variable, you'll need to [rebuild](/help/packer/builds/rebuilding). + +Verbose logging will be much louder than normal Packer logs and isn't +recommended for day-to-day operations. Once enabled, you'll be able to +see in further detail why things failed or what operations Packer was performing. + +This can also be used locally: + + PACKER_LOG=1 packer build ... + +### Hanging Builds + +Some VM builds, such as VMware or Virtualbox, may hang at various stages, +most notably `Waiting for SSH...`. + +Things to pay attention to when this happens: + +- SSH credentials must be properly configured. AWS keypairs should +match, SSH usernames should be correct, passwords should match, etc. +- Any VM preseed configuration should have the same SSH configuration +as your template defines + +A good way to debug this is to manually attempt to use the same SSH +configuration locally, running with `packer build -debug`. See +more about [debugging Packer builds](https://packer.io/docs/other/debugging.html). + +### Hardware Limitations + +Your build may be failing by requesting larger memory or +disk usage then is available. Read more about the [build environment](/help/packer/builds/build-environment#hardware-limitations). + +_Typically_ Packer builds that fail due to requesting hardware limits +that exceed Atlas's [hardware limitations](/help/packer/builds/build-environment#hardware-limitations) +will fail with a _The operation was canceled_ error message as shown below: + +``` +... +==> vmware-iso: Starting virtual machine... + vmware-iso: The VM will be run headless, without a GUI. If you want to + vmware-iso: view the screen of the VM, connect via VNC without a password to + vmware-iso: 127.0.0.1:5918 +==> vmware-iso: Error starting VM: VMware error: Error: The operation was canceled +==> vmware-iso: Waiting 4.604392397s to give VMware time to clean up... +==> vmware-iso: Deleting output directory... +Build 'vmware-iso' errored: Error starting VM: VMware error: Error: The operation was canceled + +==> Some builds didn't complete successfully and had errors: +--> vmware-iso: Error starting VM: VMware error: Error: The operation was canceled +``` + +### Local Debugging + +Sometimes it's faster to debug failing builds locally. In this case, +you'll want to [install Packer](/help/intro/updating-tools) and any providers (like Virtualbox) necessary. + +Because Atlas runs the open source version of Packer, there should be +no difference in execution between the two, other than the environment that +Packer is running in. For more on hardware constraints in the Atlas environment +read below. + +Once your builds are running smoothly locally you can push it up to Atlas +for versioning and automated builds. + +### Internal Errors + +This is a short list of internal errors and what they mean. + +- SIC-001: Your data was being ingressed from GitHub but failed +to properly unpack. This can be caused by bad permissions, using +symlinks or very large repository sizes. Using symlinks inside of the +packer directory, or the root of the repository, if the packer directory +is unspecified, will result in this internal error. +_**Note:** Most often this error occurs +when applications or builds are linked to a GitHub repository and the +directory and/or template paths are incorrect. Double check that the paths +specified when you linked the GitHub repository match the actual paths +to your template file._ +- SEC-001: Your data was being unpacked from a tarball uploaded to Atlas +and encountered an error. This can be caused by bad permissions, using +symlinks or very large tarball sizes. + +### Community Resources + +Packer is an open source project with an active community. If you're +having an issue specific to Packer, the best avenue for support is +the mailing list or IRC. All bug reports should go to GitHub. + +- Website: [packer.io](https://packer.io) +- GitHub: [github.com/mitchellh/packer](https://github.com/mitchellh/packer) +- IRC: `#packer-tool` on Freenode +- Mailing list: [Google Groups](http://groups.google.com/group/packer-tool) + +### Getting Support + +If you believe your build is failing as a result of a bug in Atlas, +or would like other support, please [email us](mailto:support@hashicorp.com). + diff --git a/website/source/docs/enterprise/packer/index.html.md b/website/source/docs/enterprise/packer/index.html.md new file mode 100755 index 000000000..8661047bb --- /dev/null +++ b/website/source/docs/enterprise/packer/index.html.md @@ -0,0 +1,16 @@ +--- +title: "Packer Features in Atlas" +--- + +# Packer Features in Atlas + +[Packer](https://packer.io) is a tool for creating images for platforms such as Amazon AWS, +OpenStack, VMware, VirtualBox, Docker, and more — all from a single +source configuration. + +This is a list of features specific to Packer +that Atlas provides. + +- [Running Packer Builds](/help/packer/builds) +- [Creating and Uploading AMIs](/help/packer/artifacts/creating-amis) +- [Creating Vagrant Boxes](/help/packer/artifacts/creating-vagrant-boxes) From 41619e0a5795bcc53abb34fc506f3418ea664bd1 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Wed, 22 Mar 2017 10:31:44 -0700 Subject: [PATCH 46/72] Added Packer docs to TFE --- .../packer/artifacts/creating-amis.html.md | 29 +++++---- .../artifacts/creating-vagrant-boxes.html.md | 36 +++++----- .../enterprise/packer/artifacts/index.html.md | 20 +++--- .../packer/builds/build-environment.html.md | 17 +++-- .../packer/builds/how-builds-run.html.md | 30 +++++---- .../enterprise/packer/builds/index.html.md | 21 +++--- .../packer/builds/installing-software.html.md | 8 ++- .../packer/builds/linked-applications.html.md | 8 ++- .../builds/managing-packer-versions.html.md | 16 +++-- .../packer/builds/notifications.html.md | 13 ++-- .../packer/builds/rebuilding.html.md | 6 +- .../packer/builds/scheduling-builds.html.md | 25 +++---- .../enterprise/packer/builds/starting.html.md | 27 ++++---- .../packer/builds/troubleshooting.html.md | 24 ++++--- .../docs/enterprise/packer/index.html.md | 17 +++-- website/source/layouts/docs.erb | 3 + website/source/layouts/packer.erb | 65 +++++++++++++++++++ 17 files changed, 237 insertions(+), 128 deletions(-) create mode 100644 website/source/layouts/packer.erb diff --git a/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md b/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md index ff61c7c1a..99b3b1467 100755 --- a/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md +++ b/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md @@ -1,29 +1,32 @@ --- -title: "Creating AMI Artifacts with Atlas" +layout: "packer" +page_title: "Creating AMI Artifacts" +sidebar_current: "docs-enterprise-packer-artifacts-amis" +description: |- + Creating AMI artifacts with Terraform Enterprise. --- -# Creating AMI Artifacts with Atlas +# Creating AMI Artifacts with Terraform Enterprise -In an [immutable infrastructure](/help/intro/use-cases/continuous-deployment-of-immutable-infrastructure) -workflow, it's important to version and store full images (artifacts) +In an immutable infrastructure workflow, it's important to version and store full images (artifacts) to be deployed. This section covers storing [AWS AMI](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) -images in Atlas to be queried and used later. +images in Terraform Enterprise to be queried and used later. -Note the actual AMI does _not get stored in Atlas_. Atlas +Note the actual AMI does _not get stored_. Terraform Enterprise simply keeps the AMI ID as a reference to the target image. Tools like Terraform can then use this in a deploy. ### Steps -If you run Packer in Atlas, the following will happen after a [push](/help/packer/builds/starting): +If you run Packer in Terraform Enterprise, the following will happen after a [push](/docs/enterprise/packer/builds/starting.html): -1. Atlas will run `packer build` against your template in our infrastructure. +1. Terraform Enterprise will run `packer build` against your template in our infrastructure. This spins up an AWS instance in your account and provisions it with any specified provisioners -1. Packer stops the instance and stores the result as an AMI in AWS -under your account. This then returns an ID (the artifact) that it passes to the Atlas post-processor -1. The Atlas post-processor creates and uploads the new artifact version with the -ID in Atlas of the type `amazon.image` for use later +2. Packer stops the instance and stores the result as an AMI in AWS +under your account. This then returns an ID (the artifact) that it passes to the post-processor +3. The post-processor creates and uploads the new artifact version with the +ID in Terraform Enterprise of the type `amazon.image` for use later ### Example @@ -43,7 +46,7 @@ Below is a complete example Packer template that starts an AWS instance. "source_ami": "ami-2ccc7a44", "instance_type": "c3.large", "ssh_username": "ubuntu", - "ami_name": "Atlas Example {{ timestamp }}" + "ami_name": "TFE Example {{ timestamp }}" } ], "post-processors": [ diff --git a/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md b/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md index 3d900fc34..55fe5d428 100755 --- a/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md +++ b/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md @@ -1,33 +1,28 @@ --- -title: "Creating Vagrant Boxes with Packer" +layout: "packer" +page_title: "Creating Vagrant Artifacts" +sidebar_current: "docs-enterprise-packer-artifacts-vagrant" +description: |- + Creating Vagrant artifacts with Terraform Enterprise. --- # Creating Vagrant Boxes with Packer We recommend using Packer to create boxes, as is it is fully repeatable and keeps a strong -history of changes within Atlas. +history of changes within Terraform Enterprise. ## Getting Started Using Packer requires more up front effort, but the repeatable and automated builds will end any manual management of boxes. Additionally, -all boxes will be stored and served from Atlas, keeping a history along - the way. - -Some useful Vagrant Boxes documentation will help you learn -about managing Vagrant boxes in Atlas. - -- [Vagrant Box Lifecycle](/help/vagrant/boxes/lifecycle) -- [Distributing Vagrant Boxes with Atlas](/help/vagrant/boxes/distributing) - -You can also read on to learn more about how Packer uploads and versions -the boxes with post-processors. +all boxes will be stored and served from Terraform Enterprise, keeping a history along +the way. ## Post-Processors Packer uses [post-processors](https://packer.io/docs/templates/post-processors.html) to define how to process images and artifacts after provisioning. Both the `vagrant` and `atlas` post-processors must be used in order -to upload Vagrant Boxes to Atlas via Packer. +to upload Vagrant Boxes to Terraform Enterprise via Packer. It's important that they are [sequenced](https://packer.io/docs/templates/post-processors.html) in the Packer template so they run in order. This is done by nesting arrays: @@ -62,10 +57,9 @@ passing it to the `atlas` post-processor. The input artifact (i.e and `.ovf` file) does not need to be kept when building Vagrant Boxes, as the resulting `.box` will contain it. -### Atlas Post-Processor +### Post-Processor -The [Atlas post-processor](https://packer.io/docs/post-processors/atlas.html) takes the resulting `.box` file and uploads -it to Atlas, adding metadata about the box version. +The [post-processor](https://packer.io/docs/post-processors/atlas.html) takes the resulting `.box` file and uploads it adding metadata about the box version. { "type": "atlas", @@ -79,20 +73,20 @@ it to Atlas, adding metadata about the box version. #### Attributes Required -These are all of the attributes for that Atlas post-processor +These are all of the attributes for that post-processor required for uploading Vagrant Boxes. A complete example is shown below. - `artifact`: The username and box name (`username/name`) you're creating the version of the box under. If the box doesn't exist, it will be automatically created -- `artifact_type`: This must be `vagrant.box`. Atlas uses this to determine +- `artifact_type`: This must be `vagrant.box`. Terraform Enterprise uses this to determine how to treat this artifact. For `vagrant.box` type artifacts, you can specify keys in the metadata block: - `provider`: The Vagrant provider for the box. Common providers are `virtualbox`, `vmware_desktop`, `aws` and so on _(required)_ -- `version`: This is the Vagrant box [version](/help/vagrant/boxes/lifecycle) and is constrained to the +- `version`: This is the Vagrant box version and is constrained to the same formatting as in the web UI: `*.*.*` _(optional, but required for boxes with multiple providers). The version will increment on the minor version if left blank (e.g the initial version will be set to 0.1.0, the subsequent version will be set to 0.2.0)._ - `description`: This is the desciption that will be shown with the @@ -100,7 +94,7 @@ version of the box. You can use Markdown for links and style. _(optional)_ ## Example -An example post-processor block for Atlas and Vagrant is below. In this example, +An example post-processor block for Terraform Enterprise and Vagrant is below. In this example, the build runs on both VMware and Virtualbox creating two different providers for the same box version (`0.0.1`). diff --git a/website/source/docs/enterprise/packer/artifacts/index.html.md b/website/source/docs/enterprise/packer/artifacts/index.html.md index fbd25ca89..3f93b2093 100755 --- a/website/source/docs/enterprise/packer/artifacts/index.html.md +++ b/website/source/docs/enterprise/packer/artifacts/index.html.md @@ -1,17 +1,21 @@ --- -title: "About Packer and Artifacts " +layout: "packer" +page_title: "About Packer and Artifacts" +sidebar_current: "docs-enterprise-packer-artifacts" +description: |- + Packer creates and uploads artifacts to Terraform Enterprise. --- # About Packer and Artifacts -Packer creates and uploads artifacts to Atlas. This is done -with the [Atlas post-processor](https://packer.io/docs/post-processors/atlas.html). +Packer creates and uploads artifacts to Terraform Enterprise. This is done +with the [post-processor](https://packer.io/docs/post-processors/atlas.html). -Artifacts can then be used in Atlas to deploy services or access +Artifacts can then be used to deploy services or access via Vagrant. Artifacts are generic, but can be of varying types. -These types define different behavior within Atlas. +These types define different behavior within Terraform Enterprise. -For uploading artifacts to Atlas, `artifact_type` can be set to any +For uploading artifacts `artifact_type` can be set to any unique identifier, however, the following are recommended for consistency. - `amazon.image` @@ -28,9 +32,9 @@ unique identifier, however, the following are recommended for consistency. - `application.archive` - `vagrant.box` -Packer can create artifacts when running in Atlas or locally. +Packer can create artifacts when running in Terraform Enterprise or locally. This is possible due to the post-processors use of the public artifact API to store the artifacts. -You can read more about artifacts and their use in the [Terraform section](/help/terraform/features) +You can read more about artifacts and their use in the [Terraform section](/docs/enterprise/) of the documentation. diff --git a/website/source/docs/enterprise/packer/builds/build-environment.html.md b/website/source/docs/enterprise/packer/builds/build-environment.html.md index fb6f31a90..e10db2a45 100755 --- a/website/source/docs/enterprise/packer/builds/build-environment.html.md +++ b/website/source/docs/enterprise/packer/builds/build-environment.html.md @@ -1,14 +1,18 @@ --- -title: "Packer Build Environment" +layout: "packer" +page_title: "Packer Build Environment" +sidebar_current: "docs-enterprise-packer-builds-environment" +description: |- + This page outlines the environment that Packer runs in within Terraform Enterprise. --- # Packer Build Environment -This page outlines the environment that Packer runs in within Atlas. +This page outlines the environment that Packer runs in within Terraform Enterprise. ### Supported Builders -Atlas currently supports running the following Packer builders: +Terraform Enterprise currently supports running the following Packer builders: - amazon-chroot - amazon-ebs @@ -48,7 +52,7 @@ An example of this with the Shell provisioner is below. ] We encourage use of relative paths over absolute paths to maintain portability -between Atlas and local builds. +between Terraform Enterprise and local builds. The total size of all files in the package being uploaded via [Packer push or GitHub](/help/packer/builds/starting) must be 5 GB or less. @@ -74,8 +78,7 @@ used to configure your build with secrets or other key value configuration. Variables are encrypted and stored securely. -Additionally, the following environment variables are automatically injected by -Atlas. All Atlas-injected environment variables will be prefixed with `ATLAS_` +Additionally, the following environment variables are automatically injected. All injected environment variables will be prefixed with `ATLAS_` - `ATLAS_TOKEN` - This is a unique, per-build token that expires at the end of build execution (e.g. `"abcd.atlasv1.ghjkl..."`) @@ -160,7 +163,7 @@ AWS example: ## Notes on Security -Packer environment variables in Atlas are encrypted using [Vault](https://vaultproject.io) +Packer environment variables in Terraform Enterprise are encrypted using [Vault](https://vaultproject.io) and closely guarded and audited. If you have questions or concerns about the safety of your configuration, please contact our security team at [security@hashicorp.com](mailto:security@hashicorp.com). diff --git a/website/source/docs/enterprise/packer/builds/how-builds-run.html.md b/website/source/docs/enterprise/packer/builds/how-builds-run.html.md index 68c3dc163..4c4385be0 100755 --- a/website/source/docs/enterprise/packer/builds/how-builds-run.html.md +++ b/website/source/docs/enterprise/packer/builds/how-builds-run.html.md @@ -1,28 +1,32 @@ --- -title: "How Packer Builds Run in Atlas" +layout: "packer" +page_title: "Running Packer Builds" +sidebar_current: "docs-enterprise-packer-builds-runbuilds" +description: |- + This briefly covers the internal process of running builds in Terraform Enterprise. --- -# How Packer Builds Run in Atlas +# How Packer Builds Run in Terraform Enterprise -This briefly covers the internal process of running builds in Atlas. It's +This briefly covers the internal process of running builds in Terraform Enterprise. It's not necessary to know this information, but may be valuable to -help understand implications of running in Atlas or debug failing +help understand implications of running or debugging failing builds. ### Steps of Execution 1. A Packer template and directory of files is uploaded via Packer Push or GitHub -1. Atlas creates a version of the build configuration and waits for the upload +2. Terraform Enterprise creates a version of the build configuration and waits for the upload to complete. At this point, the version will be visible in the UI even if the upload has not completed -1. Once the upload finishes, Atlas queues the build. This is potentially +3. Once the upload finishes, the build is queued. This is potentially split across multiple machines for faster processing -1. In the build environment, the package including the files and Packer template +4. In the build environment, the package including the files and Packer template are downloaded -1. `packer build` is run against the template in the build environment -1. Logs are streamed into the UI and stored -1. Any artifacts as part of the build are then uploaded via the public -Atlas artifact API, as they would be if Packer was executed locally -1. The build completes, the environment is teared down and status -updated within Atlas +5. `packer build` is run against the template in the build environment +6. Logs are streamed into the UI and stored +7. Any artifacts as part of the build are then uploaded via the public +artifact API, as they would be if Packer was executed locally +8. The build completes, the environment is teared down and status +updated diff --git a/website/source/docs/enterprise/packer/builds/index.html.md b/website/source/docs/enterprise/packer/builds/index.html.md index b7021bf7b..3c187a638 100755 --- a/website/source/docs/enterprise/packer/builds/index.html.md +++ b/website/source/docs/enterprise/packer/builds/index.html.md @@ -1,15 +1,19 @@ --- -title: "About Builds" +layout: "packer" +page_title: "About Builds" +sidebar_current: "docs-enterprise-packer-builds" +description: |- + Builds are instances of `packer build` being run within Terraform Enterprise. --- # About Builds -Builds are instances of `packer build` being run within Atlas. Every +Builds are instances of `packer build` being run within Terraform Enterprise. Every build belongs to a build configuration. __Build configurations__ represent a set of Packer configuration versions and -builds run. It is used as a namespace within Atlas, Packer commands and URLs. Packer -configuration sent to Atlas are stored and versioned under +builds run. It is used as a namespace within Terraform Enterprise, Packer commands and URLs. Packer +configuration sent to Terraform Enterprise are stored and versioned under these build configurations. These __versions__ of Packer configuration can contain: @@ -17,12 +21,11 @@ These __versions__ of Packer configuration can contain: - The Packer template, a JSON file which define one or more builds by configuring the various components of Packer - Any provisioning scripts or packages used by the template -- Applications that use the build as part of the [pipeline](/help/applications/build-pipeline) and merged into the version -prior to Atlas running Packer on it +- Applications that use the build as part of the pipeline and merged into the version prior to running Packer on it -When Atlas receives a new version of Packer configuration and associated -scripts from GitHub or `packer push`, it automatically starts a new +When a new version of Packer configuration and associated +scripts from GitHub or `packer push` is recieved, it automatically starts a new Packer build. That Packer build runs in an isolated machine environment with the contents of that version available to it. -You can be alerted of build events with [Build Notifications](/help/packer/builds/notifications). +You can be alerted of build events with [Build Notifications](/docs/enterprise/packer/builds/notifications.html). diff --git a/website/source/docs/enterprise/packer/builds/installing-software.html.md b/website/source/docs/enterprise/packer/builds/installing-software.html.md index 21dbcbcf2..e98632a84 100755 --- a/website/source/docs/enterprise/packer/builds/installing-software.html.md +++ b/website/source/docs/enterprise/packer/builds/installing-software.html.md @@ -1,10 +1,14 @@ --- -title: "Installing Software" +layout: "packer" +page_title: "Installing Software with Packer" +sidebar_current: "docs-enterprise-packer-builds-installing" +description: |- + Installing software with Packer. --- # Installing Software -Please review the [Packer Build Environment](/help/packer/builds/build-environment) +Please review the [Packer Build Environment](/docs/enterprise/builds/build-environment.html) specification for important information on isolation, security, and hardware limitations before continuing. diff --git a/website/source/docs/enterprise/packer/builds/linked-applications.html.md b/website/source/docs/enterprise/packer/builds/linked-applications.html.md index 45352861d..89cce3a5e 100755 --- a/website/source/docs/enterprise/packer/builds/linked-applications.html.md +++ b/website/source/docs/enterprise/packer/builds/linked-applications.html.md @@ -1,7 +1,11 @@ --- -title: "Linked Applications" +layout: "packer" +page_title: "Linked Applications" +sidebar_current: "docs-enterprise-packer-builds-linkedapps" +description: |- + Linked applications have been deprecated in favor of the application build pipeline. --- # Linked Applications -Linked applications have been deprecated in favor of the [application build pipeline](/help/applications/build-pipeline). +Linked applications have been deprecated in favor of the application build pipeline. diff --git a/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md b/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md index ce0a54702..369c90459 100755 --- a/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md +++ b/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md @@ -1,23 +1,27 @@ --- -title: "Managing Packer Versions" +layout: "packer" +page_title: "Managing Packer Versions" +sidebar_current: "docs-enterprise-packer-builds-versions" +description: |- + Terraform Enterprise does not automatically upgrade the version of Packer used to run builds or compiles. --- # Managing Packer Versions -Atlas does not automatically upgrade the version of Packer +Terraform Enterprise does not automatically upgrade the version of Packer used to run builds or compiles. This is intentional, as occasionally there can be backwards incompatible changes made to Packer that cause templates to stop building properly, or new versions that produce some other unexpected behavior. -All upgrades must be performed by a user, but Atlas will display a notice +All upgrades must be performed by a user, but Terraform Enterprise will display a notice above any builds run with out of date versions. We encourage the use of the latest version when possible. ### Upgrading Packer 1. Go the Settings tab of a build configuration or application -1. Go to the "Packer Version" section and select the version you +2. Go to the "Packer Version" section and select the version you wish to use -1. Review the changelog for that version and previous versions -1. Click the save button. At this point, future builds will use that +3. Review the changelog for that version and previous versions +4. Click the save button. At this point, future builds will use that version diff --git a/website/source/docs/enterprise/packer/builds/notifications.html.md b/website/source/docs/enterprise/packer/builds/notifications.html.md index 27f8f8ba6..1a796b2cc 100755 --- a/website/source/docs/enterprise/packer/builds/notifications.html.md +++ b/website/source/docs/enterprise/packer/builds/notifications.html.md @@ -1,17 +1,20 @@ --- -title: "About Packer Build Notifications" +layout: "packer" +page_title: "About Packer Build Notifications" +sidebar_current: "docs-enterprise-packer-builds-notifications" +description: |- + Terraform Enterprise can send build notifications to your organization. --- # About Packer Build Notifications -Atlas can send build notifications to your organization via one of our -[supported notification methods](/help/consul/alerts/notification-methods). The -following events are configurable: +Terraform Enterprise can send build notifications to your organization for the +following events: - **Starting** - The build has begun. - **Finished** - All build jobs have finished successfully. - **Errored** - An error has occurred during one of the build jobs. -- **Canceled** - A user in Atlas has canceled the build. +- **Canceled** - A user has canceled the build. > Emails will include logs for the **Finished** and **Errored** events. diff --git a/website/source/docs/enterprise/packer/builds/rebuilding.html.md b/website/source/docs/enterprise/packer/builds/rebuilding.html.md index 2d6f08a31..4a6050992 100755 --- a/website/source/docs/enterprise/packer/builds/rebuilding.html.md +++ b/website/source/docs/enterprise/packer/builds/rebuilding.html.md @@ -1,5 +1,9 @@ --- -title: "Rebuilding Builds" +layout: "packer" +page_title: "Rebuilding Builds" +sidebar_current: "docs-enterprise-packer-builds-rebuilding" +description: |- + Sometimes builds fail due to temporary or remotely controlled conditions. --- # Rebuilding Builds diff --git a/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md b/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md index 1173a705b..df55a8928 100755 --- a/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md +++ b/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md @@ -1,15 +1,19 @@ --- -title: "Schedule Periodic Builds in Atlas" +layout: "packer" +page_title: "Schedule Periodic Builds" +sidebar_current: "docs-enterprise-packer-builds-scheduling" +description: |- + Terraform Enterprise can automatically run a Packer build and create artifacts on a specified schedule. --- -# Schedule Periodic Builds in Atlas +# Schedule Periodic Builds in Terraform Enterprise -Atlas can automatically run a Packer build and +Terraform Enterprise can automatically run a Packer build and create artifacts on a specified schedule. This option is disabled by default and can be enabled by an -organization owner on a per-[environment](/help/glossary#environment) basis. +organization owner on a per-[environment](/docs/enterprise/glossary#environment) basis. -On the specified interval, Atlas will automatically queue a build that -runs Packer for you, creating any artifacts and sending the appropriate +On the specified interval, builds will be automatically queued that +run Packer for you, creating any artifacts and sending the appropriate notifications. If your artifacts are used in any other environments and you have activated @@ -21,12 +25,9 @@ or to build nightly style images for staging or development environments. ## Enabling Periodic Builds -To enable periodic builds for a build, visit the build settings page in -Atlas and select the desired interval and click the save button to -persist the changes. An initial build may immediately run, depending +To enable periodic builds for a build, visit the build settings page and select the desired interval and click the save button to persist the changes. An initial build may immediately run, depending on the history, and then will automatically build at the specified interval. If you have run a build separately, either manually or triggered from GitHub -or Packer configuration version uploads, Atlas will not queue a new -build until the alloted time after the manual build ran. This means that -Atlas simply ensures that a build has been executed at the specified schedule. +or Packer configuration version uploads, Terraform Enterprise will not queue a new +build until the alloted time after the manual build ran. This ensures that a build has been executed at the specified schedule. diff --git a/website/source/docs/enterprise/packer/builds/starting.html.md b/website/source/docs/enterprise/packer/builds/starting.html.md index 165daa150..c301aa147 100755 --- a/website/source/docs/enterprise/packer/builds/starting.html.md +++ b/website/source/docs/enterprise/packer/builds/starting.html.md @@ -1,10 +1,14 @@ --- -title: "Starting Packer Builds in Atlas" +layout: "packer" +page_title: "Starting Packer Builds in Terraform Enterprise" +sidebar_current: "docs-enterprise-packer-builds-starting" +description: |- + Packer builds can be started in Terraform Enterprise in two ways. This post is about how. --- -# Starting Packer Builds in Atlas +# Starting Packer Builds in Terraform Enterprise -Packer builds can be started in Atlas in two ways: `packer push` +Packer builds can be started in in two ways: `packer push` to upload the template and directory or via a GitHub connection that retrieves the contents of a repository after changes to the default branch (usually master). @@ -12,8 +16,7 @@ master). ### Packer Push Packer `push` is a [Packer command](https://packer.io/docs/command-line/push.html) -that packages and uploads a Packer template and directory to Atlas. This then creates a build -in Atlas, which performs `packer build` against the uploaded template +that packages and uploads a Packer template and directory. This then creates a build which performs `packer build` against the uploaded template and packaged directory. The directory is included in order to run any associated provisioners, @@ -25,7 +28,7 @@ By default, everything in your directory is uploaded as part of the push. However, it's not always the case that the entire directory should be uploaded. Often, temporary or cache directories and files like `.git`, `.tmp` will be included by default. This -can cause Atlas to fail at certain sizes and should be avoided. You can +can cause builds to fail at certain sizes and should be avoided. You can specify [exclusions](https://packer.io/docs/templates/push.html#exclude) to avoid this situation. Packer also allows for a [VCS option](https://packer.io/docs/templates/push.html#vcs) @@ -39,14 +42,14 @@ like git, this basically does a `git ls-files`. Optionally, GitHub can be used to import Packer templates and configurations. When used within an organization, this can be extremely valuable for keeping differences in environments and last mile changes from occurring before an -upload to Atlas. +upload. -After you have [connected your GitHub account to Atlas](/settings/connections), -you can connect your [Build Configuration](/help/glossary#build-configuration) +After you have [connected your GitHub account](/docs/enterprise/vcs/github.html) to Terraform Enterprise, +you can connect your [Build Configuration](/docs/enterprise/glossary#build-configuration) to the target GitHub repository. The GitHub repository will be linked to the -Atlas Packer configuration, and GitHub will start sending webhooks to Atlas. +Packer configuration, and GitHub will start sending webhooks. Certain GitHub webhook events, detailed below, will cause the repository to be -automatically ingressed into Atlas and stored, along with references to the +automatically ingressed into Terraform Enterprise and stored, along with references to the GitHub commits and authorship information. After each ingress the configuration will automatically build. @@ -60,7 +63,7 @@ Supported GitHub webhook events: - ingress when a tag is created - ingress when the default branch is updated - note: the default branch is either configured on your configuration's - integrations tab in Atlas, or if that is blank it is the GitHub + integrations tab in Terraform Enterprise, or if that is blank it is the GitHub repository's default branch - create (off by default) - ingress when a tag is created diff --git a/website/source/docs/enterprise/packer/builds/troubleshooting.html.md b/website/source/docs/enterprise/packer/builds/troubleshooting.html.md index 438eebaf8..3980e8434 100755 --- a/website/source/docs/enterprise/packer/builds/troubleshooting.html.md +++ b/website/source/docs/enterprise/packer/builds/troubleshooting.html.md @@ -1,10 +1,14 @@ --- -title: "Troubleshooting Failing Builds" +layout: "packer" +page_title: "Troubleshooting Failing Builds" +sidebar_current: "docs-enterprise-packer-builds-troubleshooting" +description: |- + Packer builds can fail in Terraform Enterprise for a number of reasons – improper configuration, transient networking errors, and hardware constraints are all possible. --- # Troubleshooting Failing Builds -Packer builds can fail in Atlas for a number of reasons – improper +Packer builds can fail in Terraform Enterprise for a number of reasons – improper configuration, transient networking errors, and hardware constraints are all possible. Below is a list of debugging options you can use. @@ -42,10 +46,10 @@ more about [debugging Packer builds](https://packer.io/docs/other/debugging.html ### Hardware Limitations Your build may be failing by requesting larger memory or -disk usage then is available. Read more about the [build environment](/help/packer/builds/build-environment#hardware-limitations). +disk usage then is available. Read more about the [build environment](/docs/enterprise/packer/builds/build-environment#hardware-limitations). _Typically_ Packer builds that fail due to requesting hardware limits -that exceed Atlas's [hardware limitations](/help/packer/builds/build-environment#hardware-limitations) +that exceed Terraform Enterprise's [hardware limitations](/docs/enterprise/packer/builds/build-environment#hardware-limitations) will fail with a _The operation was canceled_ error message as shown below: ``` @@ -66,14 +70,14 @@ Build 'vmware-iso' errored: Error starting VM: VMware error: Error: The operatio ### Local Debugging Sometimes it's faster to debug failing builds locally. In this case, -you'll want to [install Packer](/help/intro/updating-tools) and any providers (like Virtualbox) necessary. +you'll want to [install Packer](https://www.packer.io/intro/getting-started/setup.html) and any providers (like Virtualbox) necessary. -Because Atlas runs the open source version of Packer, there should be +Because Terraform Enterprise runs the open source version of Packer, there should be no difference in execution between the two, other than the environment that -Packer is running in. For more on hardware constraints in the Atlas environment +Packer is running in. For more on hardware constraints in the Terraform Enterprise environment read below. -Once your builds are running smoothly locally you can push it up to Atlas +Once your builds are running smoothly locally you can push it up to Terraform Enterprise for versioning and automated builds. ### Internal Errors @@ -90,7 +94,7 @@ when applications or builds are linked to a GitHub repository and the directory and/or template paths are incorrect. Double check that the paths specified when you linked the GitHub repository match the actual paths to your template file._ -- SEC-001: Your data was being unpacked from a tarball uploaded to Atlas +- SEC-001: Your data was being unpacked from a tarball uploaded and encountered an error. This can be caused by bad permissions, using symlinks or very large tarball sizes. @@ -107,6 +111,6 @@ the mailing list or IRC. All bug reports should go to GitHub. ### Getting Support -If you believe your build is failing as a result of a bug in Atlas, +If you believe your build is failing as a result of a bug in Terraform Enterprise, or would like other support, please [email us](mailto:support@hashicorp.com). diff --git a/website/source/docs/enterprise/packer/index.html.md b/website/source/docs/enterprise/packer/index.html.md index 8661047bb..3055e5c0f 100755 --- a/website/source/docs/enterprise/packer/index.html.md +++ b/website/source/docs/enterprise/packer/index.html.md @@ -1,16 +1,19 @@ --- -title: "Packer Features in Atlas" +layout: "packer" +page_title: "Packer Features in Terraform Enterprise" +sidebar_current: "docs-enterprise-packer" +description: |- + Packer is a tool for creating images for platforms such as Amazon AWS, OpenStack, VMware, VirtualBox, Docker, and more — all from a single source configuration. --- -# Packer Features in Atlas +# Packer Features in Terraform Enterprise [Packer](https://packer.io) is a tool for creating images for platforms such as Amazon AWS, OpenStack, VMware, VirtualBox, Docker, and more — all from a single source configuration. -This is a list of features specific to Packer -that Atlas provides. +This is a list of features specific to Packer that Terraform Enterprise provides. -- [Running Packer Builds](/help/packer/builds) -- [Creating and Uploading AMIs](/help/packer/artifacts/creating-amis) -- [Creating Vagrant Boxes](/help/packer/artifacts/creating-vagrant-boxes) +- [Running Packer Builds](/docs/enterprise/packer/builds/index.html) +- [Creating and Uploading AMIs](/docs/enterprise/packer/artifacts/creating-amis/index.html) +- [Creating Vagrant Boxes](/docs/enterprise/packer/artifacts/creating-vagrant-boxes/index.html) diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 2d66abbe6..287c15bb3 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -564,6 +564,9 @@ > Organizations + > + Packer + > API diff --git a/website/source/layouts/packer.erb b/website/source/layouts/packer.erb new file mode 100644 index 000000000..7062734de --- /dev/null +++ b/website/source/layouts/packer.erb @@ -0,0 +1,65 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> From 7571ca6c6fd0596c012b818bd8dee21e440c7025 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Wed, 22 Mar 2017 16:23:08 -0700 Subject: [PATCH 47/72] TFE Docs text edits, added support, docs css for tables --- .../api/configuration-versions.html.md | 2 +- .../enterprise/api/configurations.html.md | 4 +- .../docs/enterprise/api/environments.html.md | 4 +- .../source/docs/enterprise/api/runs.html.md | 2 +- .../source/docs/enterprise/api/states.html.md | 2 +- .../source/docs/enterprise/api/users.html.md | 2 +- .../docs/enterprise/billing/index.html.md | 101 ++++++++++++++---- .../source/docs/enterprise/faq/index.html.md | 4 +- .../authentication-policy.html.md | 2 +- .../enterprise/runs/notifications.html.md | 4 +- .../docs/enterprise/runs/starting.html.md | 2 +- .../enterprise/state/collaborating.html.md | 2 +- .../source/docs/enterprise/support.html.md | 38 +++++++ .../source/docs/enterprise/vcs/github.html.md | 3 +- website/source/layouts/docs.erb | 9 +- website/source/layouts/faq.erb | 2 +- 16 files changed, 143 insertions(+), 40 deletions(-) create mode 100755 website/source/docs/enterprise/support.html.md diff --git a/website/source/docs/enterprise/api/configuration-versions.html.md b/website/source/docs/enterprise/api/configuration-versions.html.md index 9c737a811..b4804bd93 100755 --- a/website/source/docs/enterprise/api/configuration-versions.html.md +++ b/website/source/docs/enterprise/api/configuration-versions.html.md @@ -17,7 +17,7 @@ to include the necessary variables for the Terraform configuration. ### Configuration Version Attributes -
Attribute Description
+
diff --git a/website/source/docs/enterprise/api/configurations.html.md b/website/source/docs/enterprise/api/configurations.html.md index ee8cdfd9f..0bfd29a9e 100755 --- a/website/source/docs/enterprise/api/configurations.html.md +++ b/website/source/docs/enterprise/api/configurations.html.md @@ -11,13 +11,13 @@ description: |- A configuration respresents settings associated with a resource that runs Terraform with versions of Terraform configuration. -Configurations have many [configuration versions](/help/api/terraform/configuration-versions) +Configurations have many [configuration versions](/docs/enterprise/api/configuration-versions.html) which represent versions of Terraform configuration templates and other associated configuration. ### Configuration Attributes -
Attribute Description
+
diff --git a/website/source/docs/enterprise/api/environments.html.md b/website/source/docs/enterprise/api/environments.html.md index e322e5634..8c3fe3b92 100755 --- a/website/source/docs/enterprise/api/environments.html.md +++ b/website/source/docs/enterprise/api/environments.html.md @@ -15,7 +15,7 @@ This documentation covers the environment interactions with Terraform. ### Environment Attributes -
Attribute Description
+
@@ -29,7 +29,7 @@ This documentation covers the environment interactions with Terraform.
Attribute DescriptionYes
- +
Note: Only string variables can be updated via the API currently. diff --git a/website/source/docs/enterprise/api/runs.html.md b/website/source/docs/enterprise/api/runs.html.md index 7a461ce03..43ec3f1a1 100755 --- a/website/source/docs/enterprise/api/runs.html.md +++ b/website/source/docs/enterprise/api/runs.html.md @@ -16,7 +16,7 @@ can be configured to auto-apply to avoid this. ### Run Attributes - +
diff --git a/website/source/docs/enterprise/api/states.html.md b/website/source/docs/enterprise/api/states.html.md index 6a54d9175..7760a1ca5 100755 --- a/website/source/docs/enterprise/api/states.html.md +++ b/website/source/docs/enterprise/api/states.html.md @@ -12,7 +12,7 @@ State represents the status of your infrastructure at the last time Terraform wa ### State Attributes -
Attribute Description
+
diff --git a/website/source/docs/enterprise/api/users.html.md b/website/source/docs/enterprise/api/users.html.md index f6d771753..e72ea5e3a 100755 --- a/website/source/docs/enterprise/api/users.html.md +++ b/website/source/docs/enterprise/api/users.html.md @@ -12,7 +12,7 @@ Users are both users and organizations in Terraform Enterprise. They are the parent resource of all resources. Currently, only the retrieval of users is avaiable on the API. Additionally, -only [box](/help/api/vagrant/boxes) resources will be listed. Boxes will +only Vagrant box resources will be listed. Boxes will be returned based on permissions over the organization, or user. ### Actions diff --git a/website/source/docs/enterprise/billing/index.html.md b/website/source/docs/enterprise/billing/index.html.md index 25ba5a99e..3cd8c37db 100755 --- a/website/source/docs/enterprise/billing/index.html.md +++ b/website/source/docs/enterprise/billing/index.html.md @@ -24,24 +24,89 @@ determined by a property of the resource. The `count` meta-parameter is used for all compute resource types. The complete list of compute resources and resource arguments for determining managed node count is below. -| Provider | Resource Type | Resource Property | -|:-:|:-:|:-:| -| AWS | `aws_instance` | `count` | -| AWS | `aws_autoscaling_group` | `count` `desired_capacity` | -| Azure | `azure_instance` | `count` | -| Azure | `azurerm_virtual_machine` | `count` | -| CenturyLink Cloud | `clc_server` | `count` | -| CloudStack | `cloudstack_instance` | `count` | -| DigitalOcean | `digitalocean_droplet` | `count` | -| Google Cloud | `google_compute_instance` | `count` | -| Google Cloud | `compute_instance_group_manager` | `count` `target_size` | -| Heroku | `heroku_app` | `count` | -| OpenStack | `openstack_compute_instance_v2` | `count` | -| Packet | `packet_device` | `count` | -| Triton | `triton_machine` | `count` | -| VMware vCloud Director | `vcd_vapp` | `count` | -| VMware vSphere provider | `vsphere_virtual_machine` | `count` | - +
Attribute Description
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProviderResource TypeResource Property
AWS`aws_instance``count`
AWS + `aws_autoscaling_group``count` `desired_capacity`
Azure`azure_instance``count`
Azure`azurerm_virtual_machine``count`
CenturyLink Cloud`clc_server``count`
CloudStack`cloudstack_instance``count`
DigitalOcean`digitalocean_droplet``count`
Google Cloud`google_compute_instance``count`
Google Cloud`compute_instance_group_manager``count` `target_size`
Heroku`heroku_app``count`
OpenStack`openstack_compute_instance_v2``count`
Packet`packet_device``count`
Triton`triton_machine``count`
VMware vCloud Director`vcd_vapp``count`
VMware vSphere provider`vsphere_virtual_machine``count`
Terraform Enterprise includes unlimited Packer builds and artifact storage. diff --git a/website/source/docs/enterprise/faq/index.html.md b/website/source/docs/enterprise/faq/index.html.md index b0d037cae..8d548fcfa 100755 --- a/website/source/docs/enterprise/faq/index.html.md +++ b/website/source/docs/enterprise/faq/index.html.md @@ -8,6 +8,6 @@ description: |- # Frequently Asked Questions -[Monolithic Artifacts](/docs/enterprise/faq/monolithic-artifacts) - *How do I build multiple applications into one artifact?* +[Monolithic Artifacts](/docs/enterprise/faq/monolithic-artifacts.html) - *How do I build multiple applications into one artifact?* -[Rolling Deployments](/docs/enterprise/faq/rolling-deployments) - *How do I configure rolling deployments?* +[Rolling Deployments](/docs/enterprise/faq/rolling-deployments.html) - *How do I configure rolling deployments?* diff --git a/website/source/docs/enterprise/organizations/authentication-policy.html.md b/website/source/docs/enterprise/organizations/authentication-policy.html.md index 32bfbf1f6..66c572848 100755 --- a/website/source/docs/enterprise/organizations/authentication-policy.html.md +++ b/website/source/docs/enterprise/organizations/authentication-policy.html.md @@ -13,7 +13,7 @@ Because organization membership affords members access to potentially sensitive ## Requiring Two-Factor Authentication -Organization owners can require that all organization team members use [two-factor authentication](/docs/enterprise/user-accounts/authentication). Those that lack two-factor authentication will be locked out of the web interface until they enable it or leave the organization. +Organization owners can require that all organization team members use [two-factor authentication](/docs/enterprise/user-accounts/authentication.html). Those that lack two-factor authentication will be locked out of the web interface until they enable it or leave the organization. Visit your organization's configuration page to enable this feature. All organization owners must have two-factor authentication enabled to require the practice organization-wide. Note: locked-out users are still be able to interact with Terraform Enterprise using their `ATLAS_TOKEN`. diff --git a/website/source/docs/enterprise/runs/notifications.html.md b/website/source/docs/enterprise/runs/notifications.html.md index 677e2474e..f7e52e9e2 100755 --- a/website/source/docs/enterprise/runs/notifications.html.md +++ b/website/source/docs/enterprise/runs/notifications.html.md @@ -9,9 +9,7 @@ description: |- # Terraform Run Notifications -Terraform Enterprise can send run notifications to your organization via one of our [supported -notification methods](https://atlas.hashicorp.com/help/consul/alerts/notification-methods). The following -events are configurable: +Terraform Enterprise can send run notifications, the following events are configurable: - **Needs Confirmation** - The plan phase has succeeded, and there are changes that need to be confirmed before applying. diff --git a/website/source/docs/enterprise/runs/starting.html.md b/website/source/docs/enterprise/runs/starting.html.md index 032291904..b2796121a 100755 --- a/website/source/docs/enterprise/runs/starting.html.md +++ b/website/source/docs/enterprise/runs/starting.html.md @@ -97,7 +97,7 @@ artifact named "worker": } When a new version of the and artifact "worker" is uploaded either manually -or as the output of a [Packer build](https://atlas.hashicorp.com/help/packer/builds/starting), a Terraform plan can be automatically triggered with this new artifact version. +or as the output of a [Packer build](/docs/enterprise/packer/builds/starting.html), a Terraform plan can be automatically triggered with this new artifact version. You can enable this feature on a per-environment basis from the environment settings page. diff --git a/website/source/docs/enterprise/state/collaborating.html.md b/website/source/docs/enterprise/state/collaborating.html.md index 9130de266..96a24f547 100755 --- a/website/source/docs/enterprise/state/collaborating.html.md +++ b/website/source/docs/enterprise/state/collaborating.html.md @@ -14,7 +14,7 @@ Remote state gives you the ability to version and collaborate on Terraform chang stores information about the changes Terraform makes based on configuration. In order to collaborate safely on remote state, we recommend -[creating an organization](https://atlas.hashicorp.com/help/organizations/create) to manage teams of users. +[creating an organization](/docs/enterprise/organizations/create.html) to manage teams of users. Then, following a [remote state push](/docs/enterprise/state) you can view state versions in the changes tab of the environment created under the same name diff --git a/website/source/docs/enterprise/support.html.md b/website/source/docs/enterprise/support.html.md new file mode 100755 index 000000000..9a6918aeb --- /dev/null +++ b/website/source/docs/enterprise/support.html.md @@ -0,0 +1,38 @@ +--- +layout: "docs" +page_title: "Contacting Support" +sidebar_current: "docs-enterprise-support" +description: |- + All users of Terraform Enterprise are urged to email feedback, questions or requests to the HashiCorp team. +--- + +# Contacting Support + +All users of Terraform Enterprise are urged to email feedback, questions or requests +to the HashiCorp team. + +### [support@hashicorp.com](mailto:support@hashicorp.com) + +We do not currently publish support SLAs for free accounts, but endeavour +to respond as quickly as possible. We respond to most requests +within less than 24 hours. + +## HashiCorp Tools Support + +It's often the case that Terraform Enterprise questions or feedback relates to the +HashiCorp tooling. We encourage all Terraform Enterpriseusers to search for related +issues and problems in the open source repositories and mailing lists +prior to contacting us to help make our support more efficient and +to help resolve problems faster. + +Visit the updating tools section +for a list of our tools and their project websites. + +## Documentation Feedback + +Due to the dynamic nature of Terraform Enterprise and the broad set of features +it provides, there may be information lacking in the documentation. + +In this case, we appreciate any feedback to be emailed to us so +we can make improvements. Please email feedback to +support@hashicorp.com. diff --git a/website/source/docs/enterprise/vcs/github.html.md b/website/source/docs/enterprise/vcs/github.html.md index 2baeb9cfe..40778358d 100755 --- a/website/source/docs/enterprise/vcs/github.html.md +++ b/website/source/docs/enterprise/vcs/github.html.md @@ -20,8 +20,7 @@ Terraform Enterprise environments are linked to individual GitHub repositories. single GitHub repository can be linked to multiple environments allowing a single set of Terraform configuration to be used across multiple environments. -Environments can be linked when they're initially created using the -[New Environment](https://atlas.hashicorp.com/configurations/import) process. +Environments can be linked when they're initially created using the New Environment process. Existing environments can be linked by setting GitHub details in their **Integrations**. diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 287c15bb3..9753bf667 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -558,15 +558,15 @@ > VCS Integration + > + Packer + > User Accounts > Organizations - > - Packer - > API @@ -579,6 +579,9 @@ > FAQ + > + Contact Support + diff --git a/website/source/layouts/faq.erb b/website/source/layouts/faq.erb index c06dd8f84..94dd70ad2 100644 --- a/website/source/layouts/faq.erb +++ b/website/source/layouts/faq.erb @@ -7,7 +7,7 @@ > - FAQ + FAQ diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 91c94b40c..3bd2d5069 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -48,8 +48,8 @@ Terraform - > - Atlas + > + Terraform Enterprise > @@ -196,8 +196,8 @@ Arukas - > - Atlas + > + Terraform Enterprise > diff --git a/website/source/layouts/tfe.erb b/website/source/layouts/tfe.erb new file mode 100644 index 000000000..f928a8d4b --- /dev/null +++ b/website/source/layouts/tfe.erb @@ -0,0 +1,27 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> From a71c5ebfee89917d9ebf80c8413f27372f96d6c1 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Mon, 27 Mar 2017 11:48:57 -0700 Subject: [PATCH 50/72] Removed FTE "billing" doc and added FTE level of hierarchy --- .../docs/enterprise/billing/index.html.md | 116 ------------------ .../docs/enterprise/glossary/index.html.md | 2 +- website/source/docs/enterprise/index.html.md | 2 +- .../runs/multifactor-authentication.html.md | 15 ++- .../source/docs/enterprise/support.html.md | 2 +- website/source/layouts/docs.erb | 38 +----- website/source/layouts/enterprise.erb | 53 ++++++++ 7 files changed, 66 insertions(+), 162 deletions(-) delete mode 100755 website/source/docs/enterprise/billing/index.html.md create mode 100644 website/source/layouts/enterprise.erb diff --git a/website/source/docs/enterprise/billing/index.html.md b/website/source/docs/enterprise/billing/index.html.md deleted file mode 100755 index 3cd8c37db..000000000 --- a/website/source/docs/enterprise/billing/index.html.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -layout: "docs" -page_title: "Billing: Managed Nodes" -sidebar_current: "docs-enterprise" -description: |- - HashiCorp charges for usage based on **managed nodes**. The definition of managed node is specific to the enterprise product and is described below. ---- - -# Managed Nodes - -HashiCorp charges for usage based on **managed nodes**. The definition of -managed node is specific to the enterprise product and is described below. - -For all enterprise products, the count of managed nodes is observed and -recorded every hour. At the end of the billing month a weighted average of -this recorded value is calculated to determine the overall managed node count -for billing. - -## Terraform Enterprise - -For Terraform Enterprise, a managed node is a compute resource defined in your -Terraform configuration. For certain resource types the managed node count is -determined by a property of the resource. The `count` meta-parameter is used -for all compute resource types. The complete list of compute resources and -resource arguments for determining managed node count is below. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ProviderResource TypeResource Property
AWS`aws_instance``count`
AWS - `aws_autoscaling_group``count` `desired_capacity`
Azure`azure_instance``count`
Azure`azurerm_virtual_machine``count`
CenturyLink Cloud`clc_server``count`
CloudStack`cloudstack_instance``count`
DigitalOcean`digitalocean_droplet``count`
Google Cloud`google_compute_instance``count`
Google Cloud`compute_instance_group_manager``count` `target_size`
Heroku`heroku_app``count`
OpenStack`openstack_compute_instance_v2``count`
Packet`packet_device``count`
Triton`triton_machine``count`
VMware vCloud Director`vcd_vapp``count`
VMware vSphere provider`vsphere_virtual_machine``count`
- -Terraform Enterprise includes unlimited Packer builds and artifact storage. - -# Billing Support - -For questions related to billing please email -[support@hashicorp.com](mailto:support@hashicorp.com). diff --git a/website/source/docs/enterprise/glossary/index.html.md b/website/source/docs/enterprise/glossary/index.html.md index af1b7ecdf..1b537b605 100755 --- a/website/source/docs/enterprise/glossary/index.html.md +++ b/website/source/docs/enterprise/glossary/index.html.md @@ -1,5 +1,5 @@ --- -layout: "docs" +layout: "enterprise" page_title: "Terraform Enterprise Glossary" sidebar_current: "docs-enterprise" description: |- diff --git a/website/source/docs/enterprise/index.html.md b/website/source/docs/enterprise/index.html.md index 3fb6eddf3..28ef8cd4f 100755 --- a/website/source/docs/enterprise/index.html.md +++ b/website/source/docs/enterprise/index.html.md @@ -1,5 +1,5 @@ --- -layout: "docs" +layout: "enterprise" page_title: "Terraform Enterprise Features" sidebar_current: "docs-enterprise" description: |- diff --git a/website/source/docs/enterprise/runs/multifactor-authentication.html.md b/website/source/docs/enterprise/runs/multifactor-authentication.html.md index 7f2fad06f..2732882ab 100755 --- a/website/source/docs/enterprise/runs/multifactor-authentication.html.md +++ b/website/source/docs/enterprise/runs/multifactor-authentication.html.md @@ -1,8 +1,12 @@ --- -title: " AWS Multi-Factor Authentication for Terraform Runs in Atlas" +layout: "runs" +page_title: "AWS Multi-Factor Authentication for Terraform Runs in TFE" +sidebar_current: "docs-enterprise-runs-multifactor" +description: |- + Installing custom software on the Terraform Runners. --- -# AWS Multi-Factor Authentication for Terraform Runs in Atlas +# AWS Multi-Factor Authentication for Terraform Runs in Terraform Enterprise You can optionally configure Terraform plans and applies to use multi-factor authentication using [AWS Secure Token Service](http://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html). @@ -18,15 +22,14 @@ This option is disabled by default and can be enabled by an organization owner. ## Setting Up AWS Multi-Factor Authentication -Before you are able to set up multi-factor authentication in atlas, you must set up an IAM user in AWS. More details about creating an IAM user can be found [here](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html). Setting up an AWS IAM user will provide you with the serial number and access keys that you will need in order to connect to AWS Secure Token Service. +Before you are able to set up multi-factor authentication in Terraform Enterprise, you must set up an IAM user in AWS. More details about creating an IAM user can be found [here](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html). Setting up an AWS IAM user will provide you with the serial number and access keys that you will need in order to connect to AWS Secure Token Service. In order to set up multi-factor authentication for your organization, you must have the following environment variables in your configuration: 'AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_MFA_SERIAL_NUMBER". You can set these variables at `/settings/organization_variables.` ## Enabling AWS Multi-Factor Authentication -To enable multi-factor authentication, visit the environment settings page in -Atlas: `terraform//environments//settings`. Use the drop down labeled "AWS Multi-Factor Authentication +To enable multi-factor authentication, visit the environment settings page: `terraform//environments//settings`. Use the drop down labeled "AWS Multi-Factor Authentication ". There are currently three levels available: "never", "applies only", and "plans and applies". Once you have selected your desired level, save your settings. All subsequent runs on the environment will now require the selected level of authentication. ## Using AWS Multi-Factor Authentication @@ -39,7 +42,7 @@ If you have selected "plans and applies", you will be prompted to enter your tok ## Using AWS Multi-Factor Authentication with AWS STS AssumeRole -The AWS Secure Token Service can be used to return a set of temporary security credentials that a user can use to access resources that they might not normally have access to (known as AssumeRole). The AssumeRole workflow is compatible with AWS multi-factor authentication in Atlas. +The AWS Secure Token Service can be used to return a set of temporary security credentials that a user can use to access resources that they might not normally have access to (known as AssumeRole). The AssumeRole workflow is compatible with AWS multi-factor authentication in Terraform Enterprise. To use AssumeRole, you first need to create an IAM role and edit the trust relationship policy document to contain the following: diff --git a/website/source/docs/enterprise/support.html.md b/website/source/docs/enterprise/support.html.md index 3770583be..46f7b4d98 100755 --- a/website/source/docs/enterprise/support.html.md +++ b/website/source/docs/enterprise/support.html.md @@ -1,5 +1,5 @@ --- -layout: "docs" +layout: "enterprise" page_title: "Contacting Support" sidebar_current: "docs-enterprise-support" description: |- diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 3bd2d5069..ded2e3fcb 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -544,44 +544,8 @@ > - Terraform Enterprise + Terraform Enterprise diff --git a/website/source/layouts/enterprise.erb b/website/source/layouts/enterprise.erb new file mode 100644 index 000000000..a52a44c20 --- /dev/null +++ b/website/source/layouts/enterprise.erb @@ -0,0 +1,53 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> From 28106b8f0834551ebdd2bc664b90cef2ed63e104 Mon Sep 17 00:00:00 2001 From: Chris Riley Date: Mon, 3 Apr 2017 10:53:38 -0700 Subject: [PATCH 51/72] Expanded all sub-menus in "FTE" --- .../api/configuration-versions.html.md | 4 +- .../enterprise/api/configurations.html.md | 2 +- .../docs/enterprise/api/environments.html.md | 2 +- .../source/docs/enterprise/api/index.html.md | 2 +- .../source/docs/enterprise/api/runs.html.md | 2 +- .../source/docs/enterprise/api/states.html.md | 2 +- .../source/docs/enterprise/api/users.html.md | 2 +- .../artifacts/artifact-provider.html.md | 2 +- .../artifacts/creating-amis.html.md | 2 +- .../docs/enterprise/artifacts/index.html.md | 2 +- .../artifacts/managing-versions.html.md | 2 +- .../source/docs/enterprise/faq/index.html.md | 2 +- .../faq/monolithic-artifacts.html.md | 2 +- .../faq/rolling-deployments.html.md | 2 +- .../docs/enterprise/glossary/index.html.md | 2 +- .../authentication-policy.html.md | 2 +- .../enterprise/organizations/create.html.md | 2 +- .../organizations/credit-card.html.md | 2 +- .../enterprise/organizations/index.html.md | 2 +- .../enterprise/organizations/migrate.html.md | 2 +- .../enterprise/organizations/trials.html.md | 2 +- .../packer/artifacts/creating-amis.html.md | 4 +- .../artifacts/creating-vagrant-boxes.html.md | 4 +- .../enterprise/packer/artifacts/index.html.md | 4 +- .../packer/builds/build-environment.html.md | 4 +- .../packer/builds/how-builds-run.html.md | 4 +- .../enterprise/packer/builds/index.html.md | 4 +- .../packer/builds/installing-software.html.md | 4 +- .../packer/builds/linked-applications.html.md | 4 +- .../builds/managing-packer-versions.html.md | 4 +- .../packer/builds/notifications.html.md | 4 +- .../packer/builds/rebuilding.html.md | 4 +- .../packer/builds/scheduling-builds.html.md | 4 +- .../enterprise/packer/builds/starting.html.md | 4 +- .../packer/builds/troubleshooting.html.md | 4 +- .../docs/enterprise/packer/index.html.md | 2 +- .../enterprise/runs/automatic-applies.html.md | 2 +- .../enterprise/runs/how-runs-execute.html.md | 2 +- .../source/docs/enterprise/runs/index.html.md | 2 +- .../runs/installing-software.html.md | 2 +- .../runs/managing-terraform-versions.html.md | 2 +- .../runs/multifactor-authentication.html.md | 2 +- .../enterprise/runs/notifications.html.md | 2 +- .../enterprise/runs/scheduling-runs.html.md | 2 +- .../docs/enterprise/runs/starting.html.md | 2 +- .../runs/variables-and-configuration.html.md | 2 +- .../enterprise/state/collaborating.html.md | 2 +- .../docs/enterprise/state/index.html.md | 2 +- .../docs/enterprise/state/pushing.html.md | 2 +- .../state/resolving-conflicts.html.md | 2 +- .../user-accounts/authentication.html.md | 2 +- .../enterprise/user-accounts/index.html.md | 2 +- .../enterprise/user-accounts/recovery.html.md | 2 +- .../source/docs/enterprise/vcs/index.html.md | 2 +- website/source/layouts/enterprise.erb | 158 +++++++++++++++++- 55 files changed, 224 insertions(+), 72 deletions(-) diff --git a/website/source/docs/enterprise/api/configuration-versions.html.md b/website/source/docs/enterprise/api/configuration-versions.html.md index 8d8fae650..6f88a7c3a 100755 --- a/website/source/docs/enterprise/api/configuration-versions.html.md +++ b/website/source/docs/enterprise/api/configuration-versions.html.md @@ -1,7 +1,7 @@ --- -layout: "api" +layout: "enterprise" page_title: "Configuration Versions API" -sidebar_current: "docs-enterprise-api-configversions" +sidebar_current: "docs-enterprise-api-configurations" description: |- A configuration version represents versions of Terraform configuration. --- diff --git a/website/source/docs/enterprise/api/configurations.html.md b/website/source/docs/enterprise/api/configurations.html.md index 3af25c8e9..a8275f3d4 100755 --- a/website/source/docs/enterprise/api/configurations.html.md +++ b/website/source/docs/enterprise/api/configurations.html.md @@ -1,5 +1,5 @@ --- -layout: "api" +layout: "enterprise" page_title: "Terraform Configuration API" sidebar_current: "docs-enterprise-api-configurations" description: |- diff --git a/website/source/docs/enterprise/api/environments.html.md b/website/source/docs/enterprise/api/environments.html.md index a52e9c424..c534137fd 100755 --- a/website/source/docs/enterprise/api/environments.html.md +++ b/website/source/docs/enterprise/api/environments.html.md @@ -1,5 +1,5 @@ --- -layout: "api" +layout: "enterprise" page_title: "Environments API" sidebar_current: "docs-enterprise-api-environments" description: |- diff --git a/website/source/docs/enterprise/api/index.html.md b/website/source/docs/enterprise/api/index.html.md index baa930888..f3f799bd9 100755 --- a/website/source/docs/enterprise/api/index.html.md +++ b/website/source/docs/enterprise/api/index.html.md @@ -1,5 +1,5 @@ --- -layout: "api" +layout: "enterprise" page_title: "API Documentation" sidebar_current: "docs-enterprise-api" description: |- diff --git a/website/source/docs/enterprise/api/runs.html.md b/website/source/docs/enterprise/api/runs.html.md index 2d10c6e66..64d589a7f 100755 --- a/website/source/docs/enterprise/api/runs.html.md +++ b/website/source/docs/enterprise/api/runs.html.md @@ -1,5 +1,5 @@ --- -layout: "api" +layout: "enterprise" page_title: "Runs API" sidebar_current: "docs-enterprise-api-runs" description: |- diff --git a/website/source/docs/enterprise/api/states.html.md b/website/source/docs/enterprise/api/states.html.md index 69f03b618..65aa0672f 100755 --- a/website/source/docs/enterprise/api/states.html.md +++ b/website/source/docs/enterprise/api/states.html.md @@ -1,5 +1,5 @@ --- -layout: "api" +layout: "enterprise" page_title: "State API" sidebar_current: "docs-enterprise-api-states" description: |- diff --git a/website/source/docs/enterprise/api/users.html.md b/website/source/docs/enterprise/api/users.html.md index 1f18a515c..370b5c06b 100755 --- a/website/source/docs/enterprise/api/users.html.md +++ b/website/source/docs/enterprise/api/users.html.md @@ -1,5 +1,5 @@ --- -layout: "api" +layout: "enterprise" page_title: "Users API" sidebar_current: "docs-enterprise-api-users" description: |- diff --git a/website/source/docs/enterprise/artifacts/artifact-provider.html.md b/website/source/docs/enterprise/artifacts/artifact-provider.html.md index b9e34f16c..c0045d4c1 100755 --- a/website/source/docs/enterprise/artifacts/artifact-provider.html.md +++ b/website/source/docs/enterprise/artifacts/artifact-provider.html.md @@ -1,5 +1,5 @@ --- -layout: "artifacts" +layout: "enterprise" page_title: "Artifact Provider" sidebar_current: "docs-enterprise-artifacts-provider" description: |- diff --git a/website/source/docs/enterprise/artifacts/creating-amis.html.md b/website/source/docs/enterprise/artifacts/creating-amis.html.md index 3ea8b3ef1..4ed135467 100755 --- a/website/source/docs/enterprise/artifacts/creating-amis.html.md +++ b/website/source/docs/enterprise/artifacts/creating-amis.html.md @@ -1,5 +1,5 @@ --- -layout: "artifacts" +layout: "enterprise" page_title: "Creating AMI Artifacts" sidebar_current: "docs-enterprise-artifacts-amis" description: |- diff --git a/website/source/docs/enterprise/artifacts/index.html.md b/website/source/docs/enterprise/artifacts/index.html.md index ac09bbdff..bd313a112 100755 --- a/website/source/docs/enterprise/artifacts/index.html.md +++ b/website/source/docs/enterprise/artifacts/index.html.md @@ -1,5 +1,5 @@ --- -layout: "artifacts" +layout: "enterprise" page_title: "Terraform Artifacts" sidebar_current: "docs-enterprise-artifacts" description: |- diff --git a/website/source/docs/enterprise/artifacts/managing-versions.html.md b/website/source/docs/enterprise/artifacts/managing-versions.html.md index 91da92c14..074e86f9f 100755 --- a/website/source/docs/enterprise/artifacts/managing-versions.html.md +++ b/website/source/docs/enterprise/artifacts/managing-versions.html.md @@ -1,5 +1,5 @@ --- -layout: "artifacts" +layout: "enterprise" page_title: "Managing Artifact Versions" sidebar_current: "docs-enterprise-artifacts-versions" description: |- diff --git a/website/source/docs/enterprise/faq/index.html.md b/website/source/docs/enterprise/faq/index.html.md index 8d548fcfa..87751c1ba 100755 --- a/website/source/docs/enterprise/faq/index.html.md +++ b/website/source/docs/enterprise/faq/index.html.md @@ -1,5 +1,5 @@ --- -layout: "faq" +layout: "enterprise" page_title: "Terraform Enterprise FAQs" sidebar_current: "docs-enterprise-faq" description: |- diff --git a/website/source/docs/enterprise/faq/monolithic-artifacts.html.md b/website/source/docs/enterprise/faq/monolithic-artifacts.html.md index 35d15982d..e607053c0 100755 --- a/website/source/docs/enterprise/faq/monolithic-artifacts.html.md +++ b/website/source/docs/enterprise/faq/monolithic-artifacts.html.md @@ -1,5 +1,5 @@ --- -layout: "faq" +layout: "enterprise" page_title: "FAQ: Monolithic Artifacts" sidebar_current: "docs-enterprise-faq-monolithic" description: |- diff --git a/website/source/docs/enterprise/faq/rolling-deployments.html.md b/website/source/docs/enterprise/faq/rolling-deployments.html.md index 36bc1b3d4..2f72e82ca 100755 --- a/website/source/docs/enterprise/faq/rolling-deployments.html.md +++ b/website/source/docs/enterprise/faq/rolling-deployments.html.md @@ -1,5 +1,5 @@ --- -layout: "faq" +layout: "enterprise" page_title: "FAQ: Rolling Deployments" sidebar_current: "docs-enterprise-faq-deployments" description: |- diff --git a/website/source/docs/enterprise/glossary/index.html.md b/website/source/docs/enterprise/glossary/index.html.md index 1b537b605..092542047 100755 --- a/website/source/docs/enterprise/glossary/index.html.md +++ b/website/source/docs/enterprise/glossary/index.html.md @@ -1,7 +1,7 @@ --- layout: "enterprise" page_title: "Terraform Enterprise Glossary" -sidebar_current: "docs-enterprise" +sidebar_current: "docs-enterprise-glossary" description: |- Terminology for Terraform Enterprise. --- diff --git a/website/source/docs/enterprise/organizations/authentication-policy.html.md b/website/source/docs/enterprise/organizations/authentication-policy.html.md index 66c572848..9800c9710 100755 --- a/website/source/docs/enterprise/organizations/authentication-policy.html.md +++ b/website/source/docs/enterprise/organizations/authentication-policy.html.md @@ -1,5 +1,5 @@ --- -layout: "organizations" +layout: "enterprise" page_title: "Organization Authentication Policy" sidebar_current: "docs-enterprise-organizations-policy" description: |- diff --git a/website/source/docs/enterprise/organizations/create.html.md b/website/source/docs/enterprise/organizations/create.html.md index b7dd8ddde..4eae54d16 100755 --- a/website/source/docs/enterprise/organizations/create.html.md +++ b/website/source/docs/enterprise/organizations/create.html.md @@ -1,5 +1,5 @@ --- -layout: "organizations" +layout: "enterprise" page_title: "Create and organization" sidebar_current: "docs-enterprise-organizations-create" description: |- diff --git a/website/source/docs/enterprise/organizations/credit-card.html.md b/website/source/docs/enterprise/organizations/credit-card.html.md index 47a3f0751..f4f96794a 100755 --- a/website/source/docs/enterprise/organizations/credit-card.html.md +++ b/website/source/docs/enterprise/organizations/credit-card.html.md @@ -1,5 +1,5 @@ --- -layout: "organizations" +layout: "enterprise" page_title: "Add a credit card to an organization" sidebar_current: "docs-enterprise-organizations-credit" description: |- diff --git a/website/source/docs/enterprise/organizations/index.html.md b/website/source/docs/enterprise/organizations/index.html.md index 535549617..90a12e8ee 100755 --- a/website/source/docs/enterprise/organizations/index.html.md +++ b/website/source/docs/enterprise/organizations/index.html.md @@ -1,5 +1,5 @@ --- -layout: "organizations" +layout: "enterprise" page_title: "Organizations in Terraform Enterprise" sidebar_current: "docs-enterprise-organizations" description: |- diff --git a/website/source/docs/enterprise/organizations/migrate.html.md b/website/source/docs/enterprise/organizations/migrate.html.md index 8a9c2b2a4..77325dfdb 100755 --- a/website/source/docs/enterprise/organizations/migrate.html.md +++ b/website/source/docs/enterprise/organizations/migrate.html.md @@ -1,5 +1,5 @@ --- -layout: "organizations" +layout: "enterprise" page_title: "Migrate Organization" sidebar_current: "docs-enterprise-organizations-migrate" description: |- diff --git a/website/source/docs/enterprise/organizations/trials.html.md b/website/source/docs/enterprise/organizations/trials.html.md index 373bcc6e4..65becd818 100755 --- a/website/source/docs/enterprise/organizations/trials.html.md +++ b/website/source/docs/enterprise/organizations/trials.html.md @@ -1,5 +1,5 @@ --- -layout: "organizations" +layout: "enterprise" page_title: "Start an Terraform Enterprise Trial" sidebar_current: "docs-enterprise-organizations-trials" description: |- diff --git a/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md b/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md index 99b3b1467..b45227982 100755 --- a/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md +++ b/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Creating AMI Artifacts" -sidebar_current: "docs-enterprise-packer-artifacts-amis" +sidebar_current: "docs-enterprise-packerartifacts-amis" description: |- Creating AMI artifacts with Terraform Enterprise. --- diff --git a/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md b/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md index 6c5484501..f737d5533 100755 --- a/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md +++ b/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Creating Vagrant Artifacts" -sidebar_current: "docs-enterprise-packer-artifacts-vagrant" +sidebar_current: "docs-enterprise-packerartifacts-vagrant" description: |- Creating Vagrant artifacts with Terraform Enterprise. --- diff --git a/website/source/docs/enterprise/packer/artifacts/index.html.md b/website/source/docs/enterprise/packer/artifacts/index.html.md index 3f93b2093..6de65ed6f 100755 --- a/website/source/docs/enterprise/packer/artifacts/index.html.md +++ b/website/source/docs/enterprise/packer/artifacts/index.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "About Packer and Artifacts" -sidebar_current: "docs-enterprise-packer-artifacts" +sidebar_current: "docs-enterprise-packerartifacts" description: |- Packer creates and uploads artifacts to Terraform Enterprise. --- diff --git a/website/source/docs/enterprise/packer/builds/build-environment.html.md b/website/source/docs/enterprise/packer/builds/build-environment.html.md index 3402fd860..cf0b648e9 100755 --- a/website/source/docs/enterprise/packer/builds/build-environment.html.md +++ b/website/source/docs/enterprise/packer/builds/build-environment.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Packer Build Environment" -sidebar_current: "docs-enterprise-packer-builds-environment" +sidebar_current: "docs-enterprise-packerbuilds-environment" description: |- This page outlines the environment that Packer runs in within Terraform Enterprise. --- diff --git a/website/source/docs/enterprise/packer/builds/how-builds-run.html.md b/website/source/docs/enterprise/packer/builds/how-builds-run.html.md index 4c4385be0..f0247e672 100755 --- a/website/source/docs/enterprise/packer/builds/how-builds-run.html.md +++ b/website/source/docs/enterprise/packer/builds/how-builds-run.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Running Packer Builds" -sidebar_current: "docs-enterprise-packer-builds-runbuilds" +sidebar_current: "docs-enterprise-packerbuilds-runbuilds" description: |- This briefly covers the internal process of running builds in Terraform Enterprise. --- diff --git a/website/source/docs/enterprise/packer/builds/index.html.md b/website/source/docs/enterprise/packer/builds/index.html.md index 28e1035b3..87fc8e49d 100755 --- a/website/source/docs/enterprise/packer/builds/index.html.md +++ b/website/source/docs/enterprise/packer/builds/index.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "About Builds" -sidebar_current: "docs-enterprise-packer-builds" +sidebar_current: "docs-enterprise-packerbuilds" description: |- Builds are instances of `packer build` being run within Terraform Enterprise. --- diff --git a/website/source/docs/enterprise/packer/builds/installing-software.html.md b/website/source/docs/enterprise/packer/builds/installing-software.html.md index 8231a0485..35c55258d 100755 --- a/website/source/docs/enterprise/packer/builds/installing-software.html.md +++ b/website/source/docs/enterprise/packer/builds/installing-software.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Installing Software with Packer" -sidebar_current: "docs-enterprise-packer-builds-installing" +sidebar_current: "docs-enterprise-packerbuilds-installing" description: |- Installing software with Packer. --- diff --git a/website/source/docs/enterprise/packer/builds/linked-applications.html.md b/website/source/docs/enterprise/packer/builds/linked-applications.html.md index 22f298cb6..f4a438965 100755 --- a/website/source/docs/enterprise/packer/builds/linked-applications.html.md +++ b/website/source/docs/enterprise/packer/builds/linked-applications.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Linked Applications" -sidebar_current: "docs-enterprise-packer-builds-linkedapps" +sidebar_current: "docs-enterprise-packerbuilds-linkedapps" description: |- Linked applications have been deprecated in favor of the application build pipeline. --- diff --git a/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md b/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md index 369c90459..9f0c11e8a 100755 --- a/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md +++ b/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Managing Packer Versions" -sidebar_current: "docs-enterprise-packer-builds-versions" +sidebar_current: "docs-enterprise-packerbuilds-versions" description: |- Terraform Enterprise does not automatically upgrade the version of Packer used to run builds or compiles. --- diff --git a/website/source/docs/enterprise/packer/builds/notifications.html.md b/website/source/docs/enterprise/packer/builds/notifications.html.md index 1a796b2cc..811f2fdb2 100755 --- a/website/source/docs/enterprise/packer/builds/notifications.html.md +++ b/website/source/docs/enterprise/packer/builds/notifications.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "About Packer Build Notifications" -sidebar_current: "docs-enterprise-packer-builds-notifications" +sidebar_current: "docs-enterprise-packerbuilds-notifications" description: |- Terraform Enterprise can send build notifications to your organization. --- diff --git a/website/source/docs/enterprise/packer/builds/rebuilding.html.md b/website/source/docs/enterprise/packer/builds/rebuilding.html.md index 4a6050992..ecedaa199 100755 --- a/website/source/docs/enterprise/packer/builds/rebuilding.html.md +++ b/website/source/docs/enterprise/packer/builds/rebuilding.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Rebuilding Builds" -sidebar_current: "docs-enterprise-packer-builds-rebuilding" +sidebar_current: "docs-enterprise-packerbuilds-rebuilding" description: |- Sometimes builds fail due to temporary or remotely controlled conditions. --- diff --git a/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md b/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md index cd9bcba79..c3f9a2bb5 100755 --- a/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md +++ b/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Schedule Periodic Builds" -sidebar_current: "docs-enterprise-packer-builds-scheduling" +sidebar_current: "docs-enterprise-packerbuilds-scheduling" description: |- Terraform Enterprise can automatically run a Packer build and create artifacts on a specified schedule. --- diff --git a/website/source/docs/enterprise/packer/builds/starting.html.md b/website/source/docs/enterprise/packer/builds/starting.html.md index c301aa147..5f99c422b 100755 --- a/website/source/docs/enterprise/packer/builds/starting.html.md +++ b/website/source/docs/enterprise/packer/builds/starting.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Starting Packer Builds in Terraform Enterprise" -sidebar_current: "docs-enterprise-packer-builds-starting" +sidebar_current: "docs-enterprise-packerbuilds-starting" description: |- Packer builds can be started in Terraform Enterprise in two ways. This post is about how. --- diff --git a/website/source/docs/enterprise/packer/builds/troubleshooting.html.md b/website/source/docs/enterprise/packer/builds/troubleshooting.html.md index 1ac90def0..240271c5f 100755 --- a/website/source/docs/enterprise/packer/builds/troubleshooting.html.md +++ b/website/source/docs/enterprise/packer/builds/troubleshooting.html.md @@ -1,7 +1,7 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Troubleshooting Failing Builds" -sidebar_current: "docs-enterprise-packer-builds-troubleshooting" +sidebar_current: "docs-enterprise-packerbuilds-troubleshooting" description: |- Packer builds can fail in Terraform Enterprise for a number of reasons – improper configuration, transient networking errors, and hardware constraints are all possible. --- diff --git a/website/source/docs/enterprise/packer/index.html.md b/website/source/docs/enterprise/packer/index.html.md index c4a834476..1903a7c95 100755 --- a/website/source/docs/enterprise/packer/index.html.md +++ b/website/source/docs/enterprise/packer/index.html.md @@ -1,5 +1,5 @@ --- -layout: "packer" +layout: "enterprise" page_title: "Packer Features in Terraform Enterprise" sidebar_current: "docs-enterprise-packer-index" description: |- diff --git a/website/source/docs/enterprise/runs/automatic-applies.html.md b/website/source/docs/enterprise/runs/automatic-applies.html.md index c67c4ce80..3f529cc1f 100755 --- a/website/source/docs/enterprise/runs/automatic-applies.html.md +++ b/website/source/docs/enterprise/runs/automatic-applies.html.md @@ -1,5 +1,5 @@ --- -layout: "runs" +layout: "enterprise" page_title: "Runs: Automatic Applies" sidebar_current: "docs-enterprise-runs-applies" description: |- diff --git a/website/source/docs/enterprise/runs/how-runs-execute.html.md b/website/source/docs/enterprise/runs/how-runs-execute.html.md index 505418f41..b494d80bc 100755 --- a/website/source/docs/enterprise/runs/how-runs-execute.html.md +++ b/website/source/docs/enterprise/runs/how-runs-execute.html.md @@ -1,5 +1,5 @@ --- -layout: "runs" +layout: "enterprise" page_title: "Runs: How Runs Execute" sidebar_current: "docs-enterprise-runs-execute" description: |- diff --git a/website/source/docs/enterprise/runs/index.html.md b/website/source/docs/enterprise/runs/index.html.md index 628ba26f8..09b9873da 100755 --- a/website/source/docs/enterprise/runs/index.html.md +++ b/website/source/docs/enterprise/runs/index.html.md @@ -1,5 +1,5 @@ --- -layout: "runs" +layout: "enterprise" page_title: "About Terraform Enterprise Runs" sidebar_current: "docs-enterprise-runs" description: |- diff --git a/website/source/docs/enterprise/runs/installing-software.html.md b/website/source/docs/enterprise/runs/installing-software.html.md index ad07cbfd8..89033d508 100755 --- a/website/source/docs/enterprise/runs/installing-software.html.md +++ b/website/source/docs/enterprise/runs/installing-software.html.md @@ -1,5 +1,5 @@ --- -layout: "runs" +layout: "enterprise" page_title: "Runs: Installing Software" sidebar_current: "docs-enterprise-runs-installing" description: |- diff --git a/website/source/docs/enterprise/runs/managing-terraform-versions.html.md b/website/source/docs/enterprise/runs/managing-terraform-versions.html.md index a15edd26d..6234f8a5e 100755 --- a/website/source/docs/enterprise/runs/managing-terraform-versions.html.md +++ b/website/source/docs/enterprise/runs/managing-terraform-versions.html.md @@ -1,5 +1,5 @@ --- -layout: "runs" +layout: "enterprise" page_title: "Runs: Managing Terraform Versions" sidebar_current: "docs-enterprise-runs-versions" description: |- diff --git a/website/source/docs/enterprise/runs/multifactor-authentication.html.md b/website/source/docs/enterprise/runs/multifactor-authentication.html.md index 2732882ab..678b91e31 100755 --- a/website/source/docs/enterprise/runs/multifactor-authentication.html.md +++ b/website/source/docs/enterprise/runs/multifactor-authentication.html.md @@ -1,5 +1,5 @@ --- -layout: "runs" +layout: "enterprise" page_title: "AWS Multi-Factor Authentication for Terraform Runs in TFE" sidebar_current: "docs-enterprise-runs-multifactor" description: |- diff --git a/website/source/docs/enterprise/runs/notifications.html.md b/website/source/docs/enterprise/runs/notifications.html.md index f7e52e9e2..5b8cb1608 100755 --- a/website/source/docs/enterprise/runs/notifications.html.md +++ b/website/source/docs/enterprise/runs/notifications.html.md @@ -1,5 +1,5 @@ --- -layout: "runs" +layout: "enterprise" page_title: "Runs: Notifications" sidebar_current: "docs-enterprise-runs-notifications" description: |- diff --git a/website/source/docs/enterprise/runs/scheduling-runs.html.md b/website/source/docs/enterprise/runs/scheduling-runs.html.md index 3f89bac25..978dae19a 100755 --- a/website/source/docs/enterprise/runs/scheduling-runs.html.md +++ b/website/source/docs/enterprise/runs/scheduling-runs.html.md @@ -1,5 +1,5 @@ --- -layout: "runs" +layout: "enterprise" page_title: "Runs: Scheduling Runs" sidebar_current: "docs-enterprise-runs-schedule" description: |- diff --git a/website/source/docs/enterprise/runs/starting.html.md b/website/source/docs/enterprise/runs/starting.html.md index e2f1caf46..a9eaf3e29 100755 --- a/website/source/docs/enterprise/runs/starting.html.md +++ b/website/source/docs/enterprise/runs/starting.html.md @@ -1,5 +1,5 @@ --- -layout: "runs" +layout: "enterprise" page_title: "Runs: Starting" sidebar_current: "docs-enterprise-runs-starting" description: |- diff --git a/website/source/docs/enterprise/runs/variables-and-configuration.html.md b/website/source/docs/enterprise/runs/variables-and-configuration.html.md index b5f51bbb7..001aba2d6 100755 --- a/website/source/docs/enterprise/runs/variables-and-configuration.html.md +++ b/website/source/docs/enterprise/runs/variables-and-configuration.html.md @@ -1,5 +1,5 @@ --- -layout: "runs" +layout: "enterprise" page_title: "Runs: Variables and Configuration" sidebar_current: "docs-enterprise-runs-variables" description: |- diff --git a/website/source/docs/enterprise/state/collaborating.html.md b/website/source/docs/enterprise/state/collaborating.html.md index 96a24f547..0e5d03478 100755 --- a/website/source/docs/enterprise/state/collaborating.html.md +++ b/website/source/docs/enterprise/state/collaborating.html.md @@ -1,5 +1,5 @@ --- -layout: "state" +layout: "enterprise" page_title: "State: Collaborating" sidebar_current: "docs-enterprise-state-collaborating" description: |- diff --git a/website/source/docs/enterprise/state/index.html.md b/website/source/docs/enterprise/state/index.html.md index cd49db80d..c76146064 100755 --- a/website/source/docs/enterprise/state/index.html.md +++ b/website/source/docs/enterprise/state/index.html.md @@ -1,5 +1,5 @@ --- -layout: "state" +layout: "enterprise" page_title: "About Remote State" sidebar_current: "docs-enterprise-state" description: |- diff --git a/website/source/docs/enterprise/state/pushing.html.md b/website/source/docs/enterprise/state/pushing.html.md index f27e64427..cfa23e552 100755 --- a/website/source/docs/enterprise/state/pushing.html.md +++ b/website/source/docs/enterprise/state/pushing.html.md @@ -1,5 +1,5 @@ --- -layout: "state" +layout: "enterprise" page_title: "State: Pushing" sidebar_current: "docs-enterprise-state-pushing" description: |- diff --git a/website/source/docs/enterprise/state/resolving-conflicts.html.md b/website/source/docs/enterprise/state/resolving-conflicts.html.md index a9527e228..fbba32733 100755 --- a/website/source/docs/enterprise/state/resolving-conflicts.html.md +++ b/website/source/docs/enterprise/state/resolving-conflicts.html.md @@ -1,5 +1,5 @@ --- -layout: "state" +layout: "enterprise" page_title: "State: Resolving Conflicts" sidebar_current: "docs-enterprise-state-resolving" description: |- diff --git a/website/source/docs/enterprise/user-accounts/authentication.html.md b/website/source/docs/enterprise/user-accounts/authentication.html.md index a1450b33b..cd60a9242 100755 --- a/website/source/docs/enterprise/user-accounts/authentication.html.md +++ b/website/source/docs/enterprise/user-accounts/authentication.html.md @@ -1,5 +1,5 @@ --- -layout: "accounts" +layout: "enterprise" page_title: "User Authentication in Terraform Enterprise" sidebar_current: "docs-enterprise-accounts-authentication" description: |- diff --git a/website/source/docs/enterprise/user-accounts/index.html.md b/website/source/docs/enterprise/user-accounts/index.html.md index 175dc5d0e..0789a8499 100755 --- a/website/source/docs/enterprise/user-accounts/index.html.md +++ b/website/source/docs/enterprise/user-accounts/index.html.md @@ -1,5 +1,5 @@ --- -layout: "accounts" +layout: "enterprise" page_title: "User Accounts in Terraform Enterprise" sidebar_current: "docs-enterprise-accounts" description: |- diff --git a/website/source/docs/enterprise/user-accounts/recovery.html.md b/website/source/docs/enterprise/user-accounts/recovery.html.md index 831cef2a8..f5cd19fa6 100755 --- a/website/source/docs/enterprise/user-accounts/recovery.html.md +++ b/website/source/docs/enterprise/user-accounts/recovery.html.md @@ -1,5 +1,5 @@ --- -layout: "accounts" +layout: "enterprise" page_title: "User Account Recovery" sidebar_current: "docs-enterprise-accounts-recovery" description: |- diff --git a/website/source/docs/enterprise/vcs/index.html.md b/website/source/docs/enterprise/vcs/index.html.md index ceb2542dd..19c21edc4 100755 --- a/website/source/docs/enterprise/vcs/index.html.md +++ b/website/source/docs/enterprise/vcs/index.html.md @@ -1,5 +1,5 @@ --- -layout: "vcs" +layout: "enterprise" page_title: "Integration with Version Control Software" sidebar_current: "docs-enterprise-vcs" description: |- diff --git a/website/source/layouts/enterprise.erb b/website/source/layouts/enterprise.erb index a52a44c20..d38f5bf5d 100644 --- a/website/source/layouts/enterprise.erb +++ b/website/source/layouts/enterprise.erb @@ -11,33 +11,185 @@ +
+ > Terraform Enterprise + <% end %> + + <%= yield %> <% end %> diff --git a/website/source/layouts/faq.erb b/website/source/layouts/faq.erb deleted file mode 100644 index 725fe37fc..000000000 --- a/website/source/layouts/faq.erb +++ /dev/null @@ -1,25 +0,0 @@ -<% wrap_layout :inner do %> - <% content_for :sidebar do %> - - <% end %> - - <%= yield %> -<% end %> diff --git a/website/source/layouts/organizations.erb b/website/source/layouts/organizations.erb deleted file mode 100644 index 831f24489..000000000 --- a/website/source/layouts/organizations.erb +++ /dev/null @@ -1,34 +0,0 @@ -<% wrap_layout :inner do %> - <% content_for :sidebar do %> - - <% end %> - - <%= yield %> -<% end %> diff --git a/website/source/layouts/packer.erb b/website/source/layouts/packer.erb deleted file mode 100644 index 7062734de..000000000 --- a/website/source/layouts/packer.erb +++ /dev/null @@ -1,65 +0,0 @@ -<% wrap_layout :inner do %> - <% content_for :sidebar do %> - - <% end %> - - <%= yield %> -<% end %> diff --git a/website/source/layouts/runs.erb b/website/source/layouts/runs.erb deleted file mode 100644 index 4b98fe356..000000000 --- a/website/source/layouts/runs.erb +++ /dev/null @@ -1,43 +0,0 @@ -<% wrap_layout :inner do %> - <% content_for :sidebar do %> - - <% end %> - - <%= yield %> -<% end %> diff --git a/website/source/layouts/state.erb b/website/source/layouts/state.erb deleted file mode 100644 index c678c1d72..000000000 --- a/website/source/layouts/state.erb +++ /dev/null @@ -1,28 +0,0 @@ -<% wrap_layout :inner do %> - <% content_for :sidebar do %> - - <% end %> - - <%= yield %> -<% end %> diff --git a/website/source/layouts/vcs.erb b/website/source/layouts/vcs.erb deleted file mode 100644 index bf2d0d3dd..000000000 --- a/website/source/layouts/vcs.erb +++ /dev/null @@ -1,25 +0,0 @@ -<% wrap_layout :inner do %> - <% content_for :sidebar do %> - - <% end %> - - <%= yield %> -<% end %> From 7c7c626a37cc3163d017f45bd2789d8ec49f1427 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 6 Apr 2017 23:59:58 -0400 Subject: [PATCH 53/72] Update API docs --- .../api/configuration-versions.html.md | 84 -------- .../enterprise/api/configurations.html.md | 203 +++++++++++++----- .../docs/enterprise/api/environments.html.md | 96 +++++---- .../source/docs/enterprise/api/index.html.md | 82 +++---- .../source/docs/enterprise/api/runs.html.md | 72 ++++--- .../source/docs/enterprise/api/states.html.md | 79 ++++--- .../source/docs/enterprise/api/users.html.md | 43 ++-- 7 files changed, 351 insertions(+), 308 deletions(-) delete mode 100755 website/source/docs/enterprise/api/configuration-versions.html.md diff --git a/website/source/docs/enterprise/api/configuration-versions.html.md b/website/source/docs/enterprise/api/configuration-versions.html.md deleted file mode 100755 index 6f88a7c3a..000000000 --- a/website/source/docs/enterprise/api/configuration-versions.html.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -layout: "enterprise" -page_title: "Configuration Versions API" -sidebar_current: "docs-enterprise-api-configurations" -description: |- - A configuration version represents versions of Terraform configuration. ---- - -# Configuration Versions API - -A configuration version represents versions of Terraform configuration. -Each set of changes to Terraform HCL files or the scripts -used in the files should have an associated configuration version. - -When creating versions via the API, the variables attribute can be sent -to include the necessary variables for the Terraform configuration. - -### Configuration Version Attributes - - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
variablesA key/value map of Terraform variables to be associated - with the configuration version.No
metadataA hash of key value metadata pairs.No
- -### Actions - -The following actions can be performed on this resource. - -
-
Create
-
POST /api/v1/terraform/configurations/:username/:name/versions
-
Upload progress
-
GET /api/v1/terraform/configurations/:username/:name/versions/progress/:token
-
- -### Examples - -#### Creating a configuration version - -Creates a configuration with the provided attributes. - - $ cat version.json - { - "version": { - "metadata": { - "git_branch": "master", - "remote_type": "atlas", - "remote_slug": "hashicorp/atlas" - }, - "variables": { - "ami_id": "ami-123456", - "target_region": "us-east-1", - "consul_count": "5", - "consul_ami": "ami-123456" - } - } - } - - $ curl %{ATLAS_URL}/api/v1/terraform/configurations/%{DEFAULT_USERNAME}/test/versions \ - -X POST \ - -H "X-Atlas-Token: $ATLAS_TOKEN" \ - -H "Content-Type: application/json" \ - -d @version.json - -#### Retrieving the progress of an upload for a configuration version - -Returns upload progress for the version. - - $ curl %{ATLAS_URL}/api/v1/terraform/configurations/%{DEFAULT_USERNAME}/test/versions/progress/63fc7e18-3911-4853-8b17-7fdc28f158f2 \ - -H "X-Atlas-Token: $ATLAS_TOKEN" diff --git a/website/source/docs/enterprise/api/configurations.html.md b/website/source/docs/enterprise/api/configurations.html.md index a8275f3d4..884a0d2b9 100755 --- a/website/source/docs/enterprise/api/configurations.html.md +++ b/website/source/docs/enterprise/api/configurations.html.md @@ -1,69 +1,174 @@ --- layout: "enterprise" -page_title: "Terraform Configuration API" +page_title: "Configurations - API - Terraform Enterprise" sidebar_current: "docs-enterprise-api-configurations" description: |- - A configuration represents settings associated with a resource that runs Terraform with versions of Terraform configuration.. + A configuration represents settings associated with a resource that runs + Terraform with versions of Terraform configuration. --- -# Terraform Configuration API +# Configuration API -A configuration represents settings associated with a resource that -runs Terraform with versions of Terraform configuration. +A configuration version represents versions of Terraform configuration. Each set +of changes to Terraform HCL files or the scripts used in the files should have +an associated configuration version. -Configurations have many [configuration versions](/docs/enterprise/api/configuration-versions.html) -which represent versions of Terraform configuration templates and other associated -configuration. +When creating versions via the API, the variables attribute can be sent to +include the necessary variables for the Terraform configuration. A configuration +represents settings associated with a resource that runs Terraform with versions +of Terraform configuration. Configurations have many configuration versions +which represent versions of Terraform configuration templates and other +associated configuration. Most operations take place on the configuration +version, not the configuration. -### Configuration Attributes +## Get Latest Configuration Version - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
nameThe name of the configuration, used to identify it. It - has a maximum length of 50 characters and must contain only - letters, numbers, dashes, underscores or periods.Yes
usernameThe username to assign the configuration to. You must be a member of the - organization and have the ability to create the resource.Yes
+This endpoint gets the latest configuration version. -### Actions +| Method | Path | +| :----- | :------------- | +| `GET` | `/terraform/configurations/:username/:name/versions/latest` | -The following actions can be performed on this resource. +### Parameters -
-
Show
-
GET /api/v1/terraform/configurations/:username/:name/versions/latest
-
Create
-
POST /api/v1/terraform/configurations
-
+- `:username` `(string: )` - Specifies the username or organization + name under which to get the latest configuration version. This username must + already exist in the system, and the user must have permission to create new + configuration versions under this namespace. This is specified as part of the + URL. -### Examples +- `:name` `(string: )` - Specifies the name of the configuration for + which to get the latest configuration. This is specified as part of the URL. -#### Creating a configuration +### Sample Request -Creates a configuration with the provided attributes. +```text +$ curl \ + --header "X-Atlas-Token: ..." \ + https://atlas.hashicorp.com/api/v1/terraform/configurations/my-organization/my-configuration/versions/latest +``` - $ curl %{ATLAS_URL}/api/v1/terraform/configurations \ - -X POST \ - -H "X-Atlas-Token: $ATLAS_TOKEN" \ - -d configuration[name]='test' \ - -d configuration[username]='%{DEFAULT_USERNAME}' +### Sample Response -#### Retrieving a configuration +```json +{ + "version": { + "version": 6, + "metadata": { + "foo": "bar" + }, + "tf_vars": [], + "variables": {} + } +} +``` -Returns the JSON representation of the latest configuration. +- `version` `(int)` - the unique version instance number. - $ curl %{ATLAS_URL}/api/v1/terraform/configurations/%{DEFAULT_USERNAME}/test/versions/latest \ - -H "X-Atlas-Token: $ATLAS_TOKEN" +- `metadata` `(map)` - a map of arbitrary metadata for this + version. + +## Create Configuration Version + +This endpoint creates a new configuration version. + +| Method | Path | +| :----- | :------------- | +| `POST` | `/terraform/configurations/:username/:name/versions` | + +### Parameters + +- `:username` `(string: )` - Specifies the username or organization + name under which to create this configuration version. This username must + already exist in the system, and the user must have permission to create new + configuration versions under this namespace. This is specified as part of the + URL. + +- `:name` `(string: )` - Specifies the name of the configuration for + which to create a new version. This is specified as part of the URL. + +- `metadata` `(map)` - Specifies an arbitrary hash of key-value + metadata pairs. This is specified as the payload as JSON. + +- `variables` `(map)` - Specifies a hash of key-value pairs that + will be made available as variables to this version. + +### Sample Payload + +```json +{ + "version": { + "metadata": { + "git_branch": "master", + "remote_type": "atlas", + "remote_slug": "hashicorp/atlas" + }, + "variables": { + "ami_id": "ami-123456", + "target_region": "us-east-1", + "consul_count": "5", + "consul_ami": "ami-123456" + } + } +} +``` + +### Sample Request + +```text +$ curl \ + --request POST \ + --header "X-Atlas-Token: ..." \ + --header "Content-Type: application/json" \ + --data @payload.json \ + https://atlas.hashicorp.com/api/v1/terraform/configurations/my-organization/my-configuration/versions +``` + +### Sample Response + +```json +{ + "version": 6, + "upload_path": "https://binstore.hashicorp.com/ddbd7db6-f96c-4633-beb6-22fe2d74eeed", + "token": "ddbd7db6-f96c-4633-beb6-22fe2d74eeed" +} +``` + +- `version` `(int)` - the unique version instance number. This is + auto-incrementing. + +- `upload_path` `(string)` - the path where the archive should be uploaded via a + `POST` request. + +- `token` `(string)` - the token that should be used when uploading the archive + to the `upload_path`. + +## Check Upload Progress + +This endpoint retrieves the progress for an upload of a configuration version. + +| Method | Path | +| :----- | :------------- | +| `GET` | `/terraform/configurations/:username/:name/versions/progress/:token` | + +### Parameters + +- `:username` `(string: )` - Specifies the username or organization to + read progress. This is specified as part of the URL. + +- `:name` `(string: )` - Specifies the name of the configuration for + to read progress. This is specified as part of the URL. + +- `:token` `(string: )` - Specifies the token that was returned from + the create option. **This is not an Atlas Token!** This is specified as part + of the URL. + +### Sample Request + +```text +$ curl \ + --header "X-Atlas-Token: ..." \ + https://atlas.hashicorp.com/api/v1/terraform/configurations/my-organization/my-configuration/versions/progress/ddbd7db6-f96c-4633-beb6-22fe2d74eeed +``` + +### Sample Response diff --git a/website/source/docs/enterprise/api/environments.html.md b/website/source/docs/enterprise/api/environments.html.md index c534137fd..e92027c48 100755 --- a/website/source/docs/enterprise/api/environments.html.md +++ b/website/source/docs/enterprise/api/environments.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Environments API" +page_title: "Environments - API - Terraform Enterprise" sidebar_current: "docs-enterprise-api-environments" description: |- Environments represent running infrastructure managed by Terraform. @@ -10,58 +10,60 @@ description: |- Environments represent running infrastructure managed by Terraform. -Environments can also be connected to Consul clusters. -This documentation covers the environment interactions with Terraform. +Environments can also be connected to Consul clusters. This documentation covers +the environment interactions with Terraform. -### Environment Attributes +## Get Latest Configuration Version - - - - - - - - - - - -
AttributeDescriptionRequired
variablesA key/value map of Terraform variables to be updated. Existing - variables will only be removed when their value is empty. Variables - of the same key will be overwritten.Yes
-
-
-
- Note: Only string variables can be updated via the API currently. - Creating or updating HCL variables is not yet supported. -
-
+This endpoint updates the Terraform variables for an environment. Due to the +sensitive nature of variables, they are not returned on success. -### Actions +| Method | Path | +| :----- | :------------- | +| `PUT` | `/environments/:username/:name/variables` | -The following actions can be performed on this resource. +### Parameters -
-
Update variables
-
PUT /api/v1/environments/:username/:name/variables
-
+- `:username` `(string: )` - Specifies the username or organization + name under which to update variables. This username must already exist in the + system, and the user must have permission to create new configuration versions + under this namespace. This is specified as part of the URL. -### Examples +- `:name` `(string: )` - Specifies the name of the environment for + which to update variables. This is specified as part of the URL. -#### Updating Terraform variables +- `variables` `(map)` - Specifies a key-value map of Terraform + variables to be updated. Existing variables will only be removed when their + value is empty. Variables of the same key will be overwritten. -Updates the Terraform variables for an environment. Due to the sensitive nature -of variables, they will not returned on success. + -> Note: Only string variables can be updated via the API currently. Creating or updating HCL variables is not yet supported. - $ cat variables.json - { - "variables": { - "desired_capacity": "15", - "foo": "bar" - } - } - $ curl %{ATLAS_URL}/api/v1/environments/%{DEFAULT_USERNAME}/test/variables \ - -X PUT \ - -H 'Content-Type: application/json' \ - -d @variables.json \ - -H "X-Atlas-Token: $ATLAS_TOKEN" +### Sample Payload + +```json +{ + "variables": { + "desired_capacity": "15", + "foo": "bar" + } +} +``` + +### Sample Request + +```text +$ curl \ + --header "X-Atlas-Token: ..." \ + --header "Content-Type: application/json" \ + --request PUT \ + --data @payload.json \ + https://atlas.hashicorp.com/api/v1/environments/my-organization/my-environment/variables +``` + +### Sample Response + + +```text +``` + +(empty body) diff --git a/website/source/docs/enterprise/api/index.html.md b/website/source/docs/enterprise/api/index.html.md index f3f799bd9..69fded303 100755 --- a/website/source/docs/enterprise/api/index.html.md +++ b/website/source/docs/enterprise/api/index.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "API Documentation" +page_title: "API - Terraform Enterprise" sidebar_current: "docs-enterprise-api" description: |- Terraform Enterprise provides an API for a **subset of features**. @@ -8,20 +8,17 @@ description: |- # Terraform Enterprise API Documentation -Terraform Enterprise provides an API for a **subset of features** available. For questions -or requests for new API features please email [support@hashicorp.com](mailto:support@hashicorp.com). +Terraform Enterprise provides an API for a **subset of features** available. For +questions or requests for new API features please email +[support@hashicorp.com](mailto:support@hashicorp.com). -## Available Endpoints Terraform Enterprise - -- [Environments](/docs/enterprise/api/environments.html) -- [Runs](/docs/enterprise/api/runs.html) -- [States](/docs/enterprise/api/states.html) +The list of available endpoints are on the navigation. ## Authentication -All requests must be authenticated with an `X-Atlas-Token` HTTP header. This -token can be generated or revoked on the account tokens page. -Your token will have access to all resources your account has access to. +All requests must be authenticated with an `X-Atlas-Token` HTTP header. This +token can be generated or revoked on the account tokens page. Your token will +have access to all resources your account has access to. For organization level resources, we recommend creating a separate user account that can be added to the organization with the specific privilege level @@ -29,57 +26,34 @@ required. ## Response Codes -Standard HTTP response codes are returned. `404 Not Found` -codes are returned for all resources that a user does not have access to, -as well as for resources that don't exist. This is done to avoid a -potential attacker discovering the existence of a resource. +Standard HTTP response codes are returned. `404 Not Found` codes are returned +for all resources that a user does not have access to, as well as for resources +that don't exist. This is done to avoid a potential attacker discovering the +existence of a resource. ## Errors Errors are returned in JSON format: - { - "errors": { - "name": [ - "has already been taken" - ] - } - } +```json +{ + "errors": { + "name": [ + "has already been taken" + ] + } +} +``` ## Versioning -The API currently resides under the `/v1` prefix. Future APIs -will increment this version leaving the `/v1` API intact, though -in the future certain features may be deprecated. In that case, -ample notice to migrate to the new API will be provided. +The API currently resides under the `/v1` prefix. Future APIs will increment +this version leaving the `/v1` API intact, though in the future certain features +may be deprecated. In that case, ample notice to migrate to the new API will be +provided. ## Content Type -The API accepts namespaced attributes in either -JSON or `application/x-www-form-urlencoded`. We recommend -using JSON, but for simplicity form style requests are supported. - -Below is an equivalent example with both styles using `curl`. - -### JSON Request Example - - $ cat variables.json - { - "variables": { - "desired_capacity": "15", - "foo": "bar" - } - } - $ curl %{ATLAS_URL}/api/v1/environments/%{DEFAULT_USERNAME}/test/variables \ - -X PUT \ - -H 'Content-Type: application/json' \ - -d @variables.json \ - -H "X-Atlas-Token: $ATLAS_TOKEN" - -### Form URL Encoded Example - - $ curl %{ATLAS_URL}/api/v1/environments/%{DEFAULT_USERNAME}/test/variables \ - -X PUT \ - -d variables[foo]='bar' \ - -d variables[desired_capacity]='15' \ - -H "X-Atlas-Token: $ATLAS_TOKEN" +The API accepts namespaced attributes in either JSON or +`application/x-www-form-urlencoded`. We recommend using JSON, but for simplicity +form style requests are supported. diff --git a/website/source/docs/enterprise/api/runs.html.md b/website/source/docs/enterprise/api/runs.html.md index 64d589a7f..8f2d41d3b 100755 --- a/website/source/docs/enterprise/api/runs.html.md +++ b/website/source/docs/enterprise/api/runs.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Runs API" +page_title: "Runs - API - Terraform Enterprise" sidebar_current: "docs-enterprise-api-runs" description: |- Runs in Terraform Enterprise represents a two step Terraform plan and a subsequent apply. @@ -8,44 +8,58 @@ description: |- # Runs API -Runs in Terraform Enterprise represents a two step Terraform plan and a subsequent apply. +Runs in Terraform Enterprise represents a two step Terraform plan and a +subsequent apply. Runs are queued under [environments](/docs/enterprise/api/environments.html) and require a two-step confirmation workflow. However, environments can be configured to auto-apply to avoid this. -### Run Attributes +## Queue Run - - - - - - - - - - - -
AttributeDescriptionRequired
destroyIf set to true, this run will be a destroy plan.No
+Starts a new run (plan) in the environment. Requires a configuration version to +be present on the environment to succeed, but will otherwise 404. -### Actions +| Method | Path | +| :----- | :------------- | +| `POST` | `/environments/:username/:name/plan` | -The following actions can be performed on this resource. +### Parameters -
-
Queue a run
-
POST /api/v1/environments/:username/:name/plan
-
+- `:username` `(string: )` - Specifies the username or organization + name under which to get the latest configuration version. This username must + already exist in the system, and the user must have permission to create new + configuration versions under this namespace. This is specified as part of the + URL. -### Examples +- `:name` `(string: )` - Specifies the name of the configuration for + which to get the latest configuration. This is specified as part of the URL. -#### Queueing a new run +- `destroy` `(bool: false)` - Specifies if the plan should be a destroy plan. -Starts a new run (plan) in the environment. Requires a configuration -version to be present on the environment to succeed, but will otherwise 404. +### Sample Payload - $ curl %{ATLAS_URL}/api/v1/environments/%{DEFAULT_USERNAME}/test/plan \ - -X POST \ - -d "" \ - -H "X-Atlas-Token: $ATLAS_TOKEN" +```json +{ + "destroy": false +} +``` + +### Sample Request + +```text +$ curl \ + --request POST \ + --header "X-Atlas-Token: ..." \ + --header "Content-Type: application/json" \ + --data @payload.json \ + https://atlas.hashicorp.com/api/v1/environments/my-organization/my-environment/plan +``` + +### Sample Response + +```json +{ + "success": true +} +``` diff --git a/website/source/docs/enterprise/api/states.html.md b/website/source/docs/enterprise/api/states.html.md index 65aa0672f..71ad109e0 100755 --- a/website/source/docs/enterprise/api/states.html.md +++ b/website/source/docs/enterprise/api/states.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "State API" +page_title: "State - API - Terraform Enterprise" sidebar_current: "docs-enterprise-api-states" description: |- State represents the status of your infrastructure at the last time Terraform was run. @@ -8,45 +8,60 @@ description: |- # State API -State represents the status of your infrastructure at the last time Terraform was run. States can be pushed to Terraform Enterprise from Terraform's CLI after an apply is done locally, or state is automatically stored if the apply is done in Terraform Enterprise. +State represents the status of your infrastructure at the last time Terraform +was run. States can be pushed to Terraform Enterprise from Terraform's CLI after +an apply is done locally, or state is automatically stored if the apply is done +in Terraform Enterprise. -### State Attributes +## List of States - - - - - - - - - - - -
AttributeDescriptionRequired
usernameIf supplied, only return states belonging to the organization with this username.No
+This endpoint gets a list of states accessible to the user corresponding to the +provided token. -### Actions +| Method | Path | +| :----- | :------------- | +| `GET` | `/terraform/state` | -The following actions can be performed on this resource. +### Parameters -
-
Get a list of states accessible to a user
-
GET /api/v1/terraform/state
-
+- `?username` `(string: "")` - Specifies the organization/username to filter + states -### Examples +- `?page` `(int: 1)` - Specifies the pagination, which defaults to page 1. -#### Getting a list of Terraform states +### Sample Requests - $ curl %{ATLAS_URL}/api/v1/terraform/state \ - -H "X-Atlas-Token: $ATLAS_TOKEN" +```text +$ curl \ + --header "X-Atlas-Token: ..." \ + https://atlas.hashicorp.com/api/v1/terraform/state +``` -#### Getting a list of Terraform states for an organization +```text +$ curl \ + --header "X-Atlas-Token: ..." \ + https://atlas.hashicorp.com/api/v1/terraform/state?username=acme +``` - $ curl %{ATLAS_URL}/api/v1/terraform/state?username=acme_inc \ - -H "X-Atlas-Token: $ATLAS_TOKEN" +### Sample Response -#### Getting second page of list of Terraform states - - $ curl %{ATLAS_URL}/api/v1/terraform/state?page=2 \ - -H "X-Atlas-Token: $ATLAS_TOKEN" +```json +{ + "states": [ + { + "updated_at": "2017-02-03T19:52:37.693Z", + "environment": { + "username": "my-organization", + "name": "docs-demo-one" + } + }, + { + "updated_at": "2017-04-06T15:48:49.677Z", + "environment": { + "username": "my-organization", + "name": "docs-demo-two" + } + } + ] +} +``` diff --git a/website/source/docs/enterprise/api/users.html.md b/website/source/docs/enterprise/api/users.html.md index 370b5c06b..aca40df05 100755 --- a/website/source/docs/enterprise/api/users.html.md +++ b/website/source/docs/enterprise/api/users.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Users API" +page_title: "Users - API - Terraform Enterprise" sidebar_current: "docs-enterprise-api-users" description: |- Users are both users and organizations in Terraform Enterprise. They are the parent resource of all resources. @@ -12,21 +12,38 @@ Users are both users and organizations in Terraform Enterprise. They are the parent resource of all resources. Currently, only the retrieval of users is available on the API. Additionally, -only Vagrant box resources will be listed. Boxes will -be returned based on permissions over the organization, or user. +only Vagrant box resources will be listed. Boxes will be returned based on +permissions over the organization, or user. -### Actions +## Read User -The following actions can be performed on this resource. +This endpoint retrieves information about a single user. -
-
Show
-
GET /api/v1/user/:username
-
+| Method | Path | +| :----- | :------------- | +| `GET` | `/user/:username` | -### Examples +### Parameters -#### Retrieve a user +- `:username` `(string: )` - Specifies the username to search. This is + specified as part of the URL. - $ curl %{ATLAS_URL}/api/v1/user/%{DEFAULT_USERNAME} \ - -H "X-Atlas-Token: $ATLAS_TOKEN" +### Sample Request + +```text +$ curl \ + --header "X-Atlas-Token: ..." \ + https://atlas.hashicorp.com/api/v1/user/my-user +``` + +### Sample Response + +```json +{ + "username": "sally-seashell", + "avatar_url": "https://www.gravatar.com/avatar/...", + "profile_html": "Sally is...", + "profile_markdown": "Sally is...", + "boxes": [] +} +``` From bbb8d1fe6d3f3432782640b19a573f008762dfbd Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:00:12 -0400 Subject: [PATCH 54/72] Update artifact docs --- .../artifacts/artifact-provider.html.md | 49 +++++++++-------- .../artifacts/creating-amis.html.md | 2 +- .../docs/enterprise/artifacts/index.html.md | 12 ++-- .../artifacts/managing-versions.html.md | 55 ++++++++++--------- 4 files changed, 63 insertions(+), 55 deletions(-) diff --git a/website/source/docs/enterprise/artifacts/artifact-provider.html.md b/website/source/docs/enterprise/artifacts/artifact-provider.html.md index c0045d4c1..a68a1e5c6 100755 --- a/website/source/docs/enterprise/artifacts/artifact-provider.html.md +++ b/website/source/docs/enterprise/artifacts/artifact-provider.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Artifact Provider" +page_title: "Provider - Artifacts - Terraform Enterprise" sidebar_current: "docs-enterprise-artifacts-provider" description: |- Terraform has a provider for managing artifacts called `atlas_artifact`. @@ -10,37 +10,40 @@ description: |- Terraform has a [provider](https://terraform.io/docs/providers/index.html) for managing Terraform Enterprise artifacts called `atlas_artifact`. -This is used to make data stored in Artifacts available to -Terraform for interpolation. In the following example, an artifact -is defined and references an AMI ID stored in Terraform Enterprise. +This is used to make data stored in Artifacts available to Terraform for +interpolation. In the following example, an artifact is defined and references +an AMI ID stored in Terraform Enterprise. - provider "atlas" { - # You can also set the atlas token by exporting - # ATLAS_TOKEN into your env - token = "${var.atlas_token}" - } +```hcl +provider "atlas" { + # You can also set the atlas token by exporting ATLAS_TOKEN into your env + token = "${var.atlas_token}" +} - resource "atlas_artifact" "web-worker" { - name = "%{DEFAULT_USERNAME}/web-worker" - type = "amazon.image" - version = "latest" - } +resource "atlas_artifact" "web-worker" { + name = "my-username/web-worker" + type = "amazon.image" + version = "latest" +} - resource "aws_instance" "worker-machine" { - ami = "${atlas_artifact.web-worker.metadata_full.region-us-east-1}" - instance_type = "m1.small" - } +resource "aws_instance" "worker-machine" { + ami = "${atlas_artifact.web-worker.metadata_full.region-us-east-1}" + instance_type = "m1.small" +} +``` This automatically pulls the "latest" artifact version. Following a new artifact version being created via a Packer build, the following diff would be generated when running `terraform plan`. - -/+ aws_instance.worker-machine - ami: "ami-168f9d7e" => "ami-2f3a9df2" (forces new resource) - instance_type: "m1.small" => "m1.small" +``` +-/+ aws_instance.worker-machine + ami: "ami-168f9d7e" => "ami-2f3a9df2" (forces new resource) + instance_type: "m1.small" => "m1.small" +``` -This allows you to reference changing artifacts and trigger new deployments -upon pushing subsequent Packer builds. +This allows you to reference changing artifacts and trigger new deployments upon +pushing subsequent Packer builds. Read more about artifacts in the [Terraform documentation](https://terraform.io/docs/providers/atlas/r/artifact.html). diff --git a/website/source/docs/enterprise/artifacts/creating-amis.html.md b/website/source/docs/enterprise/artifacts/creating-amis.html.md index 4ed135467..1469c65a7 100755 --- a/website/source/docs/enterprise/artifacts/creating-amis.html.md +++ b/website/source/docs/enterprise/artifacts/creating-amis.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Creating AMI Artifacts" +page_title: "Creating AMIs - Artifacts - Terraform Enterprise" sidebar_current: "docs-enterprise-artifacts-amis" description: |- Creating AMI Artifacts with Packer. diff --git a/website/source/docs/enterprise/artifacts/index.html.md b/website/source/docs/enterprise/artifacts/index.html.md index bd313a112..4655f1eb0 100755 --- a/website/source/docs/enterprise/artifacts/index.html.md +++ b/website/source/docs/enterprise/artifacts/index.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Terraform Artifacts" +page_title: "Artifacts - Terraform Enterprise" sidebar_current: "docs-enterprise-artifacts" description: |- Terraform Enterprise can be used to store artifacts for use by Terraform. Typically, artifacts are stored with Packer. @@ -8,14 +8,14 @@ description: |- # About Terraform Artifacts -Terraform Enterprise can be used to store artifacts for use by Terraform. Typically, -artifacts are [stored with Packer](https://packer.io/docs). +Terraform Enterprise can be used to store artifacts for use by Terraform. +Typically, artifacts are [stored with Packer](https://packer.io/docs). Artifacts can be used in to deploy and manage images of configuration. Artifacts are generic, but can be of varying types like `amazon.image`. See the Packer [`artifact_type`](https://packer.io/docs/post-processors/atlas.html#artifact_type) docs for more information. -Packer can create artifacts both while running in and out of Terraform Enterprise -network. This is possible due to the post-processors use of the public -artifact API to store the artifacts. \ No newline at end of file +Packer can create artifacts both while running in and out of Terraform +Enterprise network. This is possible due to the post-processors use of the +public artifact API to store the artifacts. diff --git a/website/source/docs/enterprise/artifacts/managing-versions.html.md b/website/source/docs/enterprise/artifacts/managing-versions.html.md index 074e86f9f..04ad0fbd1 100755 --- a/website/source/docs/enterprise/artifacts/managing-versions.html.md +++ b/website/source/docs/enterprise/artifacts/managing-versions.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Managing Artifact Versions" +page_title: "Managing Versions - Artifacts - Terraform Enterprise" sidebar_current: "docs-enterprise-artifacts-versions" description: |- Artifacts are versioned and assigned a version number, here is how to manage the versions. @@ -8,9 +8,9 @@ description: |- # Managing Artifact Versions -Artifacts stored in Terraform Enterprise are versioned and assigned a version number. -Versions are useful to roll back, audit and deploy images specific versions -of images to certain environments in a targeted way. +Artifacts stored in Terraform Enterprise are versioned and assigned a version +number. Versions are useful to roll back, audit and deploy images specific +versions of images to certain environments in a targeted way. This assumes you are familiar with the [artifact provider](https://terraform.io/docs/providers/atlas/index.html) in Terraform. @@ -24,14 +24,16 @@ be used to use the latest version of the artifact. The following output is from `terraform show`. - atlas_artifact.web-worker: - id = us-east-1:ami-3a0a1d52 - build = latest - metadata_full.# = 1 - metadata_full.region-us-east-1 = ami-3a0a1d52 - name = %{DEFAULT_USERNAME}/web-worker - slug = %{DEFAULT_USERNAME}/web-worker/amazon.image/7 - type = amazon.image +```text +atlas_artifact.web-worker: + id = us-east-1:ami-3a0a1d52 + build = latest + metadata_full.# = 1 + metadata_full.region-us-east-1 = ami-3a0a1d52 + name = my-username/web-worker + slug = my-username/web-worker/amazon.image/7 + type = amazon.image +``` In this case, the version is 7 and can be found in the persisted slug attribute. @@ -41,11 +43,13 @@ attribute. You can pin artifacts to a specific version. This allows for a targeted deploy. - resource "atlas_artifact" "web-worker" { - name = "%{DEFAULT_USERNAME}/web-worker" - type = "amazon.image" - version = 7 - } +```hcl +resource "atlas_artifact" "web-worker" { + name = "my-username/web-worker" + type = "amazon.image" + version = 7 +} +``` This will use version 7 of the `web-worker` artifact. @@ -54,12 +58,13 @@ This will use version 7 of the `web-worker` artifact. Artifacts can also be pinned to an Terraform build number. This is only possible if Terraform Enterprise was used to build the artifact with Packer. - resource "atlas_artifact" "web-worker" { - name = "%{DEFAULT_USERNAME}/web-worker" - type = "amazon.image" - build = 5 - } +```hcl +resource "atlas_artifact" "web-worker" { + name = "my-username/web-worker" + type = "amazon.image" + build = 5 +} +``` -It's recommended to use versions, instead of builds, as it will -be easier to track when building outside of the Terraform Enterprise -environment. +It's recommended to use versions, instead of builds, as it will be easier to +track when building outside of the Terraform Enterprise environment. From 85900595bc8d429b00f8460d0cd8a741017ab6cf Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:00:26 -0400 Subject: [PATCH 55/72] Update FAQ and Glossary --- .../source/docs/enterprise/faq/index.html.md | 2 +- .../faq/monolithic-artifacts.html.md | 254 +++++++++--------- .../faq/rolling-deployments.html.md | 110 ++++---- .../docs/enterprise/glossary/index.html.md | 234 ++++++++-------- 4 files changed, 310 insertions(+), 290 deletions(-) diff --git a/website/source/docs/enterprise/faq/index.html.md b/website/source/docs/enterprise/faq/index.html.md index 87751c1ba..106cb5f0d 100755 --- a/website/source/docs/enterprise/faq/index.html.md +++ b/website/source/docs/enterprise/faq/index.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Terraform Enterprise FAQs" +page_title: "FAQ - Terraform Enterprise" sidebar_current: "docs-enterprise-faq" description: |- Frequently Asked Questions. diff --git a/website/source/docs/enterprise/faq/monolithic-artifacts.html.md b/website/source/docs/enterprise/faq/monolithic-artifacts.html.md index e607053c0..e44f12331 100755 --- a/website/source/docs/enterprise/faq/monolithic-artifacts.html.md +++ b/website/source/docs/enterprise/faq/monolithic-artifacts.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "FAQ: Monolithic Artifacts" +page_title: "Monolithic Artifacts - FAQ - Terraform Enterprise" sidebar_current: "docs-enterprise-faq-monolithic" description: |- How do I build multiple applications into one artifact? @@ -10,140 +10,150 @@ description: |- *How do I build multiple applications into one artifact?* -Create your new Applications in Terraform Enterprise using the application compilation feature. +Create your new Applications in Terraform Enterprise using the application +compilation feature. -You can either link each Application to the single Build Template you will be using to create the monolithic artifact, or run periodic Packer builds. +You can either link each Application to the single Build Template you will be +using to create the monolithic artifact, or run periodic Packer builds. -Each time an Application is pushed, it will store the new application version in the artifact registry as a tarball. These will be available for you to download at build-time on the machines they belong. +Each time an Application is pushed, it will store the new application version in +the artifact registry as a tarball. These will be available for you to download +at build-time on the machines they belong. -Here's an example `compile.json` template that you will include with the rest of your application files that do the compiling: +Here's an example `compile.json` template that you will include with the rest of +your application files that do the compiling: +```json +{ + "variables": { + "app_slug": "{{ env `ATLAS_APPLICATION_SLUG` }}" + }, + "builders": [ { - "variables": { - "app_slug": "{{ env `ATLAS_APPLICATION_SLUG` }}" - }, - "builders": [ - { - "type": "docker", - "image": "ubuntu:14.04", - "commit": true - } - ], - "provisioners": [ - { - "type": "shell", - "inline": [ - "apt-get -y update" - ] - }, - { - "type": "file", - "source": ".", - "destination": "/tmp/app" - }, - { - "type": "shell", - "inline": [ - "cd /tmp/app", - "make" - ] - }, - { - "type": "file", - "source": "/tmp/compiled-app.tar.gz", - "destination": "compiled-app.tar.gz", - "direction": "download" - } - ], - "post-processors": [ - [ - { - "type": "artifice", - "files": ["compiled-app.tar.gz"] - }, - { - "type": "atlas", - "artifact": "{{user `app_slug` }}", - "artifact_type": "archive" - } - ] - ] + "type": "docker", + "image": "ubuntu:14.04", + "commit": true } + ], + "provisioners": [ + { + "type": "shell", + "inline": [ + "apt-get -y update" + ] + }, + { + "type": "file", + "source": ".", + "destination": "/tmp/app" + }, + { + "type": "shell", + "inline": [ + "cd /tmp/app", + "make" + ] + }, + { + "type": "file", + "source": "/tmp/compiled-app.tar.gz", + "destination": "compiled-app.tar.gz", + "direction": "download" + } + ], + "post-processors": [ + [ + { + "type": "artifice", + "files": ["compiled-app.tar.gz"] + }, + { + "type": "atlas", + "artifact": "{{user `app_slug` }}", + "artifact_type": "archive" + } + ] + ] +} +``` + +In your Packer template, you can download each of the latest applications +artifacts onto the host using the shell provisioner: -In your Packer template, you can download each of the latest applications artifacts onto the host using the shell provisioner: - - -```curl -L -H "X-Atlas-Token: ${ATLAS_TOKEN}" https://atlas.hashicorp.com/api/v1/artifacts/hashicorp/example/archive/latest/file -o example.tar.gz``` - +```text +$ curl -L -H "X-Atlas-Token: ${ATLAS_TOKEN}" https://atlas.hashicorp.com/api/v1/artifacts/hashicorp/example/archive/latest/file -o example.tar.gz +``` Here's an example Packer template: - +```json +{ + "variables": { + "atlas_username": "{{env `ATLAS_USERNAME`}}", + "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", + "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}", + "aws_region": "{{env `AWS_DEFAULT_REGION`}}", + "instance_type": "c3.large", + "source_ami": "ami-9a562df2", + "name": "example", + "ssh_username": "ubuntu", + "app_dir": "/app" + }, + "push": { + "name": "{{user `atlas_username`}}/{{user `name`}}", + "vcs": false + }, + "builders": [ { - "variables": { - "atlas_username": "{{env `ATLAS_USERNAME`}}", - "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", - "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}", - "aws_region": "{{env `AWS_DEFAULT_REGION`}}", - "instance_type": "c3.large", - "source_ami": "ami-9a562df2", - "name": "example", - "ssh_username": "ubuntu", - "app_dir": "/app" - }, - "push": { - "name": "{{user `atlas_username`}}/{{user `name`}}", - "vcs": false - }, - "builders": [ - { - "type": "amazon-ebs", - "access_key": "{{user `aws_access_key`}}", - "secret_key": "{{user `aws_secret_key`}}", - "region": "{{user `aws_region`}}", - "vpc_id": "", - "subnet_id": "", - "instance_type": "{{user `instance_type`}}", - "source_ami": "{{user `source_ami`}}", - "ami_regions": [], - "ami_name": "{{user `name`}} {{timestamp}}", - "ami_description": "{{user `name`}} AMI", - "run_tags": { "ami-create": "{{user `name`}}" }, - "tags": { "ami": "{{user `name`}}" }, - "ssh_username": "{{user `ssh_username`}}", - "ssh_timeout": "10m", - "ssh_private_ip": false, - "associate_public_ip_address": true - } - ], - "provisioners": [ - { - "type": "shell", - "execute_command": "echo {{user `ssh_username`}} | {{ .Vars }} sudo -E -S sh '{{ .Path }}'", - "inline": [ - "apt-get -y update", - "apt-get -y upgrade", - "apt-get -y install curl unzip tar", - "mkdir -p {{user `app_dir`}}", - "chmod a+w {{user `app_dir`}}", - "cd /tmp", - "curl -L -H "X-Atlas-Token: ${ATLAS_TOKEN}" https://atlas.hashicorp.com/api/v1/artifacts/{{user `atlas_username`}}/{{user `name`}}/archive/latest/file -o example.tar.gz", - "tar -xzf example.tar.gz -C {{user `app_dir`}}" - ] - } - ], - "post-processors": [ - { - "type": "atlas", - "artifact": "{{user `atlas_username`}}/{{user `name`}}", - "artifact_type": "amazon.image", - "metadata": { - "created_at": "{{timestamp}}" - } - } + "type": "amazon-ebs", + "access_key": "{{user `aws_access_key`}}", + "secret_key": "{{user `aws_secret_key`}}", + "region": "{{user `aws_region`}}", + "vpc_id": "", + "subnet_id": "", + "instance_type": "{{user `instance_type`}}", + "source_ami": "{{user `source_ami`}}", + "ami_regions": [], + "ami_name": "{{user `name`}} {{timestamp}}", + "ami_description": "{{user `name`}} AMI", + "run_tags": { "ami-create": "{{user `name`}}" }, + "tags": { "ami": "{{user `name`}}" }, + "ssh_username": "{{user `ssh_username`}}", + "ssh_timeout": "10m", + "ssh_private_ip": false, + "associate_public_ip_address": true + } + ], + "provisioners": [ + { + "type": "shell", + "execute_command": "echo {{user `ssh_username`}} | {{ .Vars }} sudo -E -S sh '{{ .Path }}'", + "inline": [ + "apt-get -y update", + "apt-get -y upgrade", + "apt-get -y install curl unzip tar", + "mkdir -p {{user `app_dir`}}", + "chmod a+w {{user `app_dir`}}", + "cd /tmp", + "curl -L -H 'X-Atlas-Token: ${ATLAS_TOKEN}' https://atlas.hashicorp.com/api/v1/artifacts/{{user `atlas_username`}}/{{user `name`}}/archive/latest/file -o example.tar.gz", + "tar -xzf example.tar.gz -C {{user `app_dir`}}" ] } + ], + "post-processors": [ + { + "type": "atlas", + "artifact": "{{user `atlas_username`}}/{{user `name`}}", + "artifact_type": "amazon.image", + "metadata": { + "created_at": "{{timestamp}}" + } + } + ] +} +``` -Once downloaded, you can place each application slug where it needs to go to produce the monolithic artifact your are accustom to. +Once downloaded, you can place each application slug where it needs to go to +produce the monolithic artifact your are accustom to. diff --git a/website/source/docs/enterprise/faq/rolling-deployments.html.md b/website/source/docs/enterprise/faq/rolling-deployments.html.md index 2f72e82ca..768a287bd 100755 --- a/website/source/docs/enterprise/faq/rolling-deployments.html.md +++ b/website/source/docs/enterprise/faq/rolling-deployments.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "FAQ: Rolling Deployments" +page_title: "Rolling Deployments - FAQ - Terraform Enterprise" sidebar_current: "docs-enterprise-faq-deployments" description: |- How do I configure rolling deployments in Terraform Enterprise? @@ -10,71 +10,85 @@ description: |- *How do I configure rolling deployments?* -User are able to quickly change out an Artifact version that is being utilized by Terraform, using variables within Terraform Enterprise. This is -particularly useful when testing specific versions of the given artifact without performing a full rollout. This configuration also allows one -to deploy any version of an artifact with ease, simply by changing a version variable in Terraform and re-deploying. +User are able to quickly change out an Artifact version that is being utilized +by Terraform, using variables within Terraform Enterprise. This is particularly +useful when testing specific versions of the given artifact without performing a +full rollout. This configuration also allows one to deploy any version of an +artifact with ease, simply by changing a version variable in Terraform and +re-deploying. Here is an example: - variable "type" { default = "amazon.image" } - variable "region" { } - variable "atlas_username" { } - variable "pinned_name" { } - variable "pinned_version" { default = "latest" } +```hcl +variable "type" { default = "amazon.image" } +variable "region" {} +variable "atlas_username" {} +variable "pinned_name" {} +variable "pinned_version" { default = "latest" } - resource "atlas_artifact" "pinned" { - name = "${var.atlas_username}/${var.pinned_name}" - type = "${var.type}" - version = "${var.pinned_version}" +resource "atlas_artifact" "pinned" { + name = "${var.atlas_username}/${var.pinned_name}" + type = "${var.type}" + version = "${var.pinned_version}" - lifecycle { create_before_destroy = true } + lifecycle { create_before_destroy = true } - metadata { - region = "${var.region}" - } - } + metadata { + region = "${var.region}" + } +} - output "pinned" { value = "${atlas_artifact.pinned.metadata_full.ami_id}" } +output "pinned" { value = "${atlas_artifact.pinned.metadata_full.ami_id}" } +``` -In the above example we have an `atlas_artifact` resource where you pass in the version number via the variable `pinned_version`. (_note: this variable defaults to latest_). -If you ever want to deploy any other version, you just update the variable `pinned_version` and redeploy. +In the above example we have an `atlas_artifact` resource where you pass in the +version number via the variable `pinned_version`. (_note: this variable defaults +to latest_). If you ever want to deploy any other version, you just update the +variable `pinned_version` and redeploy. -Below is similar to the first example, but it is in the form of a module that handles the creation of artifacts: +Below is similar to the first example, but it is in the form of a module that +handles the creation of artifacts: - variable "type" { default = "amazon.image" } - variable "region" { } - variable "atlas_username" { } - variable "artifact_name" { } - variable "artifact_version" { default = "latest" } +```hcl +variable "type" { default = "amazon.image" } +variable "region" {} +variable "atlas_username" {} +variable "artifact_name" {} +variable "artifact_version" { default = "latest" } - resource "atlas_artifact" "artifact" { - name = "${var.atlas_username}/${var.artifact_name}" - type = "${var.type}" - count = "${length(split(",", var.artifact_version))}" - version = "${element(split(",", var.artifact_version), count.index)}" +resource "atlas_artifact" "artifact" { + name = "${var.atlas_username}/${var.artifact_name}" + type = "${var.type}" + count = "${length(split(",", var.artifact_version))}" + version = "${element(split(",", var.artifact_version), count.index)}" - lifecycle { create_before_destroy = true } - metadata { region = "${var.region}" } - } + lifecycle { create_before_destroy = true } + metadata { region = "${var.region}" } +} - output "amis" { value = "${join(",", atlas_artifact.artifact.*.metadata_full.ami_id)}" } +output "amis" { value = "${join(",", atlas_artifact.artifact.*.metadata_full.ami_id)}" } +``` -One can then use the module as follows (_note: the source will likely be different depending on the location of the module_): +One can then use the module as follows (_note: the source will likely be +different depending on the location of the module_): - module "artifact_consul" { - source = "../../../modules/aws/util/artifact" +```hcl +module "artifact_consul" { + source = "../../../modules/aws/util/artifact" - type = "${var.artifact_type}" - region = "${var.region}" - atlas_username = "${var.atlas_username}" - artifact_name = "${var.consul_artifact_name}" - artifact_version = "${var.consul_artifacts}" - } + type = "${var.artifact_type}" + region = "${var.region}" + atlas_username = "${var.atlas_username}" + artifact_name = "${var.consul_artifact_name}" + artifact_version = "${var.consul_artifacts}" +} +``` -In the above example, we have created artifacts for Consul. In this example, we can create two versions of the artifact, -"latest" and "pinned". This is useful when rolling a cluster (like Consul) one node at a time, keeping some nodes pinned to current version and others -deployed with the latest Artifact. +In the above example, we have created artifacts for Consul. In this example, we +can create two versions of the artifact, "latest" and "pinned". This is useful +when rolling a cluster (like Consul) one node at a time, keeping some nodes +pinned to current version and others deployed with the latest Artifact. There are additional details for implementing rolling deployments in the [Best-Practices Repo](https://github.com/hashicorp/best-practices/blob/master/terraform/providers/aws/us_east_1_prod/us_east_1_prod.tf#L105-L123), as there are some things uncovered in this FAQ (i.e Using the Terraform Enterprise Artifact in an instance). diff --git a/website/source/docs/enterprise/glossary/index.html.md b/website/source/docs/enterprise/glossary/index.html.md index 092542047..dc573c2c9 100755 --- a/website/source/docs/enterprise/glossary/index.html.md +++ b/website/source/docs/enterprise/glossary/index.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Terraform Enterprise Glossary" +page_title: "Glossary - Terraform Enterprise" sidebar_current: "docs-enterprise-glossary" description: |- Terminology for Terraform Enterprise. @@ -8,119 +8,117 @@ description: |- # Glossary -Terraform Enterprise, and this documentation, covers a large set of terminology adopted -from tools, industry standards and the community. This glossary -seeks to define as many of those terms as possible to help increase -understanding in interfacing with the platform and reading documentation. +Terraform Enterprise, and this documentation, covers a large set of terminology +adopted from tools, industry standards and the community. This glossary seeks to +define as many of those terms as possible to help increase understanding in +interfacing with the platform and reading documentation. -### Authentication Tokens +## Authentication Tokens -Authentication tokens are tokens used to authenticate with Terraform Enterprise via -APIs or through tools. Authentication tokens can be revoked, expired -or created under any user. +Authentication tokens are tokens used to authenticate with Terraform Enterprise +via APIs or through tools. Authentication tokens can be revoked, expired or +created under any user. -### ACL +## ACL -ACL is an acronym for access control list. This defines access -to a set of resources. Access to an object in Terraform Enterprise limited to "read" -for certain users is an example of an ACL. +ACL is an acronym for access control list. This defines access to a set of +resources. Access to an object in Terraform Enterprise limited to "read" for +certain users is an example of an ACL. -### Alert +## Alert -An alert represents a health check status change on a Consul node that -is sent to Terraform Enterprise, and then recorded and distributed to various +An alert represents a health check status change on a Consul node that is sent +to Terraform Enterprise, and then recorded and distributed to various notification methods. -### Application +## Application -An application is a set of code that represents an application that should -be deployed. Applications can be linked to builds to be made -available in the Packer environment. +An application is a set of code that represents an application that should be +deployed. Applications can be linked to builds to be made available in the +Packer environment. -### Apply +## Apply -An apply is the second step of the two steps required for -Terraform to make changes to infrastructure. The apply is the process -of communicating with external APIs to make the changes. +An apply is the second step of the two steps required for Terraform to make +changes to infrastructure. The apply is the process of communicating with +external APIs to make the changes. -### Artifact +## Artifact -An artifact is an abstract representation of something you wish to -store and use again that has undergone configuration, compilation or -some other build process. An artifact is typically -an image created by Packer that is then deployed by Terraform, or used -locally with Vagrant. +An artifact is an abstract representation of something you wish to store and use +again that has undergone configuration, compilation or some other build process. +An artifact is typically an image created by Packer that is then deployed by +Terraform, or used locally with Vagrant. -### Box +## Box -Boxes are a Vagrant specific package format. Vagrant can install -and uses images in box format. +Boxes are a Vagrant specific package format. Vagrant can install and uses images +in box format. -### Build +## Build -Builds are resources that represent Packer configurations. A build -is a generic name, sometimes called a "Build Configuration" when -defined in the Terraform Enterprise UI. +Builds are resources that represent Packer configurations. A build is a generic +name, sometimes called a "Build Configuration" when defined in the Terraform +Enterprise UI. -### Build Configuration +## Build Configuration -A build configuration are settings associated with a resource that -creates artifacts via builds. A build configuration is the name -in `packer push -name acemeinc/web`. +A build configuration are settings associated with a resource that creates +artifacts via builds. A build configuration is the name in `packer push -name +acemeinc/web`. -### Catalog +## Catalog -The box catalog is a publicly available index of Vagrant Boxes -that can be downloaded from Terraform Enterprise and used for development. +The box catalog is a publicly available index of Vagrant Boxes that can be +downloaded from Terraform Enterprise and used for development. -### Consul +## Consul -[Consul](https://consul.io) is a HashiCorp tool for service discovery, configuration, -and orchestration. Consul enables rapid deployment, configuration, monitoring and -maintenance of service-oriented architectures. +[Consul](https://consul.io) is a HashiCorp tool for service discovery, +configuration, and orchestration. Consul enables rapid deployment, +configuration, monitoring and maintenance of service-oriented architectures. -### Datacenter +## Datacenter -A datacenter represents a group of nodes in the same network or -datacenter within Consul. +A datacenter represents a group of nodes in the same network or datacenter +within Consul. -### Environment +## Environment -Environments show the real-time status of your infrastructure, -any pending changes, and its change history. Environments can be configured -to use any or all of these three components. +Environments show the real-time status of your infrastructure, any pending +changes, and its change history. Environments can be configured to use any or +all of these three components. -Environments are the namespace of your Terraform Enterprise managed infrastructure. -As an example, if you to have a production environment -for a company named Acme Inc., your environment -may be named `%{DEFAULT_USERNAME}/production`. +Environments are the namespace of your Terraform Enterprise managed +infrastructure. As an example, if you to have a production environment for a +company named Acme Inc., your environment may be named +`my-username/production`. -To read more about features provided under environments, -read the [Terraform](/docs/enterprise) sections. +To read more about features provided under environments, read the +[Terraform](/docs/enterprise) sections. -### Environment Variables +## Environment Variables Environment variables injected into the environment of Packer builds or Terraform Runs (plans and applies). -### Flapping +## Flapping -Flapping is something entering and leaving a healthy state rapidly. It is typically associated with a health checks that -briefly report unhealthy status before recovering. +Flapping is something entering and leaving a healthy state rapidly. It is +typically associated with a health checks that briefly report unhealthy status +before recovering. -### Health Check +## Health Check Health checks trigger alerts by changing status on a Consul node. That status -change is seen by Terraform Enterprise, when connected, and an associated alert is -recorded and sent to any configured notification methods, like -email. +change is seen by Terraform Enterprise, when connected, and an associated alert +is recorded and sent to any configured notification methods, like email. -### Infrastructure +## Infrastructure -An infrastructure is a stateful representation of a set of Consul -datacenters. +An infrastructure is a stateful representation of a set of Consul datacenters. -### Managed Node +## Managed Node Managed node is the billing metric for Terraform Enterprise. For Consul Enterprise, a node is a host with a Consul agent on it. For Terraform Enterprise, a node is a compute @@ -130,79 +128,77 @@ as compute resources. All [Terraform Enterprise features](/docs/enterprise) are paid. -### Operator +## Operator -An operator is a person who is making changes to infrastructure or -settings. +An operator is a person who is making changes to infrastructure or settings. -### Packer +## Packer -[Packer](https://packer.io) is a tool for creating images for platforms such as Amazon AWS, -OpenStack, VMware, VirtualBox, Docker, and more — all from a single +[Packer](https://packer.io) is a tool for creating images for platforms such as +Amazon AWS, OpenStack, VMware, VirtualBox, Docker, and more — all from a single source configuration. -### Packer Template +## Packer Template -A Packer template is a JSON file that configure the various components -of Packer in order to create one or more machine images. +A Packer template is a JSON file that configure the various components of Packer +in order to create one or more machine images. -### Plan +## Plan -A plan is the second step of the two steps required for -Terraform to make changes to infrastructure. The plan is the process -of determining what changes will be made to. +A plan is the second step of the two steps required for Terraform to make +changes to infrastructure. The plan is the process of determining what changes +will be made to. -### Providers +## Providers -Providers are often referenced when discussing Packer -or Terraform. Terraform providers manage resources in Terraform. +Providers are often referenced when discussing Packer or Terraform. Terraform +providers manage resources in Terraform. [Read more](https://terraform.io/docs/providers/index.html). -### Post-Processors +## Post-Processors -The post-processor section within a Packer template configures -any post-processing that will be done to images built by the builders. -Examples of post-processing would be compressing files, uploading -artifacts, etc.. +The post-processor section within a Packer template configures any +post-processing that will be done to images built by the builders. Examples of +post-processing would be compressing files, uploading artifacts, etc.. -### Registry +## Registry -Often referred to as the "Artifact Registry", the registry -stores artifacts, be it images or IDs for cloud provider images. +Often referred to as the "Artifact Registry", the registry stores artifacts, be +it images or IDs for cloud provider images. -### Run +## Run A run represents a two step Terraform plan and a subsequent apply. -### Service +## Service -A service in Consul represents an application or service, which -could be active on any number of nodes. +A service in Consul represents an application or service, which could be active +on any number of nodes. -### Share +## Share -Shares are let you instantly share public access to your running -Vagrant environment (virtual machine). +Shares are let you instantly share public access to your running Vagrant +environment (virtual machine). -### State +## State -Terraform state is the state of your managed infrastructure from the last -time Terraform was run. By default this state is stored in a local file -named `terraform.tfstate`, but it can also be stored in Terraform Enterprise -and is then called "Remote state". +Terraform state is the state of your managed infrastructure from the last time +Terraform was run. By default this state is stored in a local file named +`terraform.tfstate`, but it can also be stored in Terraform Enterprise and is +then called "Remote state". -### Terraform +## Terraform -[Terraform](https://terraform.io) is a tool for safely and -efficiently changing infrastructure across providers. +[Terraform](https://terraform.io) is a tool for safely and efficiently changing +infrastructure across providers. -### Terraform Configuration +## Terraform Configuration -Terraform configuration is the configuration files and any -files that may be used in provisioners like `remote-exec`. +Terraform configuration is the configuration files and any files that may be +used in provisioners like `remote-exec`. -### Terraform Variables +## Terraform Variables -Variables in Terraform, uploaded with `terraform push` or -set in the UI. These differ from environment variables -as they are a first class Terraform variable used in interpolation. +Variables in Terraform, uploaded with `terraform push` or set in the UI. These +differ from environment variables as they are a first class Terraform variable +used in interpolation. From 1bd0e49f2b97f6933828fb4198719f0632adb2f8 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:00:35 -0400 Subject: [PATCH 56/72] Update organizations --- .../authentication-policy.html.md | 20 +++++++++++++----- .../enterprise/organizations/create.html.md | 12 +++++------ .../organizations/credit-card.html.md | 7 +++++-- .../enterprise/organizations/index.html.md | 13 ++++++------ .../enterprise/organizations/migrate.html.md | 21 +++++++++---------- .../enterprise/organizations/trials.html.md | 4 ++-- 6 files changed, 43 insertions(+), 34 deletions(-) diff --git a/website/source/docs/enterprise/organizations/authentication-policy.html.md b/website/source/docs/enterprise/organizations/authentication-policy.html.md index 9800c9710..ed91863c6 100755 --- a/website/source/docs/enterprise/organizations/authentication-policy.html.md +++ b/website/source/docs/enterprise/organizations/authentication-policy.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Organization Authentication Policy" +page_title: "Authentication Policy - Organizations - Terraform Enterprise" sidebar_current: "docs-enterprise-organizations-policy" description: |- Owners can set organization-wide authentication policy in Terraform Enterprise. @@ -9,14 +9,24 @@ description: |- # Set an Organization Authentication Policy -Because organization membership affords members access to potentially sensitive resources, owners can set organization-wide authentication policy in Terraform Enterprise. +Because organization membership affords members access to potentially sensitive +resources, owners can set organization-wide authentication policy in Terraform +Enterprise. ## Requiring Two-Factor Authentication -Organization owners can require that all organization team members use [two-factor authentication](/docs/enterprise/user-accounts/authentication.html). Those that lack two-factor authentication will be locked out of the web interface until they enable it or leave the organization. +Organization owners can require that all organization team members use +[two-factor authentication](/docs/enterprise/user-accounts/authentication.html). +Those that lack two-factor authentication will be locked out of the web +interface until they enable it or leave the organization. -Visit your organization's configuration page to enable this feature. All organization owners must have two-factor authentication enabled to require the practice organization-wide. Note: locked-out users are still be able to interact with Terraform Enterprise using their `ATLAS_TOKEN`. +Visit your organization's configuration page to enable this feature. All +organization owners must have two-factor authentication enabled to require the +practice organization-wide. Note: locked-out users are still be able to interact +with Terraform Enterprise using their `ATLAS_TOKEN`. ## Disabling Two-Factor Authentication Requirement -Organization owners can disable the two-factor authentication requirement from their organization's configuration page. Locked-out team members (those who have not enabled two-factor authentication) will have their memberships reinstated. +Organization owners can disable the two-factor authentication requirement from +their organization's configuration page. Locked-out team members (those who have +not enabled two-factor authentication) will have their memberships reinstated. diff --git a/website/source/docs/enterprise/organizations/create.html.md b/website/source/docs/enterprise/organizations/create.html.md index 4eae54d16..0da8757cc 100755 --- a/website/source/docs/enterprise/organizations/create.html.md +++ b/website/source/docs/enterprise/organizations/create.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Create and organization" +page_title: "Create - Organizations - Terraform Enterprise" sidebar_current: "docs-enterprise-organizations-create" description: |- How to create a Terraform Enterprise account. @@ -10,10 +10,8 @@ description: |- To create an organization: -1. Create a personal account. You'll use this to create and administrate -the organization. You'll be able to add other users as owners of the -organization, so it won't be tied solely to your account. - -1. Visit your new organization page to create the -organization. +1. Create a personal account. You'll use this to create and administrate the +organization. You'll be able to add other users as owners of the organization, +so it won't be tied solely to your account. +1. Visit your new organization page to create the organization. diff --git a/website/source/docs/enterprise/organizations/credit-card.html.md b/website/source/docs/enterprise/organizations/credit-card.html.md index f4f96794a..5827293d5 100755 --- a/website/source/docs/enterprise/organizations/credit-card.html.md +++ b/website/source/docs/enterprise/organizations/credit-card.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Add a credit card to an organization" +page_title: "Add a Credit Card - Organizations - Terraform Enterprise" sidebar_current: "docs-enterprise-organizations-credit" description: |- You must add a credit card to your organization's account to setup auto billing. @@ -8,6 +8,9 @@ description: |- # Add credit card details to an organization -To setup automated billing for your Terraform usage, you must add a credit card to your organization's account. To do so, go into your account settings, then go to the proper organization settings in the left navigation. Select billing in the organization settings, and then enter your credit card information. +To setup automated billing for your Terraform usage, you must add a credit card +to your organization's account. To do so, go into your account settings, then go +to the proper organization settings in the left navigation. Select billing in +the organization settings, and then enter your credit card information. If you have any questions regarding billing or payment, contact [sales@hashicorp.com](mailto:sales@hashicorp.com). diff --git a/website/source/docs/enterprise/organizations/index.html.md b/website/source/docs/enterprise/organizations/index.html.md index 90a12e8ee..96676664b 100755 --- a/website/source/docs/enterprise/organizations/index.html.md +++ b/website/source/docs/enterprise/organizations/index.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Organizations in Terraform Enterprise" +page_title: "Organizations - Terraform Enterprise" sidebar_current: "docs-enterprise-organizations" description: |- Organizations are a group of users in Terraform Enterprise that have access and ownership over shared resources. @@ -8,10 +8,9 @@ description: |- ## Organizations in Terraform Enterprise -Organizations are a group of users in Terraform Enterprise that have access -and ownership over shared resources. When operating within a team, -we recommend creating an organization to manage access control, -auditing, billing and authorization. +Organizations are a group of users in Terraform Enterprise that have access and +ownership over shared resources. When operating within a team, we recommend +creating an organization to manage access control, auditing, billing and +authorization. -Each individual member of your organization should have their own -account. +Each individual member of your organization should have their own account. diff --git a/website/source/docs/enterprise/organizations/migrate.html.md b/website/source/docs/enterprise/organizations/migrate.html.md index 77325dfdb..b74578dfb 100755 --- a/website/source/docs/enterprise/organizations/migrate.html.md +++ b/website/source/docs/enterprise/organizations/migrate.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Migrate Organization" +page_title: "Migrate - Organizations - Terraform Enterprise" sidebar_current: "docs-enterprise-organizations-migrate" description: |- How to migrate existing organization. @@ -10,18 +10,17 @@ description: |- To migrate an existing user account to an organization: -1. Create or retrieve the username of a new personal account. You'll -add this account as an "owner" for the new organization during the -migration process. If you already have another account, write down your -username. +1. Create or retrieve the username of a new personal account. You'll add this +account as an "owner" for the new organization during the migration process. If +you already have another account, write down your username. 2. Sign in as the account you wish to migrate and visit the migration page. -3. Put the username of the personal account you wish to make an owner -of the organization into the username text field and press "Migrate". +3. Put the username of the personal account you wish to make an owner of the +organization into the username text field and press "Migrate". -4. You should now be logged out and receive a confirmation email with -the personal account you migrated to. +4. You should now be logged out and receive a confirmation email with the +personal account you migrated to. -5. Now, sign in with your personal account. If you visit you settings page, -you should see your migrated organization available to administrate. +5. Now, sign in with your personal account. If you visit you settings page, you +should see your migrated organization available to administrate. diff --git a/website/source/docs/enterprise/organizations/trials.html.md b/website/source/docs/enterprise/organizations/trials.html.md index 65becd818..73887a907 100755 --- a/website/source/docs/enterprise/organizations/trials.html.md +++ b/website/source/docs/enterprise/organizations/trials.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Start an Terraform Enterprise Trial" +page_title: "Trial - Organizations - Terraform Enterprise" sidebar_current: "docs-enterprise-organizations-trials" description: |- Terraform Enterprise offers a 30-day trial. @@ -10,4 +10,4 @@ description: |- Terraform Enterprise offers organizations 30-day trials for [Terraform Enterprise](https://www.hashicorp.com/products/terraform/), [Consul Enterprise](https://www.hashicorp.com/consul.html), and Vagrant Enterprise. Note that trials are available for organizations, not users. -[Request a trial](https://www.hashicorp.com/products/terraform/) for your organization. \ No newline at end of file +[Request a trial](https://www.hashicorp.com/products/terraform/) for your organization. From 1e35245a493210b9e5caf4a5d2c6f5c2b99a39b4 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:00:42 -0400 Subject: [PATCH 57/72] Update packer sections --- .../packer/artifacts/creating-amis.html.md | 81 ++++++----- .../artifacts/creating-vagrant-boxes.html.md | 133 ++++++++++-------- .../enterprise/packer/artifacts/index.html.md | 20 +-- .../packer/builds/build-environment.html.md | 63 +++++---- .../packer/builds/how-builds-run.html.md | 39 ++--- .../enterprise/packer/builds/index.html.md | 32 +++-- .../packer/builds/installing-software.html.md | 2 +- .../builds/managing-packer-versions.html.md | 25 ++-- .../packer/builds/notifications.html.md | 4 +- .../packer/builds/rebuilding.html.md | 18 +-- .../packer/builds/scheduling-builds.html.md | 31 ++-- .../enterprise/packer/builds/starting.html.md | 43 +++--- .../packer/builds/troubleshooting.html.md | 64 +++++---- 13 files changed, 298 insertions(+), 257 deletions(-) diff --git a/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md b/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md index b45227982..3f8678822 100755 --- a/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md +++ b/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Creating AMI Artifacts" +page_title: "Creating AMIs - Packer Artifacts - Terraform Enterprise" sidebar_current: "docs-enterprise-packerartifacts-amis" description: |- Creating AMI artifacts with Terraform Enterprise. @@ -8,53 +8,58 @@ description: |- # Creating AMI Artifacts with Terraform Enterprise -In an immutable infrastructure workflow, it's important to version and store full images (artifacts) -to be deployed. This section covers storing [AWS AMI](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) -images in Terraform Enterprise to be queried and used later. +In an immutable infrastructure workflow, it's important to version and store +full images (artifacts) to be deployed. This section covers storing [AWS +AMI](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) images in +Terraform Enterprise to be queried and used later. -Note the actual AMI does _not get stored_. Terraform Enterprise -simply keeps the AMI ID as a reference to the target image. Tools -like Terraform can then use this in a deploy. +Note the actual AMI does _not get stored_. Terraform Enterprise simply keeps the +AMI ID as a reference to the target image. Tools like Terraform can then use +this in a deploy. ### Steps If you run Packer in Terraform Enterprise, the following will happen after a [push](/docs/enterprise/packer/builds/starting.html): -1. Terraform Enterprise will run `packer build` against your template in our infrastructure. -This spins up an AWS instance in your account and provisions it with - any specified provisioners -2. Packer stops the instance and stores the result as an AMI in AWS -under your account. This then returns an ID (the artifact) that it passes to the post-processor -3. The post-processor creates and uploads the new artifact version with the -ID in Terraform Enterprise of the type `amazon.image` for use later +1. Terraform Enterprise will run `packer build` against your template in our +infrastructure. This spins up an AWS instance in your account and provisions it +with any specified provisioners + +2. Packer stops the instance and stores the result as an AMI in AWS under your +account. This then returns an ID (the artifact) that it passes to the +post-processor + +3. The post-processor creates and uploads the new artifact version with the ID +in Terraform Enterprise of the type `amazon.image` for use later ### Example Below is a complete example Packer template that starts an AWS instance. +```json +{ + "push": { + "name": "my-username/frontend" + }, + "provisioners": [], + "builders": [ { - "push": { - "name": "%{DEFAULT_USERNAME}/frontend" - }, - "provisioners": [], - "builders": [ - { - "type": "amazon-ebs", - "access_key": "", - "secret_key": "", - "region": "us-east-1", - "source_ami": "ami-2ccc7a44", - "instance_type": "c3.large", - "ssh_username": "ubuntu", - "ami_name": "TFE Example {{ timestamp }}" - } - ], - "post-processors": [ - { - "type": "atlas", - "artifact": "%{DEFAULT_USERNAME}/web-server", - "artifact_type": "amazon.image" - } - ] + "type": "amazon-ebs", + "access_key": "", + "secret_key": "", + "region": "us-east-1", + "source_ami": "ami-2ccc7a44", + "instance_type": "c3.large", + "ssh_username": "ubuntu", + "ami_name": "TFE Example {{ timestamp }}" } - + ], + "post-processors": [ + { + "type": "atlas", + "artifact": "my-username/web-server", + "artifact_type": "amazon.image" + } + ] +} +``` diff --git a/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md b/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md index f737d5533..4e0c80aeb 100755 --- a/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md +++ b/website/source/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Creating Vagrant Artifacts" +page_title: "Creating Vagrant Boxes - Packer Artifacts - Terraform Enterprise" sidebar_current: "docs-enterprise-packerartifacts-vagrant" description: |- Creating Vagrant artifacts with Terraform Enterprise. @@ -8,37 +8,42 @@ description: |- # Creating Vagrant Boxes with Packer -We recommend using Packer to create boxes, as is it is fully repeatable and keeps a strong -history of changes within Terraform Enterprise. +We recommend using Packer to create boxes, as is it is fully repeatable and +keeps a strong history of changes within Terraform Enterprise. ## Getting Started -Using Packer requires more up front effort, but the repeatable and -automated builds will end any manual management of boxes. Additionally, -all boxes will be stored and served from Terraform Enterprise, keeping a history along -the way. +Using Packer requires more up front effort, but the repeatable and automated +builds will end any manual management of boxes. Additionally, all boxes will be +stored and served from Terraform Enterprise, keeping a history along the way. ## Post-Processors -Packer uses [post-processors](https://packer.io/docs/templates/post-processors.html) to define how to process -images and artifacts after provisioning. Both the `vagrant` and `atlas` post-processors must be used in order -to upload Vagrant Boxes to Terraform Enterprise via Packer. +Packer uses +[post-processors](https://packer.io/docs/templates/post-processors.html) to +define how to process images and artifacts after provisioning. Both the +`vagrant` and `atlas` post-processors must be used in order to upload Vagrant +Boxes to Terraform Enterprise via Packer. It's important that they are [sequenced](https://packer.io/docs/templates/post-processors.html) in the Packer template so they run in order. This is done by nesting arrays: - "post-processors": [ - [ - { - "type": "vagrant" - ... - }, - { - "type": "atlas" - ... - } - ] +```javascript +{ + "post-processors": [ + [ + { + "type": "vagrant" + // ... + }, + { + "type": "atlas" + // ... + } ] + ] +} +``` Sequencing automatically passes the resulting artifact from one post-processor to the next – in this case, the `.box` file. @@ -49,10 +54,12 @@ The [Vagrant post-processor](https://packer.io/docs/post-processors/vagrant.html from the build (an `.ovf` file, for example) into a `.box` file before passing it to the `atlas` post-processor. - { - "type": "vagrant", - "keep_input_artifact": false - } +```json +{ + "type": "vagrant", + "keep_input_artifact": false +} +``` The input artifact (i.e and `.ovf` file) does not need to be kept when building Vagrant Boxes, as the resulting `.box` will contain it. @@ -61,15 +68,17 @@ as the resulting `.box` will contain it. The [post-processor](https://packer.io/docs/post-processors/atlas.html) takes the resulting `.box` file and uploads it adding metadata about the box version. - { - "type": "atlas", - "artifact": "%{DEFAULT_USERNAME}/dev-environment", - "artifact_type": "vagrant.box", - "metadata": { - "provider": "vmware_desktop", - "version": "0.0.1" - } - } +```json +{ + "type": "atlas", + "artifact": "my-username/dev-environment", + "artifact_type": "vagrant.box", + "metadata": { + "provider": "vmware_desktop", + "version": "0.0.1" + } +} +``` #### Attributes Required @@ -98,31 +107,35 @@ An example post-processor block for Terraform Enterprise and Vagrant is below. I the build runs on both VMware and Virtualbox creating two different providers for the same box version (`0.0.1`). - "post-processors": [ - [ - { - "type": "vagrant", - "keep_input_artifact": false - }, - { - "type": "atlas", - "only": ["vmware-iso"], - "artifact": "%{DEFAULT_USERNAME}/dev-environment", - "artifact_type": "vagrant.box", - "metadata": { - "provider": "vmware_desktop", - "version": "0.0.1" - } - }, - { - "type": "atlas", - "only": ["virtualbox-iso"], - "artifact": "%{DEFAULT_USERNAME}/dev-environment", - "artifact_type": "vagrant.box", - "metadata": { - "provider": "virtualbox", - "version": "0.0.1" - } +```json +{ + "post-processors": [ + [ + { + "type": "vagrant", + "keep_input_artifact": false + }, + { + "type": "atlas", + "only": ["vmware-iso"], + "artifact": "my-username/dev-environment", + "artifact_type": "vagrant.box", + "metadata": { + "provider": "vmware_desktop", + "version": "0.0.1" } - ] + }, + { + "type": "atlas", + "only": ["virtualbox-iso"], + "artifact": "my-username/dev-environment", + "artifact_type": "vagrant.box", + "metadata": { + "provider": "virtualbox", + "version": "0.0.1" + } + } ] + ] +} +``` diff --git a/website/source/docs/enterprise/packer/artifacts/index.html.md b/website/source/docs/enterprise/packer/artifacts/index.html.md index 6de65ed6f..1913c9a21 100755 --- a/website/source/docs/enterprise/packer/artifacts/index.html.md +++ b/website/source/docs/enterprise/packer/artifacts/index.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "About Packer and Artifacts" +page_title: "Packer Artifacts - Terraform Enterprise" sidebar_current: "docs-enterprise-packerartifacts" description: |- Packer creates and uploads artifacts to Terraform Enterprise. @@ -11,12 +11,12 @@ description: |- Packer creates and uploads artifacts to Terraform Enterprise. This is done with the [post-processor](https://packer.io/docs/post-processors/atlas.html). -Artifacts can then be used to deploy services or access -via Vagrant. Artifacts are generic, but can be of varying types. -These types define different behavior within Terraform Enterprise. +Artifacts can then be used to deploy services or access via Vagrant. Artifacts +are generic, but can be of varying types. These types define different behavior +within Terraform Enterprise. -For uploading artifacts `artifact_type` can be set to any -unique identifier, however, the following are recommended for consistency. +For uploading artifacts `artifact_type` can be set to any unique identifier, +however, the following are recommended for consistency. - `amazon.image` - `azure.image` @@ -33,8 +33,8 @@ unique identifier, however, the following are recommended for consistency. - `vagrant.box` Packer can create artifacts when running in Terraform Enterprise or locally. -This is possible due to the post-processors use of the public -artifact API to store the artifacts. +This is possible due to the post-processors use of the public artifact API to +store the artifacts. -You can read more about artifacts and their use in the [Terraform section](/docs/enterprise/) -of the documentation. +You can read more about artifacts and their use in the +[Terraform section](/docs/enterprise/) of the documentation. diff --git a/website/source/docs/enterprise/packer/builds/build-environment.html.md b/website/source/docs/enterprise/packer/builds/build-environment.html.md index cf0b648e9..6072463fb 100755 --- a/website/source/docs/enterprise/packer/builds/build-environment.html.md +++ b/website/source/docs/enterprise/packer/builds/build-environment.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Packer Build Environment" +page_title: "Build Environment - Packer Builds - Terraform Enterprise" sidebar_current: "docs-enterprise-packerbuilds-environment" description: |- This page outlines the environment that Packer runs in within Terraform Enterprise. @@ -8,7 +8,8 @@ description: |- # Packer Build Environment -This page outlines the environment that Packer runs in within Terraform Enterprise. +This page outlines the environment that Packer runs in within Terraform +Enterprise. ### Supported Builders @@ -40,16 +41,20 @@ with [Packer Provisioners](https://packer.io/docs/templates/provisioners.html). An example of this with the Shell provisioner is below. - "provisioners": [ - { - "type": "shell", - "scripts": [ - "scripts/vagrant.sh", - "scripts/dependencies.sh", - "scripts/cleanup.sh" - ] - } - ] +```json +{ + "provisioners": [ + { + "type": "shell", + "scripts": [ + "scripts/vagrant.sh", + "scripts/dependencies.sh", + "scripts/cleanup.sh" + ] + } + ] +} +``` We encourage use of relative paths over absolute paths to maintain portability between Terraform Enterprise and local builds. @@ -129,9 +134,9 @@ resource was created outside of GitHub (like using `packer push` or ### Base Artifact Variable Injection -A base artifact can be selected on the "Settings" page for a build configuration. -During each build, the latest artifact version will have it's external -ID (such as an AMI for AWS) injected as an environment variable for the +A base artifact can be selected on the "Settings" page for a build +configuration. During each build, the latest artifact version will have it's +external ID (such as an AMI for AWS) injected as an environment variable for the environment. The keys for the following artifact types will be injected: @@ -144,22 +149,22 @@ The keys for the following artifact types will be injected: You can then reference this artifact in your Packer template, like this AWS example: +```json +{ + "variables": { + "base_ami": "{{env `ATLAS_BASE_ARTIFACT_AWS_AMI_ID`}}" + }, + "builders": [ { - "variables": { - "base_ami": "{{env `ATLAS_BASE_ARTIFACT_AWS_AMI_ID`}}" - }, - "builders": [ - { - "type": "amazon-ebs", - "access_key": "", - "secret_key": "", - "region": "us-east-1", - "source_ami": "{{user `base_ami`}}" - } - ] + "type": "amazon-ebs", + "access_key": "", + "secret_key": "", + "region": "us-east-1", + "source_ami": "{{user `base_ami`}}" } - -- - - + ] +} +``` ## Notes on Security diff --git a/website/source/docs/enterprise/packer/builds/how-builds-run.html.md b/website/source/docs/enterprise/packer/builds/how-builds-run.html.md index f0247e672..4d8ae817a 100755 --- a/website/source/docs/enterprise/packer/builds/how-builds-run.html.md +++ b/website/source/docs/enterprise/packer/builds/how-builds-run.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Running Packer Builds" +page_title: "Running - Packer Builds - Terraform Enterprise" sidebar_current: "docs-enterprise-packerbuilds-runbuilds" description: |- This briefly covers the internal process of running builds in Terraform Enterprise. @@ -8,25 +8,30 @@ description: |- # How Packer Builds Run in Terraform Enterprise -This briefly covers the internal process of running builds in Terraform Enterprise. It's -not necessary to know this information, but may be valuable to -help understand implications of running or debugging failing -builds. +This briefly covers the internal process of running builds in Terraform +Enterprise. It's not necessary to know this information, but may be valuable to +help understand implications of running or debugging failing builds. ### Steps of Execution -1. A Packer template and directory of files is uploaded via Packer Push or GitHub -2. Terraform Enterprise creates a version of the build configuration and waits for the upload -to complete. At this point, the version will be visible in the UI even if the upload has -not completed -3. Once the upload finishes, the build is queued. This is potentially -split across multiple machines for faster processing +1. A Packer template and directory of files is uploaded via Packer Push or +GitHub + +2. Terraform Enterprise creates a version of the build configuration and waits +for the upload to complete. At this point, the version will be visible in the UI +even if the upload has not completed + +3. Once the upload finishes, the build is queued. This is potentially split +across multiple machines for faster processing + 4. In the build environment, the package including the files and Packer template are downloaded -5. `packer build` is run against the template in the build environment -6. Logs are streamed into the UI and stored -7. Any artifacts as part of the build are then uploaded via the public -artifact API, as they would be if Packer was executed locally -8. The build completes, the environment is teared down and status -updated +5. `packer build` is run against the template in the build environment + +6. Logs are streamed into the UI and stored + +7. Any artifacts as part of the build are then uploaded via the public artifact +API, as they would be if Packer was executed locally + +8. The build completes, the environment is teared down and status updated diff --git a/website/source/docs/enterprise/packer/builds/index.html.md b/website/source/docs/enterprise/packer/builds/index.html.md index 87fc8e49d..d060d9a13 100755 --- a/website/source/docs/enterprise/packer/builds/index.html.md +++ b/website/source/docs/enterprise/packer/builds/index.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "About Builds" +page_title: "Packer Builds - Terraform Enterprise" sidebar_current: "docs-enterprise-packerbuilds" description: |- Builds are instances of `packer build` being run within Terraform Enterprise. @@ -8,24 +8,28 @@ description: |- # About Builds -Builds are instances of `packer build` being run within Terraform Enterprise. Every -build belongs to a build configuration. +Builds are instances of `packer build` being run within Terraform Enterprise. +Every build belongs to a build configuration. __Build configurations__ represent a set of Packer configuration versions and -builds run. It is used as a namespace within Terraform Enterprise, Packer commands and URLs. Packer -configuration sent to Terraform Enterprise are stored and versioned under -these build configurations. +builds run. It is used as a namespace within Terraform Enterprise, Packer +commands and URLs. Packer configuration sent to Terraform Enterprise are stored +and versioned under these build configurations. These __versions__ of Packer configuration can contain: -- The Packer template, a JSON file which define one or -more builds by configuring the various components of Packer +- The Packer template, a JSON file which define one or more builds by + configuring the various components of Packer + - Any provisioning scripts or packages used by the template -- Applications that use the build as part of the pipeline and merged into the version prior to running Packer on it -When a new version of Packer configuration and associated -scripts from GitHub or `packer push` is received, it automatically starts a new -Packer build. That Packer build runs in an isolated machine environment with the contents -of that version available to it. +- Applications that use the build as part of the pipeline and merged into the + version prior to running Packer on it -You can be alerted of build events with [Build Notifications](/docs/enterprise/packer/builds/notifications.html). +When a new version of Packer configuration and associated scripts from GitHub or +`packer push` is received, it automatically starts a new Packer build. That +Packer build runs in an isolated machine environment with the contents of that +version available to it. + +You can be alerted of build events with +[Build Notifications](/docs/enterprise/packer/builds/notifications.html). diff --git a/website/source/docs/enterprise/packer/builds/installing-software.html.md b/website/source/docs/enterprise/packer/builds/installing-software.html.md index 35c55258d..dfa91945f 100755 --- a/website/source/docs/enterprise/packer/builds/installing-software.html.md +++ b/website/source/docs/enterprise/packer/builds/installing-software.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Installing Software with Packer" +page_title: "Installing Software - Packer Builds - Terraform Enterprise" sidebar_current: "docs-enterprise-packerbuilds-installing" description: |- Installing software with Packer. diff --git a/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md b/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md index 9f0c11e8a..b33914df5 100755 --- a/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md +++ b/website/source/docs/enterprise/packer/builds/managing-packer-versions.html.md @@ -1,27 +1,28 @@ --- layout: "enterprise" -page_title: "Managing Packer Versions" +page_title: "Managing Packer Versions - Packer Builds - Terraform Enterprise" sidebar_current: "docs-enterprise-packerbuilds-versions" description: |- - Terraform Enterprise does not automatically upgrade the version of Packer used to run builds or compiles. + Terraform Enterprise does not automatically upgrade the version of Packer used to run builds or compiles. --- # Managing Packer Versions -Terraform Enterprise does not automatically upgrade the version of Packer -used to run builds or compiles. This is intentional, as occasionally -there can be backwards incompatible changes made to Packer that cause templates to stop +Terraform Enterprise does not automatically upgrade the version of Packer used +to run builds or compiles. This is intentional, as occasionally there can be +backwards incompatible changes made to Packer that cause templates to stop building properly, or new versions that produce some other unexpected behavior. -All upgrades must be performed by a user, but Terraform Enterprise will display a notice -above any builds run with out of date versions. We encourage the use -of the latest version when possible. +All upgrades must be performed by a user, but Terraform Enterprise will display +a notice above any builds run with out of date versions. We encourage the use of +the latest version when possible. ### Upgrading Packer 1. Go the Settings tab of a build configuration or application -2. Go to the "Packer Version" section and select the version you -wish to use + +2. Go to the "Packer Version" section and select the version you wish to use + 3. Review the changelog for that version and previous versions -4. Click the save button. At this point, future builds will use that -version + +4. Click the save button. At this point, future builds will use that version diff --git a/website/source/docs/enterprise/packer/builds/notifications.html.md b/website/source/docs/enterprise/packer/builds/notifications.html.md index 811f2fdb2..ec7b607f3 100755 --- a/website/source/docs/enterprise/packer/builds/notifications.html.md +++ b/website/source/docs/enterprise/packer/builds/notifications.html.md @@ -1,9 +1,9 @@ --- layout: "enterprise" -page_title: "About Packer Build Notifications" +page_title: "Build Notifications - Packer Builds - Terraform Enterprise" sidebar_current: "docs-enterprise-packerbuilds-notifications" description: |- - Terraform Enterprise can send build notifications to your organization. + Terraform Enterprise can send build notifications to your organization. --- # About Packer Build Notifications diff --git a/website/source/docs/enterprise/packer/builds/rebuilding.html.md b/website/source/docs/enterprise/packer/builds/rebuilding.html.md index ecedaa199..31aa13ebd 100755 --- a/website/source/docs/enterprise/packer/builds/rebuilding.html.md +++ b/website/source/docs/enterprise/packer/builds/rebuilding.html.md @@ -1,20 +1,20 @@ --- layout: "enterprise" -page_title: "Rebuilding Builds" +page_title: "Rebuilding - Packer Builds - Terraform Enterprise" sidebar_current: "docs-enterprise-packerbuilds-rebuilding" description: |- - Sometimes builds fail due to temporary or remotely controlled conditions. + Sometimes builds fail due to temporary or remotely controlled conditions. --- # Rebuilding Builds Sometimes builds fail due to temporary or remotely controlled conditions. -In this case, it may make sense to "rebuild" a Packer build. To do so, -visit the build you wish to run again and click the Rebuild button. This -will take that exact version of configuration and run it again. +In this case, it may make sense to "rebuild" a Packer build. To do so, visit the +build you wish to run again and click the Rebuild button. This will take that +exact version of configuration and run it again. -You can rebuild at any point in history, but this may cause side effects -that are not wanted. For example, if you were to rebuild an old version -of a build, it may create the next version of an artifact that is then released, -causing a rollback of your configuration to occur. +You can rebuild at any point in history, but this may cause side effects that +are not wanted. For example, if you were to rebuild an old version of a build, +it may create the next version of an artifact that is then released, causing a +rollback of your configuration to occur. diff --git a/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md b/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md index c3f9a2bb5..d610312ae 100755 --- a/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md +++ b/website/source/docs/enterprise/packer/builds/scheduling-builds.html.md @@ -1,9 +1,9 @@ --- layout: "enterprise" -page_title: "Schedule Periodic Builds" +page_title: "Schedule Periodic Builds - Packer Builds - Terraform Enterprise" sidebar_current: "docs-enterprise-packerbuilds-scheduling" description: |- - Terraform Enterprise can automatically run a Packer build and create artifacts on a specified schedule. + Terraform Enterprise can automatically run a Packer build and create artifacts on a specified schedule. --- # Schedule Periodic Builds in Terraform Enterprise @@ -12,22 +12,23 @@ Terraform Enterprise can automatically run a Packer build and create artifacts on a specified schedule. This option is disabled by default and can be enabled by an organization owner on a per-[environment](/docs/enterprise/glossary#environment) basis. -On the specified interval, builds will be automatically queued that -run Packer for you, creating any artifacts and sending the appropriate -notifications. +On the specified interval, builds will be automatically queued that run Packer +for you, creating any artifacts and sending the appropriate notifications. -If your artifacts are used in any other environments and you have activated -the plan on artifact upload feature, this may also queue Terraform -plans. +If your artifacts are used in any other environments and you have activated the +plan on artifact upload feature, this may also queue Terraform plans. -This feature is useful for maintenance of images and automatic updates, -or to build nightly style images for staging or development environments. +This feature is useful for maintenance of images and automatic updates, or to +build nightly style images for staging or development environments. ## Enabling Periodic Builds -To enable periodic builds for a build, visit the build settings page and select the desired interval and click the save button to persist the changes. An initial build may immediately run, depending -on the history, and then will automatically build at the specified interval. +To enable periodic builds for a build, visit the build settings page and select +the desired interval and click the save button to persist the changes. An +initial build may immediately run, depending on the history, and then will +automatically build at the specified interval. -If you have run a build separately, either manually or triggered from GitHub -or Packer configuration version uploads, Terraform Enterprise will not queue a new -build until the alloted time after the manual build ran. This ensures that a build has been executed at the specified schedule. +If you have run a build separately, either manually or triggered from GitHub or +Packer configuration version uploads, Terraform Enterprise will not queue a new +build until the allowed time after the manual build ran. This ensures that a +build has been executed at the specified schedule. diff --git a/website/source/docs/enterprise/packer/builds/starting.html.md b/website/source/docs/enterprise/packer/builds/starting.html.md index 5f99c422b..1e31c881d 100755 --- a/website/source/docs/enterprise/packer/builds/starting.html.md +++ b/website/source/docs/enterprise/packer/builds/starting.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Starting Packer Builds in Terraform Enterprise" +page_title: "Starting - Packer Builds - Terraform Enterprise" sidebar_current: "docs-enterprise-packerbuilds-starting" description: |- Packer builds can be started in Terraform Enterprise in two ways. This post is about how. @@ -8,33 +8,36 @@ description: |- # Starting Packer Builds in Terraform Enterprise -Packer builds can be started in in two ways: `packer push` -to upload the template and directory or via a GitHub connection that retrieves -the contents of a repository after changes to the default branch (usually -master). +Packer builds can be started in in two ways: `packer push` to upload the +template and directory or via a GitHub connection that retrieves the contents of +a repository after changes to the default branch (usually master). ### Packer Push -Packer `push` is a [Packer command](https://packer.io/docs/command-line/push.html) -that packages and uploads a Packer template and directory. This then creates a build which performs `packer build` against the uploaded template -and packaged directory. +Packer `push` is a +[Packer command](https://packer.io/docs/command-line/push.html) that packages +and uploads a Packer template and directory. This then creates a build which +performs `packer build` against the uploaded template and packaged directory. -The directory is included in order to run any associated provisioners, -builds or post-processors that all might use local files. For example, -a shell script or set of Puppet modules used in a Packer build needs -to be part of the upload for Packer to be run remotely. +The directory is included in order to run any associated provisioners, builds or +post-processors that all might use local files. For example, a shell script or +set of Puppet modules used in a Packer build needs to be part of the upload for +Packer to be run remotely. By default, everything in your directory is uploaded as part of the push. -However, it's not always the case that the entire directory should be uploaded. Often, -temporary or cache directories and files like `.git`, `.tmp` will be included by default. This -can cause builds to fail at certain sizes and should be avoided. You can -specify [exclusions](https://packer.io/docs/templates/push.html#exclude) to avoid this situation. +However, it's not always the case that the entire directory should be uploaded. +Often, temporary or cache directories and files like `.git`, `.tmp` will be +included by default. This can cause builds to fail at certain sizes and should +be avoided. You can specify +[exclusions](https://packer.io/docs/templates/push.html#exclude) to avoid this +situation. -Packer also allows for a [VCS option](https://packer.io/docs/templates/push.html#vcs) -that will detect your VCS (if there is one) and only upload the files that are tracked by the VCS. -This is useful for automatically excluding ignored files. In a VCS -like git, this basically does a `git ls-files`. +Packer also allows for a +[VCS option](https://packer.io/docs/templates/push.html#vcs) that will detect +your VCS (if there is one) and only upload the files that are tracked by the +VCS. This is useful for automatically excluding ignored files. In a VCS like +git, this basically does a `git ls-files`. ### GitHub Webhooks diff --git a/website/source/docs/enterprise/packer/builds/troubleshooting.html.md b/website/source/docs/enterprise/packer/builds/troubleshooting.html.md index 240271c5f..886c79cb9 100755 --- a/website/source/docs/enterprise/packer/builds/troubleshooting.html.md +++ b/website/source/docs/enterprise/packer/builds/troubleshooting.html.md @@ -1,15 +1,15 @@ --- layout: "enterprise" -page_title: "Troubleshooting Failing Builds" +page_title: "Troubleshooting - Packer Builds - Terraform Enterprise" sidebar_current: "docs-enterprise-packerbuilds-troubleshooting" description: |- - Packer builds can fail in Terraform Enterprise for a number of reasons – improper configuration, transient networking errors, and hardware constraints are all possible. + Packer builds can fail in Terraform Enterprise for a number of reasons – improper configuration, transient networking errors, and hardware constraints are all possible. --- # Troubleshooting Failing Builds -Packer builds can fail in Terraform Enterprise for a number of reasons – improper -configuration, transient networking errors, and hardware constraints +Packer builds can fail in Terraform Enterprise for a number of reasons – +improper configuration, transient networking errors, and hardware constraints are all possible. Below is a list of debugging options you can use. ### Verbose Packer Logging @@ -20,24 +20,27 @@ in Packer. Set the `PACKER_LOG` key to a value of `1` to accomplish this. After setting the variable, you'll need to [rebuild](/docs/enterprise/packer/builds/rebuilding.html). Verbose logging will be much louder than normal Packer logs and isn't -recommended for day-to-day operations. Once enabled, you'll be able to -see in further detail why things failed or what operations Packer was performing. +recommended for day-to-day operations. Once enabled, you'll be able to see in +further detail why things failed or what operations Packer was performing. This can also be used locally: - PACKER_LOG=1 packer build ... +```text +$ PACKER_LOG=1 packer build ... +``` ### Hanging Builds -Some VM builds, such as VMware or Virtualbox, may hang at various stages, +Some VM builds, such as VMware or VirtualBox, may hang at various stages, most notably `Waiting for SSH...`. Things to pay attention to when this happens: -- SSH credentials must be properly configured. AWS keypairs should -match, SSH usernames should be correct, passwords should match, etc. -- Any VM pre-seed configuration should have the same SSH configuration -as your template defines +- SSH credentials must be properly configured. AWS keypairs should match, SSH + usernames should be correct, passwords should match, etc. + +- Any VM pre-seed configuration should have the same SSH configuration as your + template defines A good way to debug this is to manually attempt to use the same SSH configuration locally, running with `packer build -debug`. See @@ -49,11 +52,11 @@ Your build may be failing by requesting larger memory or disk usage then is available. Read more about the [build environment](/docs/enterprise/packer/builds/build-environment.html#hardware-limitations). _Typically_ Packer builds that fail due to requesting hardware limits -that exceed Terraform Enterprise's [hardware limitations](/docs/enterprise/packer/builds/build-environment.html#hardware-limitations) +that exceed Terraform Enterprise's [hardware limitations](/docs/enterprise/packer/builds/build-environment.html#hardware-limitations) will fail with a _The operation was canceled_ error message as shown below: -``` -... +```text +# ... ==> vmware-iso: Starting virtual machine... vmware-iso: The VM will be run headless, without a GUI. If you want to vmware-iso: view the screen of the VM, connect via VNC without a password to @@ -72,13 +75,13 @@ Build 'vmware-iso' errored: Error starting VM: VMware error: Error: The operatio Sometimes it's faster to debug failing builds locally. In this case, you'll want to [install Packer](https://www.packer.io/intro/getting-started/setup.html) and any providers (like Virtualbox) necessary. -Because Terraform Enterprise runs the open source version of Packer, there should be -no difference in execution between the two, other than the environment that -Packer is running in. For more on hardware constraints in the Terraform Enterprise environment -read below. +Because Terraform Enterprise runs the open source version of Packer, there +should be no difference in execution between the two, other than the environment +that Packer is running in. For more on hardware constraints in the Terraform +Enterprise environment read below. -Once your builds are running smoothly locally you can push it up to Terraform Enterprise -for versioning and automated builds. +Once your builds are running smoothly locally you can push it up to Terraform +Enterprise for versioning and automated builds. ### Internal Errors @@ -89,12 +92,13 @@ to properly unpack. This can be caused by bad permissions, using symlinks or very large repository sizes. Using symlinks inside of the packer directory, or the root of the repository, if the packer directory is unspecified, will result in this internal error. -_**Note:** Most often this error occurs -when applications or builds are linked to a GitHub repository and the -directory and/or template paths are incorrect. Double check that the paths -specified when you linked the GitHub repository match the actual paths -to your template file._ -- SEC-001: Your data was being unpacked from a tarball uploaded + + _**Note:** Most often this error occurs when applications or builds are + linked to a GitHub repository and the directory and/or template paths are + incorrect. Double check that the paths specified when you linked the GitHub + repository match the actual paths to your template file._ + +- SEC-001: Your data was being unpacked from a tarball uploaded and encountered an error. This can be caused by bad permissions, using symlinks or very large tarball sizes. @@ -111,6 +115,6 @@ the mailing list or IRC. All bug reports should go to GitHub. ### Getting Support -If you believe your build is failing as a result of a bug in Terraform Enterprise, -or would like other support, please [email us](mailto:support@hashicorp.com). - +If you believe your build is failing as a result of a bug in Terraform +Enterprise, or would like other support, please +[email us](mailto:support@hashicorp.com). From 7924c6f2d356da890d3f1b4fb05a167e9ff17c35 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:00:51 -0400 Subject: [PATCH 58/72] Update runs --- .../enterprise/runs/automatic-applies.html.md | 25 ++-- .../enterprise/runs/how-runs-execute.html.md | 25 ++-- .../source/docs/enterprise/runs/index.html.md | 22 ++-- .../runs/installing-software.html.md | 20 +-- .../runs/managing-terraform-versions.html.md | 20 +-- .../runs/multifactor-authentication.html.md | 115 ++++++++++++------ .../enterprise/runs/notifications.html.md | 13 +- .../enterprise/runs/scheduling-runs.html.md | 40 +++--- .../docs/enterprise/runs/starting.html.md | 12 +- .../runs/variables-and-configuration.html.md | 69 +++++++---- 10 files changed, 208 insertions(+), 153 deletions(-) diff --git a/website/source/docs/enterprise/runs/automatic-applies.html.md b/website/source/docs/enterprise/runs/automatic-applies.html.md index 3f529cc1f..93f68cde4 100755 --- a/website/source/docs/enterprise/runs/automatic-applies.html.md +++ b/website/source/docs/enterprise/runs/automatic-applies.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Runs: Automatic Applies" +page_title: "Automatic Applies - Runs - Terraform Enterprise" sidebar_current: "docs-enterprise-runs-applies" description: |- How to automatically apply plans. @@ -8,26 +8,21 @@ description: |- # Automatic Terraform Applies -
-
- This is an unreleased beta feature. Please contact support if you are interested in helping us test this feature. -
-
+-> This is an unreleased beta feature. Please +contact support if you are interested +in helping us test this feature. You can automatically apply successful Terraform plans to your infrastructure. This option is disabled by default and can be enabled by an organization owner on a per-environment basis. -
-
- This is an advanced feature that enables changes to active infrastructure - without user confirmation. Please understand the implications to your - infrastructure before enabling. -
-
+-> This is an advanced feature that enables changes to active infrastructure +without user confirmation. Please understand the implications to your +infrastructure before enabling. ## Enabling Auto-Apply -To enable auto-apply for an environment, visit the environment settings page check the box labeled "auto apply" and click the save button to -persist the changes. The next successful Terraform plan for the environment will +To enable auto-apply for an environment, visit the environment settings page +check the box labeled "auto apply" and click the save button to persist the +changes. The next successful Terraform plan for the environment will automatically apply without user confirmation. diff --git a/website/source/docs/enterprise/runs/how-runs-execute.html.md b/website/source/docs/enterprise/runs/how-runs-execute.html.md index b494d80bc..aef54defb 100755 --- a/website/source/docs/enterprise/runs/how-runs-execute.html.md +++ b/website/source/docs/enterprise/runs/how-runs-execute.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Runs: How Runs Execute" +page_title: "Execution - Runs - Terraform Enterprise" sidebar_current: "docs-enterprise-runs-execute" description: |- How runs execute in Terraform Enterprise. @@ -8,10 +8,9 @@ description: |- # How Terraform Runs Execute -This briefly covers the internal process of running Terraform plan and -applies. It is not necessary to know this information, but may be -valuable to help understand implications of running or debugging failed -runs. +This briefly covers the internal process of running Terraform plan and applies. +It is not necessary to know this information, but may be valuable to help +understand implications of running or debugging failed runs. ## Steps of Execution @@ -41,18 +40,18 @@ because Terraform saves partial state and can "pick up where it left off". ### Customizing Terraform Execution As described in the steps above, Terraform will be run against your configuration -when changes are pushed via GitHub, `terraform push`, or manually queued in the +when changes are pushed via GitHub, `terraform push`, or manually queued in the UI. There are a few options available to customize the execution of Terraform. These are: -- The directory that contains your environment's Terraform configuration can be customized +- The directory that contains your environment's Terraform configuration can be customized to support directory structures with more than one set of Terraform configuration files. -To customize the directory for your Environment, set the _Terraform Directory_ -property in the [_GitHub Integration_](/docs/enterprise/vcs/github.html) settings for your environment. This is equivalent to +To customize the directory for your Environment, set the _Terraform Directory_ +property in the [_GitHub Integration_](/docs/enterprise/vcs/github.html) settings for your environment. This is equivalent to passing the `[dir]` argument when running Terraform in your local shell. -- The directory in which Terraform is executed from can be customized to support directory -structures with nested sub-directories or configurations that use Terraform modules with -relative paths. To customize the directory used for Terraform execution in your Environment, set the `TF_ATLAS_DIR` +- The directory in which Terraform is executed from can be customized to support directory +structures with nested sub-directories or configurations that use Terraform modules with +relative paths. To customize the directory used for Terraform execution in your Environment, set the `TF_ATLAS_DIR` [environment variable](/docs/enterprise/runs/variables-and-configuration.html#environment-variables) -to the relative path of the directory - ie. `terraform/production`. This is equivalent to +to the relative path of the directory - ie. `terraform/production`. This is equivalent to changing directories to the appropriate path in your local shell and then executing Terraform. diff --git a/website/source/docs/enterprise/runs/index.html.md b/website/source/docs/enterprise/runs/index.html.md index 09b9873da..92062b98c 100755 --- a/website/source/docs/enterprise/runs/index.html.md +++ b/website/source/docs/enterprise/runs/index.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "About Terraform Enterprise Runs" +page_title: "Runs - Terraform Enterprise" sidebar_current: "docs-enterprise-runs" description: |- A "run" in Atlas represents the logical grouping of two Terraform steps - a "plan" and an "apply". @@ -8,13 +8,13 @@ description: |- # About Terraform Enterprise Runs -A "run" represents the logical grouping of two Terraform steps - a -"plan" and an "apply". The distinction between these two phases of a Terraform -run are documented below. +A "run" represents the logical grouping of two Terraform steps - a "plan" and an +"apply". The distinction between these two phases of a Terraform run are +documented below. -When a [new run is created](/docs/enterprise/runs/starting.html), Terraform Enterprise automatically -queues a Terraform plan. Because a plan does not change the state of -infrastructure, it is safe to execute a plan multiple times without +When a [new run is created](/docs/enterprise/runs/starting.html), Terraform +Enterprise automatically queues a Terraform plan. Because a plan does not change +the state of infrastructure, it is safe to execute a plan multiple times without consequence. An apply executes the output of a plan and actively changes infrastructure. To prevent race conditions, the platform will only execute one plan/apply at a time (plans for validating GitHub Pull Requests are allowed to @@ -26,8 +26,8 @@ Terraform plans and applies below. During the plan phase of a run, the command `terraform plan` is executed. Terraform performs a refresh and then determines what actions are necessary to reach the desired state specified in the Terraform configuration files. A -successful plan outputs an executable file that is securely stored in Terrafrom Enterprise -and may be used in the subsequent apply. +successful plan outputs an executable file that is securely stored in Terraform +Enterprise and may be used in the subsequent apply. Terraform plans do not change the state of infrastructure, so it is safe to execute a plan multiple times. In fact, there are a number of components @@ -42,11 +42,11 @@ infrastructure** by applying the changes required to reach the desired state specified in the Terraform configuration file. While Terraform plans are safe to run multiple times, Terraform applies often -change active infrastructure. Because of this, the default behavior +change active infrastructure. Because of this, the default behavior is to require user confirmation as part of the [Terraform run execution](/docs/enterprise/runs/how-runs-execute.html). Upon user confirmation, the Terraform apply will be queued and executed. It is also -possible to configure +possible to configure [automatic applies](/docs/enterprise/runs/automatic-applies.html), but this option is disabled by default. diff --git a/website/source/docs/enterprise/runs/installing-software.html.md b/website/source/docs/enterprise/runs/installing-software.html.md index 89033d508..19ed6d48a 100755 --- a/website/source/docs/enterprise/runs/installing-software.html.md +++ b/website/source/docs/enterprise/runs/installing-software.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Runs: Installing Software" +page_title: "Installing Software - Runs - Terraform Enterprise" sidebar_current: "docs-enterprise-runs-installing" description: |- Installing custom software on the Terraform Runners. @@ -17,14 +17,16 @@ The easiest way to install software on the Packer builder is via the `local-exec` provisioner. This will execute commands on the host machine running Terraform. - resource "null_resource" "local-software" { - provisioner "local-exec" { - command = < -
- This is an advanced feature that enables changes to active infrastructure - without user confirmation. Please understand the implications to your - infrastructure before enabling. -
-
+!> This is an advanced feature that enables changes to active infrastructure +without user confirmation. Please understand the implications to your +infrastructure before enabling. ## Setting Up AWS Multi-Factor Authentication -Before you are able to set up multi-factor authentication in Terraform Enterprise, you must set up an IAM user in AWS. More details about creating an IAM user can be found [here](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html). Setting up an AWS IAM user will provide you with the serial number and access keys that you will need in order to connect to AWS Secure Token Service. +Before you are able to set up multi-factor authentication in Terraform +Enterprise, you must set up an IAM user in AWS. More details about creating an +IAM user can be found +[here](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html). +Setting up an AWS IAM user will provide you with the serial number and access +keys that you will need in order to connect to AWS Secure Token Service. -In order to set up multi-factor authentication for your organization, you must have the following environment variables in your configuration: 'AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_MFA_SERIAL_NUMBER". You can set these variables at `/settings/organization_variables.` +In order to set up multi-factor authentication for your organization, you must +have the following environment variables in your configuration: +'AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_MFA_SERIAL_NUMBER". You can +set these variables at `/settings/organization_variables.` ## Enabling AWS Multi-Factor Authentication -To enable multi-factor authentication, visit the environment settings page: `terraform//environments//settings`. Use the drop down labeled "AWS Multi-Factor Authentication -". There are currently three levels available: "never", "applies only", and "plans and applies". Once you have selected your desired level, save your settings. All subsequent runs on the environment will now require the selected level of authentication. +To enable multi-factor authentication, visit the environment settings page: + +```text +/terraform/:organization/environments/:environment/settings +``` + +Use the drop down labeled "AWS Multi-Factor Authentication ". There are +currently three levels available: "never", "applies only", and "plans and +applies". Once you have selected your desired level, save your settings. All +subsequent runs on the environment will now require the selected level of +authentication. ## Using AWS Multi-Factor Authentication -Once you have elected to use AWS MFA for your Terraform Runs, you will then be prompted to enter a token code each time you plan or apply the run depending on your settings. Your one time use token code will be sent to you via the method you selected when setting up your [IAM account](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html). +Once you have elected to use AWS MFA for your Terraform Runs, you will then be +prompted to enter a token code each time you plan or apply the run depending on +your settings. Your one time use token code will be sent to you via the method +you selected when setting up your +[IAM account](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html). -If you have selected "applies only", you will be able to queue and run a plan without entering your token code. Once the run finishes, you will need to enter your token code and click "Authenticate" before the applying the plan. Once you submit your token code, the apply will start, and you will see "Authenticated with MFA by `user`" in the UI. If for any case there is an error when submitting your token code, the lock icon in the UI will turn red, and an error will appear alerting you to the failure. +If you have selected "applies only", you will be able to queue and run a plan +without entering your token code. Once the run finishes, you will need to enter +your token code and click "Authenticate" before the applying the plan. Once you +submit your token code, the apply will start, and you will see "Authenticated +with MFA by `user`" in the UI. If for any case there is an error when submitting +your token code, the lock icon in the UI will turn red, and an error will appear +alerting you to the failure. -If you have selected "plans and applies", you will be prompted to enter your token before queueing your plan. Once you enter the token and click "Authenticate", you will see "Authenticated with MFA by `user`" appear in the UI logs. The plan will queue and you may run the plan once it is queued. Then, before applying, you will be asked to authenticate with MFA again. Enter your token, click Authenticate, and note that "Authenticated with MFA by `user`" appears in the UI log after the apply begins. If for any case there is an error authenticating, the lock icon in the UI will turn red, and an error will appear alerting you to the failure. +If you have selected "plans and applies", you will be prompted to enter your +token before queueing your plan. Once you enter the token and click +"Authenticate", you will see "Authenticated with MFA by `user`" appear in the UI +logs. The plan will queue and you may run the plan once it is queued. Then, +before applying, you will be asked to authenticate with MFA again. Enter your +token, click Authenticate, and note that "Authenticated with MFA by `user`" +appears in the UI log after the apply begins. If for any case there is an error +authenticating, the lock icon in the UI will turn red, and an error will appear +alerting you to the failure. ## Using AWS Multi-Factor Authentication with AWS STS AssumeRole -The AWS Secure Token Service can be used to return a set of temporary security credentials that a user can use to access resources that they might not normally have access to (known as AssumeRole). The AssumeRole workflow is compatible with AWS multi-factor authentication in Terraform Enterprise. +The AWS Secure Token Service can be used to return a set of temporary security +credentials that a user can use to access resources that they might not normally +have access to (known as AssumeRole). The AssumeRole workflow is compatible with +AWS multi-factor authentication in Terraform Enterprise. -To use AssumeRole, you first need to create an IAM role and edit the trust relationship policy document to contain the following: +To use AssumeRole, you first need to create an IAM role and edit the trust +relationship policy document to contain the following: +```json { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Principal": { - "AWS": "arn:aws:iam::[INT]:user/[USER]" - }, - "Action": "sts:AssumeRole", - "Condition": { - "Bool": { - "aws:MultiFactorAuthPresent": "true" - } - } + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::[INT]:user/[USER]" + }, + "Action": "sts:AssumeRole", + "Condition": { + "Bool": { + "aws:MultiFactorAuthPresent": "true" } - ] + } } + ] +} +``` You can then configure the Terraform AWS provider to assume a given role by specifying the role ARN within the nested assume_role block: - provider "aws" { - ... - assume_role { - role_arn = "arn:aws:iam::[INT]:role/[ROLE]" - } - } +```hcl +provider "aws" { + # ... + assume_role { + role_arn = "arn:aws:iam::[INT]:role/[ROLE]" + } +} +``` diff --git a/website/source/docs/enterprise/runs/notifications.html.md b/website/source/docs/enterprise/runs/notifications.html.md index 5b8cb1608..6a5e094bf 100755 --- a/website/source/docs/enterprise/runs/notifications.html.md +++ b/website/source/docs/enterprise/runs/notifications.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Runs: Notifications" +page_title: "Notifications - Runs - Terraform Enterprise" sidebar_current: "docs-enterprise-runs-notifications" description: |- Terraform Enterprise can send notifications to your organization. This post is on how. @@ -9,16 +9,21 @@ description: |- # Terraform Run Notifications -Terraform Enterprise can send run notifications, the following events are configurable: +Terraform Enterprise can send run notifications, the following events are +configurable: - **Needs Confirmation** - The plan phase has succeeded, and there are changes that need to be confirmed before applying. -- **Confirmed** - A plan has been confirmed, and it will begin applying - shortly. + +- **Confirmed** - A plan has been confirmed, and it will begin applying shortly. + - **Discarded** - A user has discarded the plan. + - **Applying** - The plan has begun to apply and make changes to your infrastructure. + - **Applied** - The plan was applied successfully. + - **Errored** - An error has occurred during the plan or apply phase. > Emails will include logs for the **Needs Confirmation**, **Applied**, and diff --git a/website/source/docs/enterprise/runs/scheduling-runs.html.md b/website/source/docs/enterprise/runs/scheduling-runs.html.md index 978dae19a..928801232 100755 --- a/website/source/docs/enterprise/runs/scheduling-runs.html.md +++ b/website/source/docs/enterprise/runs/scheduling-runs.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Runs: Scheduling Runs" +page_title: "Scheduling - Runs - Terraform Enterprise" sidebar_current: "docs-enterprise-runs-schedule" description: |- Schedule periodic plan runs in Terraform. @@ -9,34 +9,32 @@ description: |- # Schedule Periodic Plan Runs -
-
- This is an unreleased beta feature. Please contact support if you are interested in helping us test this feature. -
-
+-> This is an unreleased beta feature. Please +contact support if you are interested +in helping us test this feature. -Terraform can automatically run a plan against -your infrastructure on a specified schedule. This option is disabled by default and can be enabled by an +Terraform can automatically run a plan against your infrastructure on a +specified schedule. This option is disabled by default and can be enabled by an organization owner on a per-environment basis. -On the specified interval, a plan can be run that -for you, determining any changes and sending the appropriate -notifications. +On the specified interval, a plan can be run that for you, determining any +changes and sending the appropriate notifications. When used with [automatic applies](/docs/enterprise/runs/automatic-applies.html), this feature can help converge changes to infrastructure without human input. -Runs will not be queued while another plan or apply is in progress, or if -the environment has been manually locked. See [Environment -Locking](/docs/enterprise/runs#environment-locking) for more information. +Runs will not be queued while another plan or apply is in progress, or if the +environment has been manually locked. Se +[Environment Locking](/docs/enterprise/runs#environment-locking) for more + information. ## Enabling Periodic Plans -To enable periodic plans for an environment, visit the environment settings page and select the desired interval and click the save button to -persist the changes. An initial plan may immediately run, depending -on the state of your environment, and then will automatically -plan at the specified interval. +To enable periodic plans for an environment, visit the environment settings page +and select the desired interval and click the save button to persist the +changes. An initial plan may immediately run, depending on the state of your +environment, and then will automatically plan at the specified interval. -If you have manually run a plan separately, a new -plan will not be queued until the allotted time after the manual plan ran. This means that -the platform simply ensures that a plan has been executed at the specified schedule. +If you have manually run a plan separately, a new plan will not be queued until +the allotted time after the manual plan ran. This means that the platform simply +ensures that a plan has been executed at the specified schedule. diff --git a/website/source/docs/enterprise/runs/starting.html.md b/website/source/docs/enterprise/runs/starting.html.md index a9eaf3e29..21e08aaf9 100755 --- a/website/source/docs/enterprise/runs/starting.html.md +++ b/website/source/docs/enterprise/runs/starting.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Runs: Starting" +page_title: "Starting - Runs - Terraform Enterprise" sidebar_current: "docs-enterprise-runs-starting" description: |- How to start runs in Terraform Enterprise. @@ -91,10 +91,12 @@ were referenced. When new versions of those referenced artifacts are uploaded, y For example, consider the following Terraform configuration which references an artifact named "worker": - resource "aws_instance" "worker" { - ami = "${atlas_artifact.worker.metadata_full.region-us-east-1}" - instance_type = "m1.small" - } +```hcl +resource "aws_instance" "worker" { + ami = "${atlas_artifact.worker.metadata_full.region-us-east-1}" + instance_type = "m1.small" +} +``` When a new version of the and artifact "worker" is uploaded either manually or as the output of a [Packer build](/docs/enterprise/packer/builds/starting.html), a Terraform plan can be automatically triggered with this new artifact version. diff --git a/website/source/docs/enterprise/runs/variables-and-configuration.html.md b/website/source/docs/enterprise/runs/variables-and-configuration.html.md index 001aba2d6..1ebeb7a92 100755 --- a/website/source/docs/enterprise/runs/variables-and-configuration.html.md +++ b/website/source/docs/enterprise/runs/variables-and-configuration.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Runs: Variables and Configuration" +page_title: "Variables and Configuration - Runs - Terraform Enterprise" sidebar_current: "docs-enterprise-runs-variables" description: |- How to configure runs and their variables. @@ -8,14 +8,14 @@ description: |- # Terraform Variables and Configuration -There are two ways to configure Terraform runs – with -Terraform variables or environment variables. +There are two ways to configure Terraform runs – with Terraform variables or +environment variables. ## Terraform Variables -Terraform variables are first-class configuration in Terraform. They -define the parameterization of Terraform configurations and are important -for sharing and removal of sensitive secrets from version control. +Terraform variables are first-class configuration in Terraform. They define the +parameterization of Terraform configurations and are important for sharing and +removal of sensitive secrets from version control. Variables are sent with the `terraform push` command. Any variables in your local `.tfvars` files are securely uploaded. Once variables are uploaded, Terraform will prefer the stored variables over any changes you @@ -23,9 +23,8 @@ make locally. Please refer to the [Terraform push documentation](https://www.terraform.io/docs/commands/push.html) for more information. -You can also add, edit, and delete variables. To update -Terraform variables, visit the "variables" page on your -environment. +You can also add, edit, and delete variables. To update Terraform variables, +visit the "variables" page on your environment. The maximum size for the value of Terraform variables is `256kb`. @@ -46,21 +45,28 @@ Terraform Enterprise. All injected environment variables will be prefixed with ` - `ATLAS_TOKEN` - This is a unique, per-run token that expires at the end of run execution (e.g. `"abcd.atlasv1.ghjkl..."`). + - `ATLAS_RUN_ID` - This is a unique identifier for this run (e.g. `"33"`). + - `ATLAS_CONFIGURATION_NAME` - This is the name of the configuration used in this run. Unless you have configured it differently, this will also be the name of the environment (e.g `"production"`). + - `ATLAS_CONFIGURATION_SLUG` - This is the full slug of the configuration used in this run. Unless you have configured it differently, this will also be the name of the environment (e.g. `"company/production"`). + - `ATLAS_CONFIGURATION_VERSION` - This is the unique, auto-incrementing version for the Terraform configuration (e.g. `"34"`). + - `ATLAS_CONFIGURATION_VERSION_GITHUB_BRANCH` - This is the name of the branch that the associated Terraform configuration version was ingressed from (e.g. `master`). + - `ATLAS_CONFIGURATION_VERSION_GITHUB_COMMIT_SHA` - This is the full commit hash of the commit that the associated Terraform configuration version was ingressed from (e.g. `"abcd1234..."`). + - `ATLAS_CONFIGURATION_VERSION_GITHUB_TAG` - This is the name of the tag that the associated Terraform configuration version was ingressed from (e.g. `"v0.1.0"`). @@ -73,25 +79,30 @@ resource was created outside of GitHub (like using `terraform push`). Terraform Enterprise has the ability to store multi-line files as variables. The recommended way to manage your secret/sensitive multi-line files (private key, SSL cert, SSL private key, CA, etc.) is to add them as [Terraform Variables](#terraform-variables) or [Environment Variables](#environment-variables). -Just like secret strings, it is recommended that you never check in these multi-line secret files to version control by following the below steps. +Just like secret strings, it is recommended that you never check in these +multi-line secret files to version control by following the below steps. -Set the [variables](https://www.terraform.io/docs/configuration/variables.html) in your Terraform template that resources utilizing the secret file will reference: +Set the [variables](https://www.terraform.io/docs/configuration/variables.html) +in your Terraform template that resources utilizing the secret file will +reference: - variable "private_key" {} +```hcl +variable "private_key" {} - resource "aws_instance" "example" { - ... +resource "aws_instance" "example" { + # ... - provisioner "remote-exec" { - connection { - host = "${self.private_ip}" - private_key = "${var.private_key}" - } - - ... - } + provisioner "remote-exec" { + connection { + host = "${self.private_ip}" + private_key = "${var.private_key}" } + # ... + } +} +``` + `terraform push` any "Terraform Variables": $ terraform push -name $ATLAS_USERNAME/example -var "private_key=$MY_PRIVATE_KEY" @@ -100,15 +111,21 @@ Set the [variables](https://www.terraform.io/docs/configuration/variables.html) $ TF_VAR_private_key=$MY_PRIVATE_KEY terraform push -name $ATLAS_USERNAME/example -Alternatively, you can add or update variables manually by going to the "Variables" section of your Environment and pasting the contents of the file in as the value. +Alternatively, you can add or update variables manually by going to the +"Variables" section of your Environment and pasting the contents of the file in +as the value. Now, any resource that consumes that variable will have access to the variable value, without having to check the file into version control. If you want to run Terraform locally, that file will still need to be passed in as a variable in the CLI. View the [Terraform Variable Documentation](https://www.terraform.io/docs/configuration/variables.html) for more info on how to accomplish this. A few things to note... -The `.tfvars` file does not support multi-line files. You can still use `.tfvars` to define variables, however, you will not be able to actually set the variable in `.tfvars` with the multi-line file contents like you would a variable in a `.tf` file. +The `.tfvars` file does not support multi-line files. You can still use +`.tfvars` to define variables, however, you will not be able to actually set the +variable in `.tfvars` with the multi-line file contents like you would a +variable in a `.tf` file. -If you are running Terraform locally, you can pass in the variables at the command line: +If you are running Terraform locally, you can pass in the variables at the +command line: $ terraform apply -var "private_key=$MY_PRIVATE_KEY" $ TF_VAR_private_key=$MY_PRIVATE_KEY terraform apply @@ -118,8 +135,6 @@ You can update variables locally by using the `-overwrite` flag with your `terra $ terraform push -name $ATLAS_USERNAME/example -var "private_key=$MY_PRIVATE_KEY" -overwrite=private_key $ TF_VAR_private_key=$MY_PRIVATE_KEY terraform push -name $ATLAS_USERNAME/example -overwrite=private_key -- - - - ## Notes on Security Terraform variables and environment variables are encrypted using From d31e1d9efaae02711f021b81b0fd96d188391515 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:00:59 -0400 Subject: [PATCH 59/72] Update state --- .../enterprise/state/collaborating.html.md | 16 ++-- .../docs/enterprise/state/index.html.md | 24 +++--- .../docs/enterprise/state/pushing.html.md | 12 ++- .../state/resolving-conflicts.html.md | 85 +++++++++---------- 4 files changed, 71 insertions(+), 66 deletions(-) diff --git a/website/source/docs/enterprise/state/collaborating.html.md b/website/source/docs/enterprise/state/collaborating.html.md index 0e5d03478..a5e799f47 100755 --- a/website/source/docs/enterprise/state/collaborating.html.md +++ b/website/source/docs/enterprise/state/collaborating.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "State: Collaborating" +page_title: "Collaborating - State - Terraform Enterprise" sidebar_current: "docs-enterprise-state-collaborating" description: |- How to collaborate on states. @@ -10,12 +10,14 @@ description: |- Terraform Enterprise is one of a few options to store [remote state](/docs/enterprise/state). -Remote state gives you the ability to version and collaborate on Terraform changes. It -stores information about the changes Terraform makes based on configuration. +Remote state gives you the ability to version and collaborate on Terraform +changes. It stores information about the changes Terraform makes based on +configuration. In order to collaborate safely on remote state, we recommend -[creating an organization](/docs/enterprise/organizations/create.html) to manage teams of users. +[creating an organization](/docs/enterprise/organizations/create.html) to +manage teams of users. -Then, following a [remote state push](/docs/enterprise/state) you can view state versions -in the changes tab of the environment created under the same name -as the remote state. \ No newline at end of file +Then, following a [remote state push](/docs/enterprise/state) you can view state +versions in the changes tab of the environment created under the same name as +the remote state. diff --git a/website/source/docs/enterprise/state/index.html.md b/website/source/docs/enterprise/state/index.html.md index c76146064..047cfee28 100755 --- a/website/source/docs/enterprise/state/index.html.md +++ b/website/source/docs/enterprise/state/index.html.md @@ -1,24 +1,24 @@ --- layout: "enterprise" -page_title: "About Remote State" +page_title: "State - Terraform Enterprise" sidebar_current: "docs-enterprise-state" description: |- Terraform stores the state of your managed infrastructure from the last time Terraform was run. This section is about states. --- -# About Remote State +# State -Terraform stores the state of your managed infrastructure from the last -time Terraform was run. By default this state is stored in a local file -named `terraform.tfstate`, but it can also be stored remotely, which -works better in a team environment. +Terraform stores the state of your managed infrastructure from the last time +Terraform was run. By default this state is stored in a local file named +`terraform.tfstate`, but it can also be stored remotely, which works better in a +team environment. -Terraform Enterprise is a remote state provider, allowing you to store, version and -collaborate on states. +Terraform Enterprise is a remote state provider, allowing you to store, version +and collaborate on states. -Remote state gives you more than just easier version control and safer -storage. It also allows you to delegate the outputs to other teams. -This allows your infrastructure to be more easily broken down into -components that multiple teams can access. +Remote state gives you more than just easier version control and safer storage. +It also allows you to delegate the outputs to other teams. This allows your +infrastructure to be more easily broken down into components that multiple teams +can access. Read [more about remote state](https://www.terraform.io/docs/state/remote.html). diff --git a/website/source/docs/enterprise/state/pushing.html.md b/website/source/docs/enterprise/state/pushing.html.md index cfa23e552..4e9545fda 100755 --- a/website/source/docs/enterprise/state/pushing.html.md +++ b/website/source/docs/enterprise/state/pushing.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "State: Pushing" +page_title: "Pushing - State - Terraform Enterprise" sidebar_current: "docs-enterprise-state-pushing" description: |- Pushing remote states. @@ -10,10 +10,14 @@ description: |- Terraform Enterprise is one of a few options to store [remote state](/docs/enterprise/state). -Remote state gives you the ability to version and collaborate on Terraform changes. It -stores information about the changes Terraform makes based on configuration. +Remote state gives you the ability to version and collaborate on Terraform +changes. It stores information about the changes Terraform makes based on +configuration. To use Terraform Enterprise to store remote state, you'll first need to have the `ATLAS_TOKEN` environment variable set and run the following command. - $ terraform remote config -backend-config="name=%{DEFAULT_USERNAME}/product" +```shell +$ terraform remote config \ + -backend-config="name=$USERNAME/product" +``` diff --git a/website/source/docs/enterprise/state/resolving-conflicts.html.md b/website/source/docs/enterprise/state/resolving-conflicts.html.md index fbba32733..0de4069d6 100755 --- a/website/source/docs/enterprise/state/resolving-conflicts.html.md +++ b/website/source/docs/enterprise/state/resolving-conflicts.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "State: Resolving Conflicts" +page_title: "Resolving Conflicts - State - Terraform Enterprise" sidebar_current: "docs-enterprise-state-resolving" description: |- Resolving conflicts with remote states. @@ -8,64 +8,63 @@ description: |- # Resolving Conflicts in Remote States -Resolving state conflicts can be time consuming and error prone, so -it's important to approach it carefully. +Resolving state conflicts can be time consuming and error prone, so it's +important to approach it carefully. -There are several tools provided by Terraform Enterprise to help resolve conflicts -and fix remote state issues. First, you can navigate between state -versions in the changes view of your environment (after toggling on -the remote state checkbox) and view plain-text differences between -versions. +There are several tools provided by Terraform Enterprise to help resolve +conflicts and fix remote state issues. First, you can navigate between state +versions in the changes view of your environment (after toggling on the remote +state checkbox) and view plain-text differences between versions. -This allows you to pinpoint where things may have gone wrong and -make a educated decision about resolving the conflict. +This allows you to pinpoint where things may have gone wrong and make a educated +decision about resolving the conflict. ### Rolling Back to a Specific State Version -The rollback feature allows you to choose a new version to set as the -"Head" version of the state. Rolling back to a version means it will -then return that state upon request from a client. It will not -increment the serial in the state, but perform a hard rollback to the -exact version of the state provided. +The rollback feature allows you to choose a new version to set as the "Head" +version of the state. Rolling back to a version means it will then return that +state upon request from a client. It will not increment the serial in the state, +but perform a hard rollback to the exact version of the state provided. -This allows you to reset the state to an older version, essentially -forgetting changes made in versions after that point. +This allows you to reset the state to an older version, essentially forgetting +changes made in versions after that point. -To roll back to a specific version, navigate to it in the changes view -and use the rollback link. You'll need to confirm the version number -to perform the operation. +To roll back to a specific version, navigate to it in the changes view and use +the rollback link. You'll need to confirm the version number to perform the +operation. ### Using Terraform Locally -Another way to resolve remote state conflicts -is to merge and conflicted copies locally by inspecting the -raw state available in the path `.terraform/terraform.tfstate`. +Another way to resolve remote state conflicts is to merge and conflicted copies +locally by inspecting the raw state available in the path +`.terraform/terraform.tfstate`. -When making state changes, it's important to make backup copies in -order to avoid losing any data. +When making state changes, it's important to make backup copies in order to +avoid losing any data. -Any state that is pushed with a serial that is lower -than the known serial when the MD5 of the state does not match will be rejected. +Any state that is pushed with a serial that is lower than the known serial when +the MD5 of the state does not match will be rejected. The serial is embedded in the state file: - { - "version": 1, - "serial": 555, - "remote": { - "type": "atlas", - "config": { - "name": "%{DEFAULT_USERNAME}/production" - } - }, - ... +```json +{ + "version": 1, + "serial": 555, + "remote": { + "type": "atlas", + "config": { + "name": "my-username/production" } + } +} +``` -Once a conflict has been resolved locally by editing the state file, -the serial can be incremented past the current version and -pushed: +Once a conflict has been resolved locally by editing the state file, the serial +can be incremented past the current version and pushed: - terraform remote push +```shell +$ terraform remote push +``` -This will upload the manually resolved state and set it as the head -version. +This will upload the manually resolved state and set it as the head version. From e5f60930c083a8c832bf521ff8eba9d7edd9f6ac Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:01:07 -0400 Subject: [PATCH 60/72] Update accounts --- .../user-accounts/authentication.html.md | 68 ++++++++----------- .../enterprise/user-accounts/index.html.md | 10 +-- .../enterprise/user-accounts/recovery.html.md | 11 +-- 3 files changed, 39 insertions(+), 50 deletions(-) diff --git a/website/source/docs/enterprise/user-accounts/authentication.html.md b/website/source/docs/enterprise/user-accounts/authentication.html.md index cd60a9242..fd73c6211 100755 --- a/website/source/docs/enterprise/user-accounts/authentication.html.md +++ b/website/source/docs/enterprise/user-accounts/authentication.html.md @@ -1,70 +1,58 @@ --- layout: "enterprise" -page_title: "User Authentication in Terraform Enterprise" +page_title: "Authentication - Accounts - Terraform Enterprise" sidebar_current: "docs-enterprise-accounts-authentication" description: |- Terraform Enterprise requires a username and password to sign up and login. However, there are several ways to authenticate with your account. --- -# Authentication with Terraform Enterprise +# Authentication -Terraform Enterprise requires a username and password to sign up and login. However, -there are several ways to authenticate with your account. +Terraform Enterprise requires a username and password to sign up and login. +However, there are several ways to authenticate with your account. ### Authentication Tokens -Authentication tokens are keys used to access your account via tools -or over the various APIs used in Terraform Enterprise. +Authentication tokens are keys used to access your account via tools or over the +various APIs used in Terraform Enterprise. -You can create new tokens in the token section -of your account settings. It's important to keep tokens secure, -as they are essentially a password and can be used to access your -account or resources. Additionally, token authentication +You can create new tokens in the token section of your account settings. It's +important to keep tokens secure, as they are essentially a password and can be +used to access your account or resources. Additionally, token authentication bypasses two factor authentication. ### Authenticating Tools All HashiCorp tools look for the `ATLAS_TOKEN` environment variable: - $ export ATLAS_TOKEN=TOKEN +```shell +$ export ATLAS_TOKEN=TOKEN +``` -This will automatically authenticate all requests against -this token. This is the recommended way to authenticate with our various -tools. Care should be given to how this token is stored, as it is -as good as a password. +This will automatically authenticate all requests against this token. This is +the recommended way to authenticate with our various tools. Care should be given +to how this token is stored, as it is as good as a password. ### Two Factor Authentication -You can optionally enable Two Factor authentication, requiring an -SMS or TOTP one-time code every time you log in, after entering -your username and password. +You can optionally enable Two Factor authentication, requiring an SMS or TOTP +one-time code every time you log in, after entering your username and password. -You can enable Two Factor authentication in the security section -of your account settings. +You can enable Two Factor authentication in the security section of your account +settings. -Be sure to save the generated recovery codes. Each backup code can -be used once to sign in if you do not have access to your two-factor -authentication device. - - -### Vagrant Login - -Only Vagrant allows for a `vagrant login` command, but it can be -used to login and automatically create an authentication token from Vagrant. - - $ vagrant login - # ... - Atlas username: - Atlas password: - -You can read more about `vagrant login` and its options -in the [Vagrant documentation](https://docs.vagrantup.com/v2/cli/login.html). You -cannot use Vagrant login with Two Factor authentication. +Be sure to save the generated recovery codes. Each backup code can be used once +to sign in if you do not have access to your two-factor authentication device. ### Sudo Mode -When accessing certain admin-level pages (adjusting your user profile, for example), you may notice that you're prompted for your password, even though you're already logged in. This is by design, and aims to help guard protect you if your screen is unlocked and unattended. +When accessing certain admin-level pages (adjusting your user profile, for +example), you may notice that you're prompted for your password, even though +you're already logged in. This is by design, and aims to help guard protect you +if your screen is unlocked and unattended. ### Session Management -You can see a list of your active sessions on your security settings page. From here, you can revoke sessions, in case you have lost access to a machine from which you were accessing. +You can see a list of your active sessions on your security settings page. From +here, you can revoke sessions, in case you have lost access to a machine from +which you were accessing. diff --git a/website/source/docs/enterprise/user-accounts/index.html.md b/website/source/docs/enterprise/user-accounts/index.html.md index 0789a8499..5c4942a27 100755 --- a/website/source/docs/enterprise/user-accounts/index.html.md +++ b/website/source/docs/enterprise/user-accounts/index.html.md @@ -1,13 +1,13 @@ --- layout: "enterprise" -page_title: "User Accounts in Terraform Enterprise" +page_title: "Accounts - Terraform Enterprise" sidebar_current: "docs-enterprise-accounts" description: |- Users are the main identity system in Terraform Enterprise. --- -# User Accounts in Terraform Enterprise - -Users are the main identity system in Terraform Enterprise. A user can -be a member of multiple [organizations](/docs/enterprise/organizations), as well as individually collaborate on various resources. +# User Accounts +Users are the main identity system in Terraform Enterprise. A user can be a +member of multiple [organizations](/docs/enterprise/organizations/index.html), +as well as individually collaborate on various resources. diff --git a/website/source/docs/enterprise/user-accounts/recovery.html.md b/website/source/docs/enterprise/user-accounts/recovery.html.md index f5cd19fa6..3e2243713 100755 --- a/website/source/docs/enterprise/user-accounts/recovery.html.md +++ b/website/source/docs/enterprise/user-accounts/recovery.html.md @@ -1,14 +1,15 @@ --- layout: "enterprise" -page_title: "User Account Recovery" +page_title: "Recovery - Accounts - Terraform Enterprise" sidebar_current: "docs-enterprise-accounts-recovery" description: |- If you have lost access to your account, use the reset password form to send yourself a link to reset your password. --- -# Terraform Enterprise Account Recovery +# Account Recovery -If you have lost access to your Terraform Enterprise account, use the reset password -form on the login page to send yourself a link to reset your password. +If you have lost access to your Terraform Enterprise account, use the reset +password form on the login page to send yourself a link to reset your password. -If an email is unknown, [contact us](mailto:support@hashicorp.com) for further help. +If an email is unknown, [contact us](mailto:support@hashicorp.com) for further +help. From fa4d6ec5f8752dd1fc96e4e7692795f15c28377c Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:01:13 -0400 Subject: [PATCH 61/72] Update VCS --- .../source/docs/enterprise/vcs/git.html.md | 23 +++++++------ .../source/docs/enterprise/vcs/github.html.md | 33 ++++++++++--------- .../source/docs/enterprise/vcs/index.html.md | 16 ++++----- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/website/source/docs/enterprise/vcs/git.html.md b/website/source/docs/enterprise/vcs/git.html.md index 3aa50501b..1a348b425 100755 --- a/website/source/docs/enterprise/vcs/git.html.md +++ b/website/source/docs/enterprise/vcs/git.html.md @@ -1,28 +1,27 @@ --- -layout: "vcs" -page_title: "Git Integration" -sidebar_current: "docs-enterprise-vcs-git" +layout: "enterprise" +page_title: "Git - VCS Integrations - Terraform Enterprise" +sidebar_current: "docs-enterprise-vcs-git-" description: |- Git repositories can be integrated with Terraform Enterprise by using push command. --- -# Git Integation +# Git Integration Git repositories can be integrated with Terraform Enterprise by using -[`terraform push`](https://www.terraform.io/docs/commands/push.html) to import -Terraform configuration when changes are committed. When Terraform -configuration is imported using `terraform push` a plan is automatically queued. +[`terraform push`](/docs/commands/push.html) to import Terraform configuration +when changes are committed. When Terraform configuration is imported using +`terraform push` a plan is automatically queued. -_**Note:** This integration is for Git repositories **not** hosted on GitHub. -For repositories on GitHub, there is native [GitHub Integration](/docs/enterprise/vcs/github.html). +-> This integration is for Git repositories **not** hosted on GitHub. For GitHub, please see the GitHub documentation instead. ## Setup Terraform configuration can be manually imported by running `terraform push` like below: -``` -$ terraform push -name=$ATLAS_USERNAME/ENV_NAME +```shell +$ terraform push -name=$USERNAME/ENV_NAME ``` A better option than having to manually run `terraform push` is to run it @@ -36,7 +35,7 @@ The script below will execute `terraform push` when you push local changes to your Git server. Place the script at `.git/pre-push` in your local Git repository, set the necessary variables, and ensure the script is executable. -``` +```shell #!/bin/bash # # An example hook script to push Terraform configuration to Terraform Enterprise. diff --git a/website/source/docs/enterprise/vcs/github.html.md b/website/source/docs/enterprise/vcs/github.html.md index 40778358d..70a19b686 100755 --- a/website/source/docs/enterprise/vcs/github.html.md +++ b/website/source/docs/enterprise/vcs/github.html.md @@ -1,6 +1,6 @@ --- -layout: "vcs" -page_title: "GitHub Integration" +layout: "enterprise" +page_title: "GitHub - VCS Integrations - Terraform Enterprise" sidebar_current: "docs-enterprise-vcs-github" description: |- GitHub repositories can be integrated with Terraform Enterprise by using push command. @@ -8,28 +8,31 @@ description: |- # GitHub Integration -GitHub can be used to import Terraform configuration, automatically queuing -runs when changes are merged into a repository's default branch. Additionally, -plans are run when a pull request is created or updated. Terraform Enterprise will update the -pull request with the result of the Terraform plan providing quick feedback on -proposed changes. +GitHub can be used to import Terraform configuration, automatically queuing runs +when changes are merged into a repository's default branch. Additionally, plans +are run when a pull request is created or updated. Terraform Enterprise will +update the pull request with the result of the Terraform plan providing quick +feedback on proposed changes. ## Setup -Terraform Enterprise environments are linked to individual GitHub repositories. However, a -single GitHub repository can be linked to multiple environments allowing -a single set of Terraform configuration to be used across multiple environments. +Terraform Enterprise environments are linked to individual GitHub repositories. +However, a single GitHub repository can be linked to multiple environments +allowing a single set of Terraform configuration to be used across multiple +environments. -Environments can be linked when they're initially created using the New Environment process. -Existing environments can be linked by setting GitHub details in their -**Integrations**. +Environments can be linked when they're initially created using the New +Environment process. Existing environments can be linked by setting GitHub +details in their **Integrations**. -To link a Terraform Enterprise environment to a GitHub repository, you need three pieces of -information: +To link a Terraform Enterprise environment to a GitHub repository, you need +three pieces of information: - **GitHub repository** - The location of the repository being imported in the format _username/repository_. + - **GitHub branch** - The branch from which to ingress new versions. This defaults to the value GitHub provides as the default branch for this repository. + - **Path to directory of Terraform files** - The repository's subdirectory that contains its terraform files. This defaults to the root of the repository. diff --git a/website/source/docs/enterprise/vcs/index.html.md b/website/source/docs/enterprise/vcs/index.html.md index 19c21edc4..c88012641 100755 --- a/website/source/docs/enterprise/vcs/index.html.md +++ b/website/source/docs/enterprise/vcs/index.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Integration with Version Control Software" +page_title: "VCS Integrations - Terraform Enterprise" sidebar_current: "docs-enterprise-vcs" description: |- Terraform Enterprise can integrate with version control software Git and GitHub. @@ -8,12 +8,10 @@ description: |- # Integration with Version Control Software -Terraform Enterprise can integrate with your version control software to automatically execute -Terraform with your latest Terraform configuration as you commit changes to -source control. +Terraform Enterprise can integrate with your version control software to +automatically execute Terraform with your latest Terraform configuration as you +commit changes to source control. -Different capabilities within Terraform Enterprise are available depending on the integration -in use. The available integration options are below. - -- [Git](/docs/enterprise/vcs/git.html) -- [GitHub](/docs/enterprise/vcs/github.html) +Different capabilities within Terraform Enterprise are available depending on +the integration in use. The available integration options are on the sidebar +navigation. From 51665dd18ac4ce4617b812a39b8e23e290b826b4 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:01:18 -0400 Subject: [PATCH 62/72] Update support --- .../source/docs/enterprise/support.html.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/website/source/docs/enterprise/support.html.md b/website/source/docs/enterprise/support.html.md index 46f7b4d98..60c8f1c14 100755 --- a/website/source/docs/enterprise/support.html.md +++ b/website/source/docs/enterprise/support.html.md @@ -1,6 +1,6 @@ --- layout: "enterprise" -page_title: "Contacting Support" +page_title: "Support - Terraform Enterprise" sidebar_current: "docs-enterprise-support" description: |- All users of Terraform Enterprise are urged to email feedback, questions or requests to the HashiCorp team. @@ -8,25 +8,25 @@ description: |- # Contacting Support -All users of Terraform Enterprise are urged to email feedback, questions or requests -to the HashiCorp team. +All users of Terraform Enterprise are urged to email feedback, questions or +requests to the HashiCorp team. -### [support@hashicorp.com](mailto:support@hashicorp.com) +### Free Support -We do not currently publish support SLAs for free accounts, but endeavour -to respond as quickly as possible. We respond to most requests -within less than 24 hours. +We do not currently publish support SLAs for free accounts, but endeavor to +respond as quickly as possible. We respond to most requests within less than 24 +hours. ## HashiCorp Tools Support -It's often the case that Terraform Enterprise questions or feedback relates to the -HashiCorp tooling. We encourage all Terraform Enterprise users to search for related -issues and problems in the open source repositories and mailing lists -prior to contacting us to help make our support more efficient and -to help resolve problems faster. +It's often the case that Terraform Enterprise questions or feedback relates to +the HashiCorp tooling. We encourage all Terraform Enterprise users to search for +related issues and problems in the open source repositories and mailing lists +prior to contacting us to help make our support more efficient and to help +resolve problems faster. -Visit the updating tools section -for a list of our tools and their project websites. +Visit the updating tools section for a list of our tools and their project +websites. ## Documentation Feedback From 2454ea9d141ab079140458dbb817fe1b3f0b614a Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:01:30 -0400 Subject: [PATCH 63/72] Update home --- website/source/docs/enterprise/index.html.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/source/docs/enterprise/index.html.md b/website/source/docs/enterprise/index.html.md index 28ef8cd4f..8ff9ba3ea 100755 --- a/website/source/docs/enterprise/index.html.md +++ b/website/source/docs/enterprise/index.html.md @@ -1,7 +1,7 @@ --- layout: "enterprise" -page_title: "Terraform Enterprise Features" -sidebar_current: "docs-enterprise" +page_title: "Terraform Enterprise" +sidebar_current: "docs-enterprise-home" description: |- Terraform Enterprise is a tool for safely and efficiently changing infrastructure across providers. --- From 46f4ffbc323eafce83e3371a58a74b1bdf7e3b2f Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:01:39 -0400 Subject: [PATCH 64/72] Fix terminal size --- website/source/assets/stylesheets/_home.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/assets/stylesheets/_home.scss b/website/source/assets/stylesheets/_home.scss index 95da9ec34..2c15138b3 100644 --- a/website/source/assets/stylesheets/_home.scss +++ b/website/source/assets/stylesheets/_home.scss @@ -301,7 +301,7 @@ &:before { content: '\25CF'; color: $white; - font-size: 28px; + font-size: 20px; line-height: 100%; height: 100%; } From cb5dd8f77f1b527ad5d0eb1f2cb86de833102aaf Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:01:55 -0400 Subject: [PATCH 65/72] Remove unused pages --- .../packer/builds/linked-applications.html.md | 11 ----------- .../docs/enterprise/packer/index.html.md | 19 ------------------- 2 files changed, 30 deletions(-) delete mode 100755 website/source/docs/enterprise/packer/builds/linked-applications.html.md delete mode 100755 website/source/docs/enterprise/packer/index.html.md diff --git a/website/source/docs/enterprise/packer/builds/linked-applications.html.md b/website/source/docs/enterprise/packer/builds/linked-applications.html.md deleted file mode 100755 index f4a438965..000000000 --- a/website/source/docs/enterprise/packer/builds/linked-applications.html.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: "enterprise" -page_title: "Linked Applications" -sidebar_current: "docs-enterprise-packerbuilds-linkedapps" -description: |- - Linked applications have been deprecated in favor of the application build pipeline. ---- - -# Linked Applications - -
Linked applications have been deprecated in favor of the application build pipeline.
diff --git a/website/source/docs/enterprise/packer/index.html.md b/website/source/docs/enterprise/packer/index.html.md deleted file mode 100755 index 1903a7c95..000000000 --- a/website/source/docs/enterprise/packer/index.html.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -layout: "enterprise" -page_title: "Packer Features in Terraform Enterprise" -sidebar_current: "docs-enterprise-packer-index" -description: |- - Packer is a tool for creating images for platforms such as Amazon AWS, OpenStack, VMware, VirtualBox, Docker, and more — all from a single source configuration. ---- - -# Packer Features in Terraform Enterprise - -[Packer](https://packer.io) is a tool for creating images for platforms such as Amazon AWS, -OpenStack, VMware, VirtualBox, Docker, and more — all from a single -source configuration. - -This is a list of features specific to Packer that Terraform Enterprise provides. - -- [Running Packer Builds](/docs/enterprise/packer/builds/index.html) -- [Creating and Uploading AMIs](/docs/enterprise/packer/artifacts/creating-amis.html) -- [Creating Vagrant Boxes](/docs/enterprise/packer/artifacts/creating-vagrant-boxes.html) From 426065a8f2611b2baccc44b4afe8b8a8cf0a7cf9 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 00:14:57 -0400 Subject: [PATCH 66/72] Fix broken links --- ...e.html.md => terraform-enterprise.html.md} | 2 +- .../source/docs/commands/push.html.markdown | 4 +-- ...e.html.md => terraform-enterprise.html.md} | 2 +- .../docs/enterprise/glossary/index.html.md | 10 ------- .../packer/artifacts/creating-amis.html.md | 2 +- .../d/artifact.html.markdown | 4 +-- .../index.html.markdown | 5 ++-- .../r/artifact.html.markdown | 6 ++--- .../terraform/d/remote_state.html.md | 2 +- website/source/layouts/backend-types.erb | 6 ++--- website/source/layouts/docs.erb | 8 +++--- .../source/layouts/terraform-enterprise.erb | 27 +++++++++++++++++++ website/source/layouts/tfe.erb | 27 ------------------- 13 files changed, 47 insertions(+), 58 deletions(-) rename website/source/docs/backends/types/{tfe.html.md => terraform-enterprise.html.md} (94%) rename website/source/docs/configuration/{tfe.html.md => terraform-enterprise.html.md} (97%) rename website/source/docs/providers/{tfe => terraform-enterprise}/d/artifact.html.markdown (97%) rename website/source/docs/providers/{tfe => terraform-enterprise}/index.html.markdown (93%) rename website/source/docs/providers/{tfe => terraform-enterprise}/r/artifact.html.markdown (94%) create mode 100644 website/source/layouts/terraform-enterprise.erb delete mode 100644 website/source/layouts/tfe.erb diff --git a/website/source/docs/backends/types/tfe.html.md b/website/source/docs/backends/types/terraform-enterprise.html.md similarity index 94% rename from website/source/docs/backends/types/tfe.html.md rename to website/source/docs/backends/types/terraform-enterprise.html.md index 4a5c6cb72..13663ac6a 100644 --- a/website/source/docs/backends/types/tfe.html.md +++ b/website/source/docs/backends/types/terraform-enterprise.html.md @@ -1,7 +1,7 @@ --- layout: "backend-types" page_title: "Backend Type: terraform enterprise" -sidebar_current: "docs-backends-types-standard-tfe" +sidebar_current: "docs-backends-types-standard-terraform-enterprise" description: |- Terraform can store the state in Terraform Enterprise --- diff --git a/website/source/docs/commands/push.html.markdown b/website/source/docs/commands/push.html.markdown index 026956593..388f10a68 100644 --- a/website/source/docs/commands/push.html.markdown +++ b/website/source/docs/commands/push.html.markdown @@ -48,7 +48,7 @@ The command-line flags are all optional. The list of available flags are: configurations not just to your account but to other accounts and organizations. This setting can also be set in the configuration in the - [Terraform Enterprise section](/docs/configuration/tfe.html). + [Terraform Enterprise section](/docs/configuration/terraform-enterprise.html). * `-no-color` - Disables output with coloring @@ -88,7 +88,7 @@ The reason Terraform uploads all of these files is because Terraform cannot know what is and isn't being used for provisioning, so it uploads all the files to be safe. To exclude certain files, specify the `-exclude` flag when pushing, or specify the `exclude` parameter in the -[Terraform Enterprise configuration section](/docs/configuration/tfe.html). +[Terraform Enterprise configuration section](/docs/configuration/terraform-enterprise.html). ## Terraform Variables diff --git a/website/source/docs/configuration/tfe.html.md b/website/source/docs/configuration/terraform-enterprise.html.md similarity index 97% rename from website/source/docs/configuration/tfe.html.md rename to website/source/docs/configuration/terraform-enterprise.html.md index bb4d94f51..04a596bcb 100644 --- a/website/source/docs/configuration/tfe.html.md +++ b/website/source/docs/configuration/terraform-enterprise.html.md @@ -1,7 +1,7 @@ --- layout: "docs" page_title: "Configuring Terraform Enterprise" -sidebar_current: "docs-config-tfe" +sidebar_current: "docs-config-terraform-enterprise" description: |- Terraform Enterprise is the ideal way to use Terraform in a team environment. Terraform Enterprise will run Terraform for you, safely handle parallelization across different team members, save run history along with plans, and more. --- diff --git a/website/source/docs/enterprise/glossary/index.html.md b/website/source/docs/enterprise/glossary/index.html.md index dc573c2c9..a3da0bd95 100755 --- a/website/source/docs/enterprise/glossary/index.html.md +++ b/website/source/docs/enterprise/glossary/index.html.md @@ -118,16 +118,6 @@ is recorded and sent to any configured notification methods, like email. An infrastructure is a stateful representation of a set of Consul datacenters. -## Managed Node - -Managed node is the billing metric for Terraform Enterprise. For Consul Enterprise, a node is a host -with a Consul agent on it. For Terraform Enterprise, a node is a compute -resource managed by Terraform. See [Managed Nodes](/docs/enterprise/billing) -for more details about which Terraform resources and resource properties are counted -as compute resources. - -All [Terraform Enterprise features](/docs/enterprise) are paid. - ## Operator An operator is a person who is making changes to infrastructure or settings. diff --git a/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md b/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md index 3f8678822..61257bc00 100755 --- a/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md +++ b/website/source/docs/enterprise/packer/artifacts/creating-amis.html.md @@ -51,7 +51,7 @@ Below is a complete example Packer template that starts an AWS instance. "source_ami": "ami-2ccc7a44", "instance_type": "c3.large", "ssh_username": "ubuntu", - "ami_name": "TFE Example {{ timestamp }}" + "ami_name": "Terraform Enterprise Example {{ timestamp }}" } ], "post-processors": [ diff --git a/website/source/docs/providers/tfe/d/artifact.html.markdown b/website/source/docs/providers/terraform-enterprise/d/artifact.html.markdown similarity index 97% rename from website/source/docs/providers/tfe/d/artifact.html.markdown rename to website/source/docs/providers/terraform-enterprise/d/artifact.html.markdown index aaef2db11..200290dca 100644 --- a/website/source/docs/providers/tfe/d/artifact.html.markdown +++ b/website/source/docs/providers/terraform-enterprise/d/artifact.html.markdown @@ -1,7 +1,7 @@ --- -layout: "tfe" +layout: "terraform-enterprise" page_title: "Terraform Enterprise: atlas_artifact" -sidebar_current: "docs-tfe-data-artifact" +sidebar_current: "docs-terraform-enterprise-data-artifact" description: |- Provides a data source to deployment artifacts managed by Terraform Enterprise. This can be used to dynamically configure instantiation and provisioning diff --git a/website/source/docs/providers/tfe/index.html.markdown b/website/source/docs/providers/terraform-enterprise/index.html.markdown similarity index 93% rename from website/source/docs/providers/tfe/index.html.markdown rename to website/source/docs/providers/terraform-enterprise/index.html.markdown index 836509ecf..978630975 100644 --- a/website/source/docs/providers/tfe/index.html.markdown +++ b/website/source/docs/providers/terraform-enterprise/index.html.markdown @@ -1,7 +1,7 @@ --- -layout: "tfe" +layout: "terraform-enterprise" page_title: "Provider: Terraform Enterprise" -sidebar_current: "docs-tfe-index" +sidebar_current: "docs-terraform-enterprise-index" description: |- The Terraform Enterprise provider is used to interact with configuration, artifacts, and metadata managed by the Terraform Enterprise service. @@ -40,4 +40,3 @@ The following arguments are supported: * `token` - (Required) API token. This can also be specified with the `ATLAS_TOKEN` shell environment variable. - diff --git a/website/source/docs/providers/tfe/r/artifact.html.markdown b/website/source/docs/providers/terraform-enterprise/r/artifact.html.markdown similarity index 94% rename from website/source/docs/providers/tfe/r/artifact.html.markdown rename to website/source/docs/providers/terraform-enterprise/r/artifact.html.markdown index 514dbba79..ce9fbde30 100644 --- a/website/source/docs/providers/tfe/r/artifact.html.markdown +++ b/website/source/docs/providers/terraform-enterprise/r/artifact.html.markdown @@ -1,7 +1,7 @@ --- -layout: "tfe" +layout: "terraform-enterprise" page_title: "Terraform Enterprise: atlas_artifact" -sidebar_current: "docs-tfe-resource-artifact" +sidebar_current: "docs-terraform-enterprise-resource-artifact" description: |- Provides access to deployment artifacts managed by Terraform Enterprise. This can be used to dynamically configure instantiation and provisioning @@ -16,7 +16,7 @@ of resources. ~> **This resource is deprecated!** Please use the -[Artifact Data Source](/docs/providers/tfe/d/artifact.html) +[Artifact Data Source](/docs/providers/terraform-enterprise/d/artifact.html) ## Example Usage diff --git a/website/source/docs/providers/terraform/d/remote_state.html.md b/website/source/docs/providers/terraform/d/remote_state.html.md index b24207773..c54fdb014 100644 --- a/website/source/docs/providers/terraform/d/remote_state.html.md +++ b/website/source/docs/providers/terraform/d/remote_state.html.md @@ -33,7 +33,7 @@ The following arguments are supported: * `backend` - (Required) The remote backend to use. * `environment` - (Optional) The Terraform environment to use. * `config` - (Optional) The configuration of the remote backend. - * Remote state config docs can be found [here](/docs/backends/types/atlas.html) + * Remote state config docs can be found [here](/docs/backends/types/terraform-enterprise.html) ## Attributes Reference diff --git a/website/source/layouts/backend-types.erb b/website/source/layouts/backend-types.erb index 9c36d36e1..10dd5300b 100644 --- a/website/source/layouts/backend-types.erb +++ b/website/source/layouts/backend-types.erb @@ -27,7 +27,7 @@ artifactory > - atlas + atlas > azure @@ -53,8 +53,8 @@ > swift - > - terraform enterprise + > + terraform enterprise diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 8a643f029..2cf07ddec 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -48,8 +48,8 @@ Terraform - > - Terraform Enterprise + > + Terraform Enterprise > @@ -196,8 +196,8 @@ Arukas - > - Terraform Enterprise + > + Terraform Enterprise > diff --git a/website/source/layouts/terraform-enterprise.erb b/website/source/layouts/terraform-enterprise.erb new file mode 100644 index 000000000..c2709e129 --- /dev/null +++ b/website/source/layouts/terraform-enterprise.erb @@ -0,0 +1,27 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %> diff --git a/website/source/layouts/tfe.erb b/website/source/layouts/tfe.erb deleted file mode 100644 index f928a8d4b..000000000 --- a/website/source/layouts/tfe.erb +++ /dev/null @@ -1,27 +0,0 @@ -<% wrap_layout :inner do %> - <% content_for :sidebar do %> - - <% end %> - - <%= yield %> -<% end %> From 00a60f4d776319d9cc47d052f8b2aaeaa7e9f19c Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 11:21:35 -0400 Subject: [PATCH 67/72] Typo --- .../providers/terraform-enterprise/d/artifact.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/providers/terraform-enterprise/d/artifact.html.markdown b/website/source/docs/providers/terraform-enterprise/d/artifact.html.markdown index 200290dca..e525ff3c4 100644 --- a/website/source/docs/providers/terraform-enterprise/d/artifact.html.markdown +++ b/website/source/docs/providers/terraform-enterprise/d/artifact.html.markdown @@ -56,7 +56,7 @@ The following arguments are supported: matching artifact in any build, or a specific number to pin to that build. If `build` and `version` are unspecified, `version` will default to "latest". Cannot be specified with `version`. Note: `build` is only - present if Terraform Enterpris builds the image. + present if Terraform Enterprise builds the image. * `version` - (Optional) The version of the artifact to filter on. This can be "latest", to match against the latest version, "any" to find a matching artifact From 4be8a790dfcabc4956cf3086b7f586f25b631a89 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 11:27:08 -0400 Subject: [PATCH 68/72] Remove unused layout --- website/source/layouts/remotestate.erb | 56 -------------------------- 1 file changed, 56 deletions(-) delete mode 100644 website/source/layouts/remotestate.erb diff --git a/website/source/layouts/remotestate.erb b/website/source/layouts/remotestate.erb deleted file mode 100644 index 61c75cd8c..000000000 --- a/website/source/layouts/remotestate.erb +++ /dev/null @@ -1,56 +0,0 @@ -<% wrap_layout :inner do %> - <% content_for :sidebar do %> - - <% end %> - - <%= yield %> -<% end %> From 966e3bc8947b4bba48c68be67349aa7c8e2f048d Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 11:27:16 -0400 Subject: [PATCH 69/72] Remove atlas reference --- website/source/layouts/backend-types.erb | 3 --- 1 file changed, 3 deletions(-) diff --git a/website/source/layouts/backend-types.erb b/website/source/layouts/backend-types.erb index 10dd5300b..0397535d1 100644 --- a/website/source/layouts/backend-types.erb +++ b/website/source/layouts/backend-types.erb @@ -26,9 +26,6 @@ > artifactory - > - atlas - > azure From b6b2d2d505051d6aa95860cfb5505f05d5816778 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 11:36:49 -0400 Subject: [PATCH 70/72] Remove more references to Atlas --- .../types/terraform-enterprise.html.md | 6 +++ .../terraform-enterprise.html.md | 6 +++ .../artifacts/artifact-provider.html.md | 8 +++- .../artifacts/managing-versions.html.md | 2 +- .../docs/providers/atlas/index.html.markdown | 42 ------------------- .../terraform-enterprise/index.html.markdown | 26 ++++++++---- .../r/artifact.html.markdown | 12 +++--- .../terraform/d/remote_state.html.md | 27 +++++++----- website/source/layouts/docs.erb | 8 ++-- 9 files changed, 63 insertions(+), 74 deletions(-) delete mode 100644 website/source/docs/providers/atlas/index.html.markdown diff --git a/website/source/docs/backends/types/terraform-enterprise.html.md b/website/source/docs/backends/types/terraform-enterprise.html.md index 13663ac6a..e9f2ad08a 100644 --- a/website/source/docs/backends/types/terraform-enterprise.html.md +++ b/website/source/docs/backends/types/terraform-enterprise.html.md @@ -15,6 +15,12 @@ Stores the state in [Terraform Enterprise](https://www.terraform.io/docs/provide You can create a new environment in the Environments section and generate new token in the Tokens page under Settings. +~> **Why is this called "atlas"?** Atlas was previously a commercial offering +from HashiCorp that included a full suite of enterprise products. The products +have since been broken apart into their individual products, like **Terraform +Enterprise**. While this transition is in progress, you may see references to +"atlas" in the documentation. We apologize for the inconvenience. + ## Example Configuration ```hcl diff --git a/website/source/docs/configuration/terraform-enterprise.html.md b/website/source/docs/configuration/terraform-enterprise.html.md index 04a596bcb..e59511f75 100644 --- a/website/source/docs/configuration/terraform-enterprise.html.md +++ b/website/source/docs/configuration/terraform-enterprise.html.md @@ -22,6 +22,12 @@ This page assumes you're familiar with the [configuration syntax](/docs/configuration/syntax.html) already. +~> **Why is this called "atlas"?** Atlas was previously a commercial offering +from HashiCorp that included a full suite of enterprise products. The products +have since been broken apart into their individual products, like **Terraform +Enterprise**. While this transition is in progress, you may see references to +"atlas" in the documentation. We apologize for the inconvenience. + ## Example Terraform Enterprise configuration looks like the following: diff --git a/website/source/docs/enterprise/artifacts/artifact-provider.html.md b/website/source/docs/enterprise/artifacts/artifact-provider.html.md index a68a1e5c6..565c6077c 100755 --- a/website/source/docs/enterprise/artifacts/artifact-provider.html.md +++ b/website/source/docs/enterprise/artifacts/artifact-provider.html.md @@ -14,6 +14,12 @@ This is used to make data stored in Artifacts available to Terraform for interpolation. In the following example, an artifact is defined and references an AMI ID stored in Terraform Enterprise. +~> **Why is this called "atlas"?** Atlas was previously a commercial offering +from HashiCorp that included a full suite of enterprise products. The products +have since been broken apart into their individual products, like **Terraform +Enterprise**. While this transition is in progress, you may see references to +"atlas" in the documentation. We apologize for the inconvenience. + ```hcl provider "atlas" { # You can also set the atlas token by exporting ATLAS_TOKEN into your env @@ -46,4 +52,4 @@ diff would be generated when running `terraform plan`. This allows you to reference changing artifacts and trigger new deployments upon pushing subsequent Packer builds. -Read more about artifacts in the [Terraform documentation](https://terraform.io/docs/providers/atlas/r/artifact.html). +Read more about artifacts in the [Terraform documentation](https://terraform.io/docs/providers/terraform-enterprise/r/artifact.html). diff --git a/website/source/docs/enterprise/artifacts/managing-versions.html.md b/website/source/docs/enterprise/artifacts/managing-versions.html.md index 04ad0fbd1..3c8c23230 100755 --- a/website/source/docs/enterprise/artifacts/managing-versions.html.md +++ b/website/source/docs/enterprise/artifacts/managing-versions.html.md @@ -12,7 +12,7 @@ Artifacts stored in Terraform Enterprise are versioned and assigned a version number. Versions are useful to roll back, audit and deploy images specific versions of images to certain environments in a targeted way. -This assumes you are familiar with the [artifact provider](https://terraform.io/docs/providers/atlas/index.html) +This assumes you are familiar with the [artifact provider](https://terraform.io/docs/providers/terraform-enterprise/index.html) in Terraform. ### Finding the Version of an Artifact diff --git a/website/source/docs/providers/atlas/index.html.markdown b/website/source/docs/providers/atlas/index.html.markdown deleted file mode 100644 index 6f3a008aa..000000000 --- a/website/source/docs/providers/atlas/index.html.markdown +++ /dev/null @@ -1,42 +0,0 @@ ---- -layout: "atlas" -page_title: "Provider: Atlas" -sidebar_current: "docs-atlas-index" -description: |- - The Atlas provider is used to interact with configuration, - artifacts, and metadata managed by the Atlas service. ---- - -# Atlas Provider - -The Atlas provider is used to interact with resources, configuration, -artifacts, and metadata managed by [Atlas](https://atlas.hashicorp.com). -The provider needs to be configured with the proper credentials before -it can be used. - -Use the navigation to the left to read about the available resources. - -## Example Usage - -```hcl -# Configure the Atlas provider -provider "atlas" { - token = "${var.atlas_token}" -} - -# Fetch an artifact configuration -data "atlas_artifact" "web" { - # ... -} -``` - -## Argument Reference - -The following arguments are supported: - -* `address` - (Optional) Atlas server endpoint. Defaults to public Atlas. - This is only required when using an on-premise deployment of Atlas. This can - also be specified with the `ATLAS_ADDRESS` shell environment variable. - -* `token` - (Required) API token. This can also be specified with the - `ATLAS_TOKEN` shell environment variable. diff --git a/website/source/docs/providers/terraform-enterprise/index.html.markdown b/website/source/docs/providers/terraform-enterprise/index.html.markdown index 978630975..1793e5828 100644 --- a/website/source/docs/providers/terraform-enterprise/index.html.markdown +++ b/website/source/docs/providers/terraform-enterprise/index.html.markdown @@ -9,17 +9,24 @@ description: |- # Terraform Enterprise Provider -The Terraform Enterprise provider is used to interact with resources, configuration, -artifacts, and metadata managed by [Terraform Enterprise](https://www.terraform.io/docs/providers/index.html). -The provider needs to be configured with the proper credentials before -it can be used. +The Terraform Enterprise provider is used to interact with resources, +configuration, artifacts, and metadata managed by +[Terraform Enterprise](https://www.terraform.io/docs/providers/index.html). +The provider needs to be configured with the proper credentials before it can +be used. Use the navigation to the left to read about the available resources. +~> **Why is this called "atlas"?** Atlas was previously a commercial offering +from HashiCorp that included a full suite of enterprise products. The products +have since been broken apart into their individual products, like **Terraform +Enterprise**. While this transition is in progress, you may see references to +"atlas" in the documentation. We apologize for the inconvenience. + ## Example Usage -``` -# Configure the Atlas provider +```hcl +# Configure the Terraform Enterprise provider provider "atlas" { token = "${var.atlas_token}" } @@ -34,9 +41,10 @@ data "atlas_artifact" "web" { The following arguments are supported: -* `address` - (Optional) Terrafrom Enterprise server endpoint. Defaults to public Terraform Enterprise. - This is only required when using an on-premise deployment of Terraform Enterprise. This can - also be specified with the `ATLAS_ADDRESS` shell environment variable. +* `address` - (Optional) Terraform Enterprise server endpoint. Defaults to + public Terraform Enterprise. This is only required when using an on-premise + deployment of Terraform Enterprise. This can also be specified with the + `ATLAS_ADDRESS` shell environment variable. * `token` - (Required) API token. This can also be specified with the `ATLAS_TOKEN` shell environment variable. diff --git a/website/source/docs/providers/terraform-enterprise/r/artifact.html.markdown b/website/source/docs/providers/terraform-enterprise/r/artifact.html.markdown index ce9fbde30..42d820929 100644 --- a/website/source/docs/providers/terraform-enterprise/r/artifact.html.markdown +++ b/website/source/docs/providers/terraform-enterprise/r/artifact.html.markdown @@ -3,16 +3,16 @@ layout: "terraform-enterprise" page_title: "Terraform Enterprise: atlas_artifact" sidebar_current: "docs-terraform-enterprise-resource-artifact" description: |- - Provides access to deployment artifacts managed by Terraform Enterprise. This can - be used to dynamically configure instantiation and provisioning - of resources. + Provides access to deployment artifacts managed by Terraform Enterprise. This + can be used to dynamically configure instantiation and provisioning of + resources. --- # atlas_artifact -Provides access to deployment artifacts managed by Atlas. This can -be used to dynamically configure instantiation and provisioning -of resources. +Provides access to deployment artifacts managed by Terraform Enterprise. This +can be used to dynamically configure instantiation and provisioning of +resources. ~> **This resource is deprecated!** Please use the diff --git a/website/source/docs/providers/terraform/d/remote_state.html.md b/website/source/docs/providers/terraform/d/remote_state.html.md index c54fdb014..cec5d919b 100644 --- a/website/source/docs/providers/terraform/d/remote_state.html.md +++ b/website/source/docs/providers/terraform/d/remote_state.html.md @@ -6,23 +6,23 @@ description: |- Accesses state meta data from a remote backend. --- -# remote\_state +# remote_state Retrieves state meta data from a remote backend ## Example Usage -``` +```hcl data "terraform_remote_state" "vpc" { - backend = "atlas" - config { - name = "hashicorp/vpc-prod" - } + backend = "atlas" + config { + name = "hashicorp/vpc-prod" + } } resource "aws_instance" "foo" { - # ... - subnet_id = "${data.terraform_remote_state.vpc.subnet_id}" + # ... + subnet_id = "${data.terraform_remote_state.vpc.subnet_id}" } ``` @@ -47,11 +47,14 @@ on the `terraform_remote_state` resource. ## Root Outputs Only -Only the root level outputs from the remote state are accessible. Outputs from modules within the state cannot be accessed. If you want a module output to be accessible via a remote state, you must thread the output through to a root output. +Only the root level outputs from the remote state are accessible. Outputs from +modules within the state cannot be accessed. If you want a module output to be +accessible via a remote state, you must thread the output through to a root +output. An example is shown below: -``` +```hcl module "app" { source = "..." } @@ -61,4 +64,6 @@ output "app_value" { } ``` -In this example, the output `value` from the "app" module is available as "app_value". If this root level output hadn't been created, then a remote state resource wouldn't be able to access the `value` output on the module. +In this example, the output `value` from the "app" module is available as +"app_value". If this root level output hadn't been created, then a remote state +resource wouldn't be able to access the `value` output on the module. diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 2cf07ddec..347eefbe4 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -196,10 +196,6 @@ Arukas - > - Terraform Enterprise - - > AWS @@ -408,6 +404,10 @@ Terraform + > + Terraform Enterprise + + > TLS From 4fb72b7816cc1036a460625cbb41e9445a68b547 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 7 Apr 2017 11:44:35 -0400 Subject: [PATCH 71/72] Fix bug during build --- website/source/docs/providers/aws/d/iam_role.html.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/source/docs/providers/aws/d/iam_role.html.markdown b/website/source/docs/providers/aws/d/iam_role.html.markdown index 2f149c4b8..e93b16f12 100644 --- a/website/source/docs/providers/aws/d/iam_role.html.markdown +++ b/website/source/docs/providers/aws/d/iam_role.html.markdown @@ -1,12 +1,12 @@ --- layout: "aws" -page_title: "AWS: aws_iam_role" -sidebar_current: "docs-aws-datasource-iam-role" +page_title: AWS: aws_iam_role +sidebar_current: docs-aws-datasource-iam-role description: |- Get information on a Amazon IAM role --- -# aws\_iam\_role +# aws_iam_role This data source can be used to fetch information about a specific IAM role. By using this data source, you can reference IAM role From 56ccff604eecad3f57acac5d91d1703f421a1f5f Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 7 Apr 2017 11:14:54 -0700 Subject: [PATCH 72/72] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b6528593..5f649e54a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ FEATURES: IMPROVEMENTS: * core: add `-lock-timeout` option, which will block and retry locks for the given duration [GH-13262] + * core: new `chomp` interpolation function which returns the given string with any trailing newline characters removed [GH-13419] * backend/remote-state: Add support for assume role extensions to s3 backend [GH-13236] * config: New interpolation functions `basename` and `dirname`, for file path manipulation [GH-13080] * helper/resource: Allow unknown "pending" states [GH-13099]