forked from hashicorp/terraform-provider-awscc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hashicorp#1316 from wellsiau-aws/d-awscc_oam_sink
doc: awscc_oam_sink
- Loading branch information
Showing
4 changed files
with
156 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
resource "awscc_oam_sink" "example" { | ||
name = "SampleSink" | ||
|
||
policy = jsonencode({ | ||
Version = "2012-10-17" | ||
Statement = [{ | ||
Effect = "Allow" | ||
Resource = "*" | ||
Action = [ | ||
"oam:CreateLink", | ||
"oam:UpdateLink" | ||
] | ||
Principal = { | ||
AWS = ["1111111111111"] | ||
} | ||
Condition = { | ||
"ForAllValues:StringEquals" : { | ||
"oam:ResourceTypes" : [ | ||
"AWS::CloudWatch::Metric", | ||
"AWS::Logs::LogGroup", | ||
"AWS::XRay::Trace" | ||
] | ||
} | ||
} | ||
}] | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
data "aws_organizations_organization" "example" {} | ||
|
||
resource "awscc_oam_sink" "example" { | ||
name = "SampleSink" | ||
|
||
policy = jsonencode({ | ||
Version = "2012-10-17" | ||
Statement = [{ | ||
Effect = "Allow" | ||
Principal = "*" | ||
Resource = "*" | ||
Action = ["oam:CreateLink", "oam:UpdateLink"] | ||
Condition = { | ||
StringEquals = { | ||
"aws:PrincipalOrgID" = data.aws_organizations_organization.example.id | ||
} | ||
"ForAllValues:StringEquals" = { | ||
"oam:ResourceTypes" = [ | ||
"AWS::CloudWatch::Metric", | ||
"AWS::Logs::LogGroup" | ||
] | ||
} | ||
} | ||
}] | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" | ||
subcategory: "" | ||
description: |- | ||
{{ .Description | plainmarkdown | trimspace | prefixlines " " }} | ||
--- | ||
|
||
# {{.Name}} ({{.Type}}) | ||
|
||
{{ .Description | trimspace }} | ||
|
||
## Example Usage | ||
|
||
### All Accounts Organization | ||
|
||
Sample sink to connect that permits links to all accounts in an organization | ||
|
||
{{ tffile (printf "examples/resources/%s/oam_sink_org.tf" .Name)}} | ||
|
||
### Individual Account | ||
|
||
Sample sink that permits a link to an individual account | ||
|
||
{{ tffile (printf "examples/resources/%s/oam_sink_accounts.tf" .Name)}} | ||
|
||
{{ .SchemaMarkdown | trimspace }} | ||
{{- if .HasImport }} | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
{{ codefile "shell" .ImportFile }} | ||
|
||
{{- end }} |